org.jhotdraw.gui
Interface EditableComponent
-
- All Known Implementing Classes:
- DefaultDrawingView
public interface EditableComponentThis interface must be implemented by components which are editable.FIXME - Investigate if we can replace this interface by querying the TransferHandler of a component and retrieve its cut/copy/paste actions. See http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html#cut
Design PatternsFramework
The interfaces and classes listed below work together:
Contract:EditableComponent,JTextComponent.
Client:AbstractSelectionAction,DeleteAction,DuplicateAction,SelectAllAction,ClearSelectionAction.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringSELECTION_EMPTY_PROPERTYThe name of the "selectionEmpty" property.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Adds a property change listener.voidclearSelection()Selects nothing.voiddelete()Deletes the selected components or the component at (or after) the caret position.voidduplicate()Duplicates the selected region.booleanisSelectionEmpty()Returns true if the selection is empty.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Removes a property change listener.voidselectAll()Selects all.
-
-
-
Field Detail
-
SELECTION_EMPTY_PROPERTY
static final java.lang.String SELECTION_EMPTY_PROPERTY
The name of the "selectionEmpty" property.- See Also:
- Constant Field Values
-
-
Method Detail
-
delete
void delete()
Deletes the selected components or the component at (or after) the caret position.
-
duplicate
void duplicate()
Duplicates the selected region.
-
selectAll
void selectAll()
Selects all.
-
clearSelection
void clearSelection()
Selects nothing.
-
isSelectionEmpty
boolean isSelectionEmpty()
Returns true if the selection is empty. This is a bound property.
-
addPropertyChangeListener
void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener.
-
removePropertyChangeListener
void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG