• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SettlementType类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中net.sf.freecol.common.model.SettlementType的典型用法代码示例。如果您正苦于以下问题:Java SettlementType类的具体用法?Java SettlementType怎么用?Java SettlementType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SettlementType类属于net.sf.freecol.common.model包,在下文中一共展示了SettlementType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildList

点赞 3

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
/**
 * Builds the buttons for all the terrains.
 */
private void buildList() {
    List<TileType> tileList = getSpecification().getTileTypeList();
    for (TileType type : tileList) {
        listPanel.add(buildButton(getLibrary().getCompoundTerrainImage(type, 0.5),
                                  Messages.message(type.getNameKey()),
                                  new TileTypeTransform(type)));
    }
    listPanel.add(buildButton(getLibrary().getRiverImage("0101", 0.5),
                              Messages.message("minorRiver"),
                              new RiverTransform(TileImprovement.SMALL_RIVER)));
    listPanel.add(buildButton(getLibrary().getRiverImage("0202", 0.5),
                              Messages.message("majorRiver"),
                              new RiverTransform(TileImprovement.LARGE_RIVER)));
    listPanel.add(buildButton(getLibrary().getBonusImage(getSpecification()
                                                         .getResourceTypeList().get(0), 0.8),
                              Messages.message("editor.resource"), new ResourceTransform()));
    listPanel.add(buildButton(getLibrary().getMiscImage(ImageLibrary.LOST_CITY_RUMOUR, 0.66),
                              Messages.message("model.message.LOST_CITY_RUMOUR"),
                              new LostCityRumourTransform()));
    SettlementType settlementType = nativePlayer.getNationType().getCapitalType();
    settlementButton = buildButton(getLibrary().getSettlementImage(settlementType, 0.5),
                                   Messages.message("Settlement"), new SettlementTransform());
    listPanel.add(settlementButton);
}
 

开发者ID:vishal-mittal,
项目名称:SOEN6471-FreeCol,
代码行数:28,
代码来源:MapEditorTransformPanel.java

示例2: buildList

点赞 2

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
/**
 * Builds the buttons for all the terrains.
 */
private void buildList() {
    final Specification spec = getSpecification();
    List<TileType> tileList = spec.getTileTypeList();
    Dimension terrainSize = ImageLibrary.scaleDimension(ImageLibrary.TILE_OVERLAY_SIZE, 0.5f);
    for (TileType type : tileList) {
        listPanel.add(buildButton(SwingGUI.createTileImageWithOverlayAndForest(type, terrainSize),
                                  Messages.getName(type),
                                  new TileTypeTransform(type)));
    }
    Dimension riverSize = ImageLibrary.scaleDimension(ImageLibrary.TILE_SIZE, 0.5f);
    listPanel.add(buildButton(ImageLibrary.getRiverImage("0101", riverSize),
                              Messages.message("mapEditorTransformPanel.minorRiver"),
                              new RiverTransform(TileImprovement.SMALL_RIVER)));
    listPanel.add(buildButton(ImageLibrary.getRiverImage("0202", riverSize),
                              Messages.message("mapEditorTransformPanel.majorRiver"),
                              new RiverTransform(TileImprovement.LARGE_RIVER)));
    listPanel.add(buildButton(ImageLibrary.getRiverImage("2022", riverSize),
                              Messages.message("mapEditorTransformPanel.changeRiverConnections"),
                              new RiverStyleTransform(RiverStyleTransform.CHANGE_CONNECTIONS)));
    listPanel.add(buildButton(ImageLibrary.getRiverImage("1022", riverSize),
                              Messages.message("mapEditorTransformPanel.setRiverStyle"),
                              new RiverStyleTransform(RiverStyleTransform.SET_STYLE)));
    listPanel.add(buildButton(ImageLibrary.getMiscImage("image.tileitem."
                + first(getSpecification().getResourceTypeList()).getId(), 0.75f),
        Messages.message("mapEditorTransformPanel.resource"),
        new ResourceTransform()));
    listPanel.add(buildButton(ImageLibrary.getMiscImage(ImageLibrary.LOST_CITY_RUMOUR, 0.5f),
                              Messages.getName(ModelMessage.MessageType.LOST_CITY_RUMOUR),
                              new LostCityRumourTransform()));
    SettlementType settlementType = nativeNation.getType().getCapitalType();
    settlementButton = buildButton(ImageLibrary.getSettlementImage(settlementType, 0.5f),
                                   Messages.message("settlement"),
                                   new SettlementTransform());
    listPanel.add(settlementButton);
}
 

开发者ID:FreeCol,
项目名称:freecol,
代码行数:39,
代码来源:MapEditorTransformPanel.java

示例3: getSettlementType

点赞 2

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
private SettlementType getSettlementType() {
    return getOwnerNationType().getSettlementType(this.capital.isSelected());
}
 

开发者ID:FreeCol,
项目名称:freecol,
代码行数:4,
代码来源:EditSettlementDialog.java

示例4: getAverageSize

点赞 2

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
private int getAverageSize() {
    SettlementType t = getSettlementType();
    return (t.getMinimumSize() + t.getMaximumSize()) / 2;
}
 

开发者ID:FreeCol,
项目名称:freecol,
代码行数:5,
代码来源:EditSettlementDialog.java

示例5: getSettlementImage

点赞 2

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
public static BufferedImage getSettlementImage(SettlementType settlementType,
                                float scale) {
    return ResourceManager.getImage("image.tileitem." + settlementType.getId(),
                                    scale);
}
 

开发者ID:FreeCol,
项目名称:freecol,
代码行数:6,
代码来源:ImageLibrary.java

示例6: getSettlementImage

点赞 2

import net.sf.freecol.common.model.SettlementType; //导入依赖的package包/类
public Image getSettlementImage(SettlementType settlementType,
                                double scale) {
    return ResourceManager.getImage(settlementType.getId() + ".image",
                                    scale);
}
 

开发者ID:vishal-mittal,
项目名称:SOEN6471-FreeCol,
代码行数:6,
代码来源:ImageLibrary.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)