本文整理了Java中net.rptools.maptool.model.Zone.<init>()
方法的一些代码示例,展示了Zone.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.<init>()
方法的具体详情如下:
包路径:net.rptools.maptool.model.Zone
类名称:Zone
方法名:<init>
[英]Note: When adding new fields to this class, make sure to update all constructors, #imported(), #readResolve(), and potentially #optimize().
[中]注意:向此类添加新字段时,请确保更新所有构造函数、#imported()、#readResolve()和潜在的#optimize()。
代码示例来源:origin: RPTools/maptool
public Campaign(Campaign campaign) {
zones = Collections.synchronizedMap(new LinkedHashMap<GUID, Zone>());
/*
* JFJ 2010-10-27 Don't forget that since these are new zones AND new tokens created here from the old one, if
* you have any data that needs to transfer over you will need to manually copy it as is done below for the
* campaign properties and macro buttons.
*/
for (Entry<GUID, Zone> entry : campaign.zones.entrySet()) {
Zone copy = new Zone(entry.getValue());
zones.put(copy.getId(), copy);
}
campaignProperties = new CampaignProperties(campaign.campaignProperties);
macroButtonProperties = new ArrayList<MacroButtonProperties>(campaign.getMacroButtonPropertiesArray());
}
代码示例来源:origin: RPTools/maptool
@Override
public void execute(ActionEvent e) {
Zone zone = MapTool.getFrame().getCurrentZoneRenderer().getZone();
// XXX Perhaps ask the user if the copied map should have its GEA and/or TEA cleared? An imported map would ask...
String zoneName = JOptionPane.showInputDialog("New map name:", "Copy of " + zone.getName());
if (zoneName != null) {
Zone zoneCopy = new Zone(zone);
zoneCopy.setName(zoneName);
MapTool.addZone(zoneCopy);
}
}
};
代码示例来源:origin: RPTools/maptool
String newName = parameters.get(1).toString();
Zone oldMap = getNamedMap(functionName, oldName).getZone();
Zone newMap = new Zone(oldMap);
newMap.setName(newName);
MapTool.addZone(newMap, false);
代码示例来源:origin: RPTools/maptool
public void testConversion() throws Exception {
ZoneRenderer renderer = ZoneRendererFactory.newRenderer(new Zone());
renderer.moveViewBy(-100, -100);
for (int i = -10; i < 10; i++) {
for (int j = -10; j < 10; j++) {
ZonePoint zp = new ZonePoint(i, j);
assertEquals(zp, ScreenPoint.fromZonePoint(renderer, zp).convertToZone(renderer));
}
}
}
}
代码示例来源:origin: RPTools/maptool
public static Zone createZone() {
Zone zone = new Zone();
zone.setName(DEFAULT_MAP_NAME);
zone.setBackgroundPaint(new DrawableTexturePaint(defaultImageId));
zone.setFogPaint(new DrawableColorPaint(Color.black));
zone.setVisible(AppPreferences.getNewMapsVisible());
zone.setHasFog(AppPreferences.getNewMapsHaveFOW());
zone.setUnitsPerCell(AppPreferences.getDefaultUnitsPerCell());
zone.setTokenVisionDistance(AppPreferences.getDefaultVisionDistance());
zone.setGrid(GridFactory.createGrid(AppPreferences.getDefaultGridType(), AppPreferences.getFaceEdge(), AppPreferences.getFaceVertex()));
zone.setGridColor(AppPreferences.getDefaultGridColor().getRGB());
zone.getGrid().setSize(AppPreferences.getDefaultGridSize());
zone.getGrid().setOffset(0, 0);
return zone;
}
内容来源于网络,如有侵权,请联系作者删除!