Ejemplo n.º 1
0
  /** Adds the listeners for the window allowing to change the map's properties */
  public void addMapPropertiesWindowListeners() {
    // Called when clicking on the "apply" button
    win.getMapPropertiesWindow()
        .getApplyButton()
        .addActionListener(
            new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                win.getEditorPan()
                    .getLayer1()
                    .setMapDim(
                        win.getMapPropertiesWindow().getMapWidth(),
                        win.getMapPropertiesWindow().getMapHeight());
                win.getEditorPan()
                    .getLayer2()
                    .setMapDim(
                        win.getMapPropertiesWindow().getMapWidth(),
                        win.getMapPropertiesWindow().getMapHeight());
                win.getEditorPan()
                    .getItemsLayer()
                    .setMapDim(
                        win.getMapPropertiesWindow().getMapWidth(),
                        win.getMapPropertiesWindow().getMapHeight());
                win.getEditorPan()
                    .getStartFinishLayer()
                    .setMapDim(
                        win.getMapPropertiesWindow().getMapWidth(),
                        win.getMapPropertiesWindow().getMapHeight());
              }
            });

    // Called when clicking on the "close" button
    win.getMapPropertiesWindow()
        .getCloseButton()
        .addActionListener(
            new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                win.getMapPropertiesWindow().dispose();
                win.setMapPropertiesWindow(null);
              }
            });
  }
Ejemplo n.º 2
0
 /** Adds the listeners for the "how to" window */
 public void addHowToWindowListeners() {
   // Called when clicking on the "close" button
   win.getHowToWindow()
       .getCloseButton()
       .addActionListener(
           new ActionListener() {
             public void actionPerformed(ActionEvent arg0) {
               win.getHowToWindow().dispose();
               win.setHowToWindow(null);
             }
           });
 }