jApp
Class Command<T extends Document>
java.lang.Object
javax.swing.AbstractAction
jApp.Command<T>
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- AbstractSelectionCommand
public class Command<T extends Document>
- extends javax.swing.AbstractAction
- implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener
- See Also:
- Serialized Form
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(T document)
|
Command(T document,
javax.swing.Icon icon)
|
Command(T document,
java.lang.String name)
|
Command(T document,
java.lang.String name,
javax.swing.Icon icon)
|
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 |
Command
public Command(T document)
Command
public Command(T document,
java.lang.String name,
javax.swing.Icon icon)
Command
public Command(T document,
javax.swing.Icon icon)
Command
public Command(T document,
java.lang.String name)
suspend
public void suspend()
resume
public void resume()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased
in interface java.awt.event.KeyListener
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed
in interface java.awt.event.KeyListener
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Specified by:
keyTyped
in interface java.awt.event.KeyListener
updateFeedback
public void updateFeedback()
setCursor
public void setCursor(DocumentView view)
paint
public void paint(java.awt.Graphics2D g,
DocumentView view)
endThis
public void endThis()
terminate
public void terminate()
getDocument
public T getDocument()
init
public void init()
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interface java.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interface java.awt.event.MouseListener
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interface java.awt.event.MouseMotionListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
execute
public void execute(jApp.UndoableTask task)
addItemsToRightClick
protected void addItemsToRightClick(Document document,
javax.swing.JPopupMenu popupMenu)
- Handles right clicks.
- Parameters:
document
- the document that originated the event.popupMenu
- the popup menu to fill in
getView
public DocumentView getView()