org.argouml.uml.ui
Class ActionCut

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.ActionCut
All Implemented Interfaces:
Action, ActionListener, CaretListener, Cloneable, EventListener, Serializable

public class ActionCut
extends AbstractAction
implements CaretListener

The Cut Action.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private static ActionCut instance
           
private static String LOCALIZE_KEY
           
private  JTextComponent textSource
           
 
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
ActionCut()
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Cuts some text or a fig.
 void caretUpdate(CaretEvent e)
           
static ActionCut getInstance()
           
private  boolean isSystemClipBoardEmpty()
           
private  boolean removeFromDiagramAllowed()
          Disable cutting figs from a diagram to prevent issue 3480.
 
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

instance

private static ActionCut instance

LOCALIZE_KEY

private static final String LOCALIZE_KEY
See Also:
Constant Field Values

textSource

private JTextComponent textSource
Constructor Detail

ActionCut

public ActionCut()
Constructor.

Method Detail

getInstance

public static ActionCut getInstance()
Returns:
the singleton

actionPerformed

public void actionPerformed(ActionEvent ae)
Cuts some text or a fig.

Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

removeFromDiagramAllowed

private boolean removeFromDiagramAllowed()
Disable cutting figs from a diagram to prevent issue 3480. See also ActionPaste, which is also disabled for similar reasons.

Returns:
true if cut is allowed for the selected items

caretUpdate

public void caretUpdate(CaretEvent e)
Specified by:
caretUpdate in interface CaretListener
See Also:
CaretListener.caretUpdate(javax.swing.event.CaretEvent)

isSystemClipBoardEmpty

private boolean isSystemClipBoardEmpty()


ArgoUML © 1996-2005ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook