public void actionPerformed(java.awt.event.ActionEvent e){
  String command=e.getActionCommand();
  if (Debug.debugging("layerbuttons")) {
    Debug.output("LayersPanel.actionPerformed(): " + command);
  }
  if (command == LayersPanel.LayerTopCmd || command == LayersPanel.LayerBottomCmd || command == LayersPanel.LayerUpCmd || command == LayersPanel.LayerDownCmd || command == LayersPanel.LayerRemoveCmd) {
    if (selected != null) {
      if (Debug.debugging("layercontrol")) {
        Debug.output("LayerControlButtonPanel: button firing " + command + " event for "+ selected.getName());
      }
      firePropertyChange(command,null,selected);
    }
 else {
      if (Debug.debugging("layercontrol")) {
        Debug.output("LayerControlButtonPanel: button firing " + command + " event with no layer selected");
      }
    }
    if (command == LayersPanel.LayerRemoveCmd) {
      selected=null;
      delete.setEnabled(false);
    }
  }
 else   if (command.equals(LayersPanel.LayerAddCmd)) {
    if (layerAddPanel != null) {
      layerAddPanel.showPanel();
    }
  }
}

public void actionPerformed ( java . awt . event . ActionEvent e ) { String command = e . getActionCommand ( ) ; if ( Debug . debugging ( "layerbuttons" ) ) { Debug . output ( "LayersPanel.actionPerformed(): " + command ) ; } if ( command == LayersPanel . LayerTopCmd || command == LayersPanel . LayerBottomCmd || command == LayersPanel . LayerUpCmd || command == LayersPanel . LayerDownCmd || command == LayersPanel . LayerRemoveCmd ) { if ( selected != null ) { if ( Debug . debugging ( "layercontrol" ) ) { Debug . output ( "LayerControlButtonPanel: button firing " + command + " event for " + selected . getName ( ) ) ; } firePropertyChange ( command , null , selected ) ; } else { if ( Debug . debugging ( "layercontrol" ) ) { Debug . output ( "LayerControlButtonPanel: button firing " + command + " event with no layer selected" ) ; } } if ( command == LayersPanel . LayerRemoveCmd ) { selected = null ; delete . setEnabled ( false ) ; } } else if ( command . equals ( LayersPanel . LayerAddCmd ) ) { if ( layerAddPanel != null ) { layerAddPanel . showPanel ( ) ; } } }
method associated with the actionlistener interface . this method listens for action events meant to change the order of the layers , as fired by the layer order buttons .
