Package civquest.swing

Examples of civquest.swing.ImageSet


    }
   
   
    public void createHeightButtons(String vegetation) {
       
        ImageSet vegetationIS = this.vegImageSet.getSubImageSet(vegetation);

        Vector<String> heights = this.vegetationHeights.get(vegetation);
       
        this.heightPanel.removeAll();
        this.heightButtons.removeAllElements();
        this.heightButtonGroup = new ButtonGroup();

        for (String text : heights) {
            JToggleButton button;
            Image image = vegetationIS.getImage(text);
            if (image == null) {
                image = vegetationIS.getImage("DEFAULT");
            }
            if (image != null) {
                button = new JToggleButton(new ImageIcon(image));
            } else {
                button = new JToggleButton(text);
View Full Code Here


      // enforce theme being recognized as a directory
      if (!theme.endsWith(getDirectorySeparator())) {       
        theme += getDirectorySeparator();
      }
     
      return new ImageSet(resolve(baseURL, "images" + getDirectorySeparator() + theme));
    } catch (MalformedURLException e) {
      System.err.println("JarLoadingSource.constructImageSet says: " + e);
      System.err.println("====> Image cannot be loaded and CivQuest will abort NOW!!!");
      System.exit(-1);
      return null;
View Full Code Here

      // enforce theme being recognized as a directory
      if (!theme.endsWith(getDirectorySeparator())) {
        theme += getDirectorySeparator();
      }

      return new ImageSet(resolve(baseURL, "images" + getDirectorySeparator() + theme));
    } catch (MalformedURLException e) {
      System.err.println("FileLoadingSource.constructImageSet says: " + e);
      System.err.println("====> Images cannot be loaded and CivQuest will abort NOW!!!");
      System.exit(-1);
      return null;
View Full Code Here

    laySpecialImageSet = getLaySpecialImageSet(tilesIsoImageSet);
    constructBasicFieldViews(gameData);
    }

  private ImageSet getLaySpecialImageSet(ImageSet tilesIsoImageSet) {
    ImageSet firstSubSet = tilesIsoImageSet.getSubImageSet("layspecial");
   
    String widthString = new Integer(size.x).toString();
    String heightString = new Integer(size.y).toString();
    return firstSubSet.getSubImageSet(widthString + "x" + heightString);
  }
View Full Code Here

    this.layTerrainImageSet = getLayTerrainImageSet(tilesIsoImageSet);
     updateImage();
  }

  private ImageSet getLayTerrainImageSet(ImageSet tilesIsoImageSet) {
    ImageSet firstSubSet = tilesIsoImageSet.getSubImageSet("layterrain");
   
    String widthString = new Integer(size.x).toString();
    String heightString = new Integer(size.y).toString();
    return firstSubSet.getSubImageSet(widthString + "x" + heightString);
  }
View Full Code Here

      heightLevelImage = null;
    } else {
      String vegetationName = fieldReader.getVegetationName(position);
      Field.Height heightLevel = fieldReader.getHeightLevel(position);

      ImageSet vegSpecificImageSet
        = getVegSpecificImageSet(layTerrainImageSet, vegetationName);

      heightLevelImage = vegSpecificImageSet.getImage(getImageHeightString(heightLevel));
      if (heightLevelImage == null) {
        // The image doesn't exist - we try the Default image for that vegetation

        heightLevelImage = vegSpecificImageSet.getImage("Default");

        if (heightLevelImage == null) {
          printHeightImageMissingError(position);
        }
      }
View Full Code Here

        civquest.parser.ruleset.Field matchingField
          = getOverlapField(matchingSection, toVegName, toHeightLevel);

        if (matchingField != null) {
          ImageSet vegSpecificImageSet = getVegSpecificImageSet(base, vegName);
          ImageSet overlapImageSet = vegSpecificImageSet.getSubImageSet("overlap");
          String overlapDirString = getOverlapDirectionString(direction);
          ImageSet dirImageSet = overlapImageSet.getSubImageSet(overlapDirString);
          images[index] = dirImageSet.getImage(matchingField.getStringValue());
        }
      }
    }   
  }
View Full Code Here

    this.layCityImageSet = getLayCityImageSet(tilesIsoImageSet);
     updateImage();
  }

  private ImageSet getLayCityImageSet(ImageSet tilesIsoImageSet) {
    ImageSet firstSubSet = tilesIsoImageSet.getSubImageSet("laycity");
   
    String widthString = new Integer(size.x).toString();
    String heightString = new Integer(size.y).toString();
    return firstSubSet.getSubImageSet(widthString + "x" + heightString);
  }
View Full Code Here

  public RestrictedToNation[] getResToNations() {
    return quadMap.getResToNations();
  }

  private ImageSet getLayUnitImageSet(ImageSet tilesIsoImageSet) {
    ImageSet firstSubSet = tilesIsoImageSet.getSubImageSet("layunit");
   
    String widthString = new Integer(size.x).toString();
    String heightString = new Integer(size.y).toString();
    return firstSubSet.getSubImageSet(widthString + "x" + heightString);
  }
View Full Code Here

TOP

Related Classes of civquest.swing.ImageSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.