Package civquest.swing.quadmap

Examples of civquest.swing.quadmap.QuadMap


                public void actionPerformed(ActionEvent e) {
                    ObjectsButton button = (ObjectsButton) e.getSource();
                    Vector<MapObject> mapObjects = button.getMapObjects();
                    Vector<JCheckBox> checkBoxes = button.getCheckBoxes();
                    Field field = button.getField();
                    QuadMap map = button.getMap();
                    Vector<MapObject> delObjects = new Vector();
                    for (int i = 0; i<mapObjects.size(); i++) {
                        if (checkBoxes.get(i).isSelected()) {
                            delObjects.add(mapObjects.get(i));
                        }
                    }
                    if (!delObjects.isEmpty()) {
                        removeObjects(delObjects, map, field.getPosition());
                    }
                    setVisible(false);
                }
            });

            ObjectsButton removeAllButton = new ObjectsButton(
                    this.mapObjects, this.checkBoxes, "Remove all",
                    field, this.map);
            removeAllButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    ObjectsButton button = (ObjectsButton) e.getSource();
                    Vector<MapObject> mapObjects = button.getMapObjects();
                    Field field = button.getField();
                    QuadMap map = button.getMap();
                    removeObjects(mapObjects, map, field.getPosition());
                    setVisible(false);
                }
            });
           
View Full Code Here


//     Nation activeNation = Game.getGame().getActiveNation();
//     VisibilityManager visManager = activeNation.getVisibilityManager();

    JScrollPane scrollPane = null;
    QuadMap map = null;
    try {
       scrollPane = new JScrollPane();

       MapData mapData = Game.getMapData();

       if(mapData instanceof FlatMapData) {
         map = new QuadMap(civQuest,
                   registry, topImageSet, Const.FLAT,
                  QuadMap.Mode.GAME,
                   scrollPane, session);
       } else if (mapData instanceof IsoMapData) {
         map = new QuadMap(civQuest,
                   registry, topImageSet, Const.ISO,
                  QuadMap.Mode.GAME,
                   scrollPane, session);

       }
View Full Code Here

    Registry guiRegistry = registry.getSubRegistry("gui");
    Session session = new Session(guiRegistry);

    JScrollPane scrollPane = null;
    QuadMap map = null;
    try {
       scrollPane = new JScrollPane();

       MapData mapData = Game.getMapData();


       if(mapData instanceof FlatMapData) {
         map = new QuadMap(civQuest, Game.getGame(),
                   registry, topImageSet, Const.FLAT,
                  QuadMap.Mode.SCENARIO,
                   scrollPane, session);
       } else if (mapData instanceof IsoMapData) {
         map = new QuadMap(civQuest, Game.getGame(),
                   registry, topImageSet, Const.ISO,
                  QuadMap.Mode.SCENARIO,
                   scrollPane, session);
       }
View Full Code Here

TOP

Related Classes of civquest.swing.quadmap.QuadMap

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.