org.tigris.gef.base
Class CmdPrint
java.lang.Object
javax.swing.AbstractAction
org.tigris.gef.base.Cmd
org.tigris.gef.base.CmdPrint
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.awt.print.Printable, java.io.Serializable
- public class CmdPrint
- extends Cmd
- implements java.awt.print.Printable
Cmd to Print a diagram. Only works under JDK 1.2 and above.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Method Summary |
void |
doIt()
Perform whatever Cmd this Cmd is meant to do. |
void |
doPageSetup()
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
|
void |
setDiagramName(java.lang.String name)
|
void |
setPrintPageNumbers(boolean b)
|
void |
undoIt()
Undo the Cmd using information stored during its
execution. |
Methods inherited from class org.tigris.gef.base.Cmd |
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, getResource, register, registeredCmds, setArg, setName, setResource, shouldBeEnabled, 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 |
CmdPrint
public CmdPrint()
CmdPrint
public CmdPrint(java.lang.String diagramName)
setDiagramName
public void setDiagramName(java.lang.String name)
setPrintPageNumbers
public void setPrintPageNumbers(boolean b)
doIt
public void doIt()
- Description copied from class:
Cmd
- Perform whatever Cmd this Cmd is meant to do. Subclasses
should override this to do whatever is intended. When the Cmd
executes, it should store enough information to undo itself later
if needed.
- Specified by:
doIt
in class Cmd
undoIt
public void undoIt()
- Description copied from class:
Cmd
- Undo the Cmd using information stored during its
execution.
needs-more-work: This is not currently implemented.
- Specified by:
undoIt
in class Cmd
print
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
- Specified by:
print
in interface java.awt.print.Printable
doPageSetup
public void doPageSetup()