com.bonevich.erj.ui
Class Command

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.bonevich.erj.ui.Command
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
CmdProperties

public abstract class Command
extends javax.swing.AbstractAction

An abstract button command class.

Author:
jbonevic
See Also:
Serialized Form

Field Summary
protected static CommandManager _manager
           
protected  boolean _modifiesProject
           
static Command About
           
static Command AdjustGrid
           
static Command AdjustPageBreak
           
static Command AdjustSnap
           
static Command Arrange
           
static Command Contents
           
static Command Copy
           
static Command Cut
           
static Command Delete
           
static Command DeleteDiagram
           
static Command Exit
           
static Command Generate
           
static Command Goto
           
static Command History
           
static boolean IS_GLOBAL
           
static Command NewDiagram
           
static Command NewProject
           
static boolean NOT_GLOBAL
           
static Command Open
           
static Command PageSetup
           
static Command Paste
           
static Command Prefs
           
static Command Print
           
static Command ProjectProps
           
static Command Redo
           
static Command Remove
           
static Command RenameDiagram
           
static Command ReorderDiagrams
           
static Command Save
           
static Command SaveAs
           
static Command SelectAll
           
static Command Synchronize
           
static Command TargetDatabase
           
static Command Undo
           
static Command Zoom
           
static Command ZoomIn
           
static Command ZoomOut
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
Command(java.lang.String name)
           
Command(java.lang.String name, boolean isGlobal)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
abstract  boolean doIt()
           
 javax.swing.JButton getButton()
           
protected  java.lang.String getIconName()
           
 java.lang.String getName()
           
 void invoke()
           
 void markProjectModified()
          Mark the current project as out-of-date.
protected  void setModifiesProject(boolean modifies)
           
 void setName(java.lang.String name)
           
 boolean shouldBeEnabled()
           
abstract  void undoIt()
           
static void updateAllEnabled()
           
 void updateEnabled()
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_GLOBAL

public static final boolean IS_GLOBAL
See Also:
Constant Field Values

NOT_GLOBAL

public static final boolean NOT_GLOBAL
See Also:
Constant Field Values

_manager

protected static CommandManager _manager

_modifiesProject

protected boolean _modifiesProject

NewProject

public static Command NewProject

NewDiagram

public static Command NewDiagram

Open

public static Command Open

Save

public static Command Save

SaveAs

public static Command SaveAs

Print

public static Command Print

PageSetup

public static Command PageSetup

Exit

public static Command Exit

Undo

public static Command Undo

Redo

public static Command Redo

Cut

public static Command Cut

Copy

public static Command Copy

Paste

public static Command Paste

Delete

public static Command Delete

SelectAll

public static Command SelectAll

Remove

public static Command Remove

History

public static Command History

Prefs

public static Command Prefs

Zoom

public static Command Zoom

ZoomIn

public static Command ZoomIn

ZoomOut

public static Command ZoomOut

Goto

public static Command Goto

AdjustGrid

public static Command AdjustGrid

AdjustSnap

public static Command AdjustSnap

AdjustPageBreak

public static Command AdjustPageBreak

TargetDatabase

public static Command TargetDatabase

ProjectProps

public static Command ProjectProps

Generate

public static Command Generate

Synchronize

public static Command Synchronize

Arrange

public static Command Arrange

Contents

public static Command Contents

About

public static Command About

DeleteDiagram

public static Command DeleteDiagram

RenameDiagram

public static Command RenameDiagram

ReorderDiagrams

public static Command ReorderDiagrams
Constructor Detail

Command

public Command(java.lang.String name)

Command

public Command(java.lang.String name,
               boolean isGlobal)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

invoke

public void invoke()

doIt

public abstract boolean doIt()

undoIt

public abstract void undoIt()

markProjectModified

public void markProjectModified()
Mark the current project as out-of-date.


setModifiesProject

protected void setModifiesProject(boolean modifies)

updateEnabled

public void updateEnabled()

shouldBeEnabled

public boolean shouldBeEnabled()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

updateAllEnabled

public static void updateAllEnabled()

getButton

public javax.swing.JButton getButton()

getIconName

protected java.lang.String getIconName()


Copyright © 2001-2003 bonevich.com. All Rights Reserved.