Package org.iremake.common.model

Examples of org.iremake.common.model.Province


                String name = FrameManager.getInstance().showInputDialog("Enter new Province's name:");
                if (name != null) {
                    // TODO selectedNation could be null, setModel could not have been set, than this will fail
                    XList<Province> model = (XList<Province>) provinceList.getModel();
                    // TODO meaningful id
                    Province province = new Province(1, name);
                    model.addElement(province); // the model is the internal list
                }
            }
        });
        removeprovinceButton.addActionListener(new ActionListener() {
View Full Code Here


                p.x += 50;
                final ListSelectDialog<Province> dialog = new ListSelectDialog<>("Select Province", scenario.getAllProvinces());
                dialog.setClosingListener(new WindowClosingListener() {
                    @Override
                    public boolean closing() {
                        Province province = dialog.getSelectedElement();
                        if (province != null) {
                            // selectedProvinceID = province.getID();
                        }
                        return true;
                    }
View Full Code Here

        // add a nation and a province
        Nation nation = new Nation();
        nation.setProperty(Nation.KEY_NAME, "Test Nation");
        scenario.getNations().addElement(nation);

        Province province = new Province(1, "Test province");
        nation.addProvince(province);

        nation.setProperty(Nation.KEY_CAPITAL, String.valueOf(province.getID()));

        IOManager.saveToXML(Places.None, "test-scenario.xml", scenario);
    }
View Full Code Here

        for (int i = 0; i < chunk; i++) {
            if (terrain_underlay[i] != 5) {
                if (!processed.contains(provinces[i])) {
                    Nation nation = nmap.get(countries[i]);
                    String name = pmap.get(provinces[i]);
                    Province province = scenario.createProvince(name);
                    nation.addProvince(province);
                    ppmap.put(provinces[i], province);
                    processed.add(provinces[i]);
                }
            }
View Full Code Here

TOP

Related Classes of org.iremake.common.model.Province

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.