dsto.dfc.swing.list
Class CmdDeleteRow

java.lang.Object
  extended by dsto.dfc.swing.commands.AbstractCommand
      extended by dsto.dfc.swing.commands.AbstractMutableCommand
          extended by dsto.dfc.swing.commands.AbstractSelectionBasedCommand
              extended by dsto.dfc.swing.commands.BasicDeleteCommand
                  extended by dsto.dfc.swing.list.CmdDeleteRow
All Implemented Interfaces:
Command, SelectionListener, Iconic, Copyable, Disposable, PropertyEventSource, ActionListener, Cloneable, EventListener

public class CmdDeleteRow
extends BasicDeleteCommand

Deletes the currently selected row of a list using that is displaying a DfcListModel.

Version:
$Revision$
Author:
Matthew Phillips

Field Summary
protected  boolean confirmDelete
           
protected  DfcList list
           
 
Fields inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand
source
 
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
listeners
 
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand
displayName, icon
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Constructor Summary
CmdDeleteRow(DfcList list)
           
 
Method Summary
protected  boolean checkDeleteOk()
          Return true if it is OK to delete items (check with user if confirmDelete is true).
 void execute()
          Execute the command.
 boolean isConfirmDelete()
           
 void selectionChanged(SelectionEvent e)
          SelectionListener interface implementation: does nothing.
 void setConfirmDelete(boolean newValue)
          Enable/disable user confirmation dialog before delete.
 
Methods inherited from class dsto.dfc.swing.commands.BasicDeleteCommand
getAccelerator, getDescription, getGroupInView, getIcon, getMnemonic, getName, isInteractive
 
Methods inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand
dispose
 
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon
 
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getLargeIcon, getLogString, setDisplayName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected DfcList list

confirmDelete

protected boolean confirmDelete
Constructor Detail

CmdDeleteRow

public CmdDeleteRow(DfcList list)
Method Detail

setConfirmDelete

public void setConfirmDelete(boolean newValue)
Enable/disable user confirmation dialog before delete.


isConfirmDelete

public boolean isConfirmDelete()

execute

public void execute()
Description copied from interface: Command
Execute the command.

Specified by:
execute in interface Command
Overrides:
execute in class BasicDeleteCommand

checkDeleteOk

protected boolean checkDeleteOk()
Return true if it is OK to delete items (check with user if confirmDelete is true).


selectionChanged

public void selectionChanged(SelectionEvent e)
Description copied from class: AbstractSelectionBasedCommand
SelectionListener interface implementation: does nothing.

Specified by:
selectionChanged in interface SelectionListener
Overrides:
selectionChanged in class AbstractSelectionBasedCommand


Copyright © 2008 Commonwealth of Australia