Interface IDesignTool
- 
- All Known Implementing Classes:
- AbstractBlockWorkspace.ConnectionTool,- AbstractDesignTool,- AbstractLayoutTool,- AbstractRectangularShapeTool,- AbstractShapeTool,- ArrowTool,- EllipseTool,- EyedropperTool,- GradientTool,- InstantiationTool,- LineTool,- NullTool,- PasteTool,- PathEditorTool,- PencilTool,- PolygonTool,- RectangleTool,- SelectionTool
 
 public interface IDesignToolRepresents a "design tool", which is a mode that the design panel can be in. Tools affect the type of selection editor that gets installed on selected components, and how the mouse behaves over the design panel.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceIDesignTool.ToolbarInitializer
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Adds a property change listener to this design tool.javax.swing.ActiongetAction(java.lang.Object key)Provides a way for external objects to get a hold of Actions that the tool defines.java.awt.CursorgetCursor(java.awt.Point point, int inputEventMask)The cursor to use given the current event mask, which can be used to detect what keys are being held downIHighlightgetDragHighlight()Called while dragging as an easy way for a tool to install a highlight while dragging.java.lang.StringgetStatusBarText(java.util.List<javax.swing.JComponent> selection, java.awt.Point point, int inputMask)Calculates the currently applicable status bar text for this toolIDesignTool.ToolbarInitializergetToolbarInitializer()voidinstall(DesignPanel panel)Installs the tool for the given panel.ISelectionControlnewSelectionControl()Gives the tool a chance to create a new selection control object to install handles on the selection.voidonClick(java.awt.Point p, int modifiers)Called when the user clicks in the design space.voidonDoubleClick(java.awt.Point p, int modifiers)Called when the user double-clicksvoidonDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called while the user is dragging.voidonDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user stops dragging.voidonDragStart(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user start's dragging while this tool is active.voidonKeyEvent(java.awt.event.KeyEvent event, boolean press)voidonMove(java.awt.Point move, int modifiers)voidonPopupTrigger(java.awt.Point p, int modifiers)Called when the user issues a click that matches the current system's notion of a popup-menu triggervoidonPress(java.awt.Point p, int modifiers)Called when the user presses the mouse in the design space.voidonRelease(java.awt.Point p, int modifiers)Called when the user presses the mouse in the design space.voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voiduninstall()Uninstalls the tool.
 
- 
- 
- 
Method Detail- 
getCursorjava.awt.Cursor getCursor(java.awt.Point point, int inputEventMask)The cursor to use given the current event mask, which can be used to detect what keys are being held down
 - 
getStatusBarTextjava.lang.String getStatusBarText(java.util.List<javax.swing.JComponent> selection, java.awt.Point point, int inputMask)Calculates the currently applicable status bar text for this tool
 - 
onClickvoid onClick(java.awt.Point p, int modifiers)Called when the user clicks in the design space.- Parameters:
- p- The point at which they clicked. Relative to the designable container.
- modifiers- A bitmask of modifiers. Comes from- InputEvent.getModifiersEx()
 
 - 
onDoubleClickvoid onDoubleClick(java.awt.Point p, int modifiers)Called when the user double-clicks
 - 
onPressvoid onPress(java.awt.Point p, int modifiers)Called when the user presses the mouse in the design space.- Parameters:
- p- The point at which they pressed. Relative to the designable container.
- modifiers- A bitmask of modifiers. Comes from- InputEvent.getModifiersEx()
 
 - 
onReleasevoid onRelease(java.awt.Point p, int modifiers)Called when the user presses the mouse in the design space.- Parameters:
- p- The point at which they pressed. Relative to the designable container.
- modifiers- A bitmask of modifiers. Comes from- InputEvent.getModifiersEx()
 
 - 
onPopupTriggervoid onPopupTrigger(java.awt.Point p, int modifiers)Called when the user issues a click that matches the current system's notion of a popup-menu trigger
 - 
onMovevoid onMove(java.awt.Point move, int modifiers)
 - 
onDragStartvoid onDragStart(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user start's dragging while this tool is active. All coordinates are relative to the interaction panel and are in zoomed space.
 - 
onDragvoid onDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called while the user is dragging. All coordinates are relative to the interaction panel and are in zoomed space.
 - 
onDragEndvoid onDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user stops dragging. All coordinates are relative to the interaction panel and are in zoomed space.
 - 
onKeyEventvoid onKeyEvent(java.awt.event.KeyEvent event, boolean press)
 - 
getActionjavax.swing.Action getAction(java.lang.Object key) Provides a way for external objects to get a hold of Actions that the tool defines. For example, theSelectionTooldefines a number of alignment and z-order actions.
 - 
getDragHighlightIHighlight getDragHighlight() Called while dragging as an easy way for a tool to install a highlight while dragging.
 - 
newSelectionControlISelectionControl newSelectionControl() Gives the tool a chance to create a new selection control object to install handles on the selection. Called on the active tool when the selection changes or after a tool is first installed.
 - 
addPropertyChangeListenervoid addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Adds a property change listener to this design tool. The workspace will listen for these properties:- "handles": When this property changes, newSelectionControl()will be called again and the handles will be updated.
 
- "handles": When this property changes, 
 - 
removePropertyChangeListenervoid removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
 - 
getToolbarInitializerIDesignTool.ToolbarInitializer getToolbarInitializer() 
 - 
installvoid install(DesignPanel panel) Installs the tool for the given panel. Tools are built to be re-used by repeatedly being installed and then uninstalled as tools get switched out.
 - 
uninstallvoid uninstall() Uninstalls the tool.
 
- 
 
-