|
org.netbeans.api.visual 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.visual.action.ActionFactory
public final class ActionFactory
The factory class of all built-in actions. Action creation usually requires some parameter like decorator (cares about the visualization) and provider (cares about the logic of an action).
Instances of the built-in actions could be shared by multiple widgets.
Method Summary | ||
---|---|---|
static WidgetAction |
createAcceptAction(AcceptProvider provider)
Creates a accept action with a specified accept logic provider. |
|
static WidgetAction |
createActionMapAction()
Creates an action which handles keys and popup menu. |
|
static WidgetAction |
createActionMapAction(InputMap inputMap,
ActionMap actionMap)
Creates an action which handles keys and popup menu. |
|
static WidgetAction |
createAddRemoveControlPointAction()
Creates a add-remove control point action with a default sensitivity. |
|
static WidgetAction |
createAddRemoveControlPointAction(double createSensitivity,
double deleteSensitivity)
Creates a add-remove control point action with a specified sensitivity. |
|
static WidgetAction |
createAlignWithMoveAction(AlignWithWidgetCollector collector,
LayerWidget interractionLayer,
AlignWithMoveDecorator decorator)
Creates a align-with move action. |
|
static WidgetAction |
createAlignWithMoveAction(LayerWidget collectionLayer,
LayerWidget interractionLayer,
AlignWithMoveDecorator decorator)
Creates a align-with move action. |
|
static WidgetAction |
createAlignWithResizeAction(AlignWithWidgetCollector collector,
LayerWidget interractionLayer,
AlignWithMoveDecorator decorator)
Creates a align-with resize action. |
|
static WidgetAction |
createAlignWithResizeAction(LayerWidget collectionLayer,
LayerWidget interractionLayer,
AlignWithMoveDecorator decorator)
Creates a align-with resize action. |
|
static WidgetAction |
createCenteredZoomAction(double zoomMultiplier)
Creates a action that controls a zoom factor of a scene where the action is assigned. |
|
static WidgetAction |
createConnectAction(ConnectDecorator decorator,
LayerWidget interractionLayer,
ConnectProvider provider)
Creates a connect action with a specific decorator. |
|
static WidgetAction |
createConnectAction(LayerWidget interractionLayer,
ConnectProvider provider)
Creates a connect action with a default decorator. |
|
static WidgetAction |
createCycleFocusAction(CycleFocusProvider provider)
Creates a cycle focus action. |
|
static WidgetAction |
createCycleObjectSceneFocusAction()
Creates a cycle focus action which switches focused object on a object scene. |
|
static AlignWithMoveDecorator |
createDefaultAlignWithMoveDecorator()
Creates a default align-with move decorator. |
|
static ConnectDecorator |
createDefaultConnectDecorator()
Creates a default connect decorator |
|
static MoveProvider |
createDefaultMoveProvider()
Creates a default move provider where the logic controls the preferredLocation of a widget where the action is assigned to. |
|
static ReconnectDecorator |
createDefaultReconnectDecorator()
Creates a default reconnect decorator |
|
static RectangularSelectDecorator |
createDefaultRectangularSelectDecorator(Scene scene)
Creates a default rectangular select decorator. |
|
static ResizeControlPointResolver |
createDefaultResizeControlPointResolver()
Creates a default resize control point resolver which is used in resize action. |
|
static ResizeProvider |
createDefaultResizeProvider()
Creates a default resize provider which controls preferredBounds of a widget where an action is assigned. |
|
static WidgetAction |
createEditAction(EditProvider provider)
Creates an edit action. |
|
static WidgetAction |
createExtendedConnectAction(ConnectDecorator decorator,
LayerWidget interractionLayer,
ConnectProvider provider)
Creates an extended connect action with a specific decorator. |
|
static WidgetAction |
createExtendedConnectAction(LayerWidget interractionLayer,
ConnectProvider provider)
Creates an extended connect action with a default decorator. |
|
static WidgetAction |
createForwardKeyEventsAction(Widget forwardToWidget,
String forwardToTool)
This action is used for forwarding key events to another widget. |
|
static WidgetAction |
createFreeMoveControlPointAction()
Creates a move control point (of a connection widget) action with no movement restriction. |
|
static MoveControlPointProvider |
createFreeMoveControlPointProvider()
Creates a free (without any restriction) move control point (of a ConnectionWidget) provider. |
|
static MoveStrategy |
createFreeMoveStrategy()
Creates a free (without any restriction) move strategy |
|
static ResizeStrategy |
createFreeResizeStategy()
Creates a free (without any restriction) resize strategy |
|
static WidgetAction |
createHoverAction(HoverProvider provider)
Creates a hover action using a hover provider. |
|
static WidgetAction |
createHoverAction(TwoStateHoverProvider provider)
Creates a hover action using a two-stated hover provider. |
|
static
|
createInplaceEditorAction(InplaceEditorProvider<C> provider)
Creates an in-place editor action for a specific provider. |
|
static WidgetAction |
createInplaceEditorAction(TextFieldInplaceEditor editor)
Creates a text in-place editor action visualized using JTextField. |
|
static WidgetAction |
createInplaceEditorAction(TextFieldInplaceEditor editor,
EnumSet<InplaceEditorProvider.ExpansionDirection> expansionDirections)
Creates a text in-place editor action visualized using JTextField. |
|
static WidgetAction |
createMoveAction()
Creates a move action with a default (free) strategy. |
|
static WidgetAction |
createMoveAction(MoveStrategy strategy,
MoveProvider provider)
Creates a move action with a specified strategy and provider. |
|
static WidgetAction |
createMoveControlPointAction(MoveControlPointProvider provider)
Creates a move control point (of a connection widget) action with a specified provider. |
|
static RectangularSelectProvider |
createObjectSceneRectangularSelectProvider(ObjectScene scene)
Creates a rectangular select provider which controls a selection of an object scene. |
|
static WidgetAction |
createOrthogonalMoveControlPointAction()
Creates a move control point (of a connection widget) action with is used at ConnectionWidget with OrthogonalSearchRouter. |
|
static MoveControlPointProvider |
createOrthogonalMoveControlPointProvider()
Creates a orthogonal move control point provider which is usually used with ConnectionWidget with OrthogonalSearchRouter. |
|
static WidgetAction |
createPanAction()
Creates a scene view panning action. |
|
static WidgetAction |
createPopupMenuAction(PopupMenuProvider provider)
Creates a popup menu action with a speicied provider. |
|
static WidgetAction |
createReconnectAction(ReconnectDecorator decorator,
ReconnectProvider provider)
Creates a reconnect action with a specific decorator and logic provider. |
|
static WidgetAction |
createReconnectAction(ReconnectProvider provider)
Creates a reconnect action with a default decorator. |
|
static WidgetAction |
createRectangularSelectAction(ObjectScene scene,
LayerWidget interractionLayer)
Creates a rectangular select action for a specified object scene with a default decorator. |
|
static WidgetAction |
createRectangularSelectAction(RectangularSelectDecorator decorator,
LayerWidget interractionLayer,
RectangularSelectProvider provider)
Creates a rectangular select action with a specified decorator and logic provider. |
|
static WidgetAction |
createResizeAction()
Creates a resize action with a default (free without any restriction) strategy and default logic provider (the action affect preferredBounds of a widget where it is assigned) default resize control point resolver. |
|
static WidgetAction |
createResizeAction(ResizeStrategy strategy,
ResizeControlPointResolver resolver,
ResizeProvider provider)
Creates a resize action with a specified resize strategy and provider. |
|
static WidgetAction |
createResizeAction(ResizeStrategy strategy,
ResizeProvider provider)
Creates a resize action with a specified resize strategy and provider and default resize control point resolver. |
|
static WidgetAction |
createSelectAction(SelectProvider provider)
Creates a select action. |
|
static MoveStrategy |
createSnapToGridMoveStrategy(int horizontalGridSize,
int verticalGridSize)
Creates a snap-to-grid move strategy. |
|
static WidgetAction |
createSwitchCardAction(Widget cardLayoutWidget)
Creates a switch card action with controls an active card of a widget where a card layout is used. |
|
static WidgetAction |
createZoomAction()
Creates a action that controls a zoom factor of a scene where the action is assigned. |
|
static WidgetAction |
createZoomAction(double zoomMultiplier,
boolean animated)
Creates a action that controls a zoom factor of a scene where the action is assigned. |
|
static InplaceEditorProvider.EditorController |
getInplaceEditorController(WidgetAction inplaceEditorAction)
Returns an editor controller for a specified inplace-editor-action created by ActionFactory.createInplaceEditorAction method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static WidgetAction createAcceptAction(AcceptProvider provider)
provider
- the accept logic provider
public static WidgetAction createActionMapAction()
public static WidgetAction createActionMapAction(InputMap inputMap, ActionMap actionMap)
inputMap
- the input mapactionMap
- the action map
public static WidgetAction createAddRemoveControlPointAction()
public static WidgetAction createAddRemoveControlPointAction(double createSensitivity, double deleteSensitivity)
createSensitivity
- the create sensitivitydeleteSensitivity
- the delete sensitivity
public static WidgetAction createAlignWithMoveAction(LayerWidget collectionLayer, LayerWidget interractionLayer, AlignWithMoveDecorator decorator)
collectionLayer
- the layer with objects that the alignment is checked against.interractionLayer
- the interraction layer where the align-with hint lines are placeddecorator
- the align-with move decorator
public static WidgetAction createAlignWithMoveAction(AlignWithWidgetCollector collector, LayerWidget interractionLayer, AlignWithMoveDecorator decorator)
collector
- the collector of objects that the alignment is checked against.interractionLayer
- the interraction layer where the align-with hint lines are placeddecorator
- the align-with move decorator
public static WidgetAction createAlignWithResizeAction(LayerWidget collectionLayer, LayerWidget interractionLayer, AlignWithMoveDecorator decorator)
collectionLayer
- the layer with objects that the alignment is checked against.interractionLayer
- the interraction layer where the align-with hint lines are placeddecorator
- the align-with move decorator
public static WidgetAction createAlignWithResizeAction(AlignWithWidgetCollector collector, LayerWidget interractionLayer, AlignWithMoveDecorator decorator)
collector
- the collector of objects that the alignment is checked against.interractionLayer
- the interraction layer where the align-with hint lines are placeddecorator
- the align-with move decorator
public static WidgetAction createConnectAction(LayerWidget interractionLayer, ConnectProvider provider)
interractionLayer
- the interraction layer where the temporary connection is visualization placed.provider
- the connect logic provider
public static WidgetAction createConnectAction(ConnectDecorator decorator, LayerWidget interractionLayer, ConnectProvider provider)
decorator
- the connect decorator; if null, then the default decorator is usedinterractionLayer
- the interraction layer where the temporary connection is visualization placed.provider
- the connect logic provider
public static WidgetAction createExtendedConnectAction(LayerWidget interractionLayer, ConnectProvider provider)
interractionLayer
- the interraction layer where the temporary connection is visualization placed.provider
- the connect logic provider
public static WidgetAction createExtendedConnectAction(ConnectDecorator decorator, LayerWidget interractionLayer, ConnectProvider provider)
decorator
- the connect decorator; if null, then the default decorator is usedinterractionLayer
- the interraction layer where the temporary connection is visualization placed.provider
- the connect logic provider
public static WidgetAction createEditAction(EditProvider provider)
provider
- the edit logic provider.
public static WidgetAction createHoverAction(HoverProvider provider)
provider
- the hover logic provider
public static WidgetAction createHoverAction(TwoStateHoverProvider provider)
provider
- the two-stated hover logic provider
public static WidgetAction createInplaceEditorAction(TextFieldInplaceEditor editor)
editor
- the editor logic
public static WidgetAction createInplaceEditorAction(TextFieldInplaceEditor editor, EnumSet<InplaceEditorProvider.ExpansionDirection> expansionDirections)
editor
- the editor logicexpansionDirections
- the expansion directions
public static <C extends JComponent> WidgetAction createInplaceEditorAction(InplaceEditorProvider<C> provider)
provider
- the in-place editor provider
public static WidgetAction createMoveAction()
public static WidgetAction createMoveAction(MoveStrategy strategy, MoveProvider provider)
strategy
- the move strategy; if null, then default (free) move strategy is used.provider
- the move logic provider; if null, then defaual move logic provider is used
(provides movement for a widget where it is assigned).
public static WidgetAction createFreeMoveControlPointAction()
public static WidgetAction createOrthogonalMoveControlPointAction()
public static WidgetAction createMoveControlPointAction(MoveControlPointProvider provider)
provider
- the move control point provider
public static WidgetAction createPanAction()
public static WidgetAction createPopupMenuAction(PopupMenuProvider provider)
provider
- the popup menu provider
public static WidgetAction createReconnectAction(ReconnectProvider provider)
provider
- the reconnect logic provider
public static WidgetAction createReconnectAction(ReconnectDecorator decorator, ReconnectProvider provider)
decorator
- the reccont decoratorprovider
- the reconnect logic provider
public static WidgetAction createRectangularSelectAction(ObjectScene scene, LayerWidget interractionLayer)
scene
- the object scene which the selection will be controlled by the actioninterractionLayer
- the interraction layer where the selection rectangle will be visualized
public static WidgetAction createRectangularSelectAction(RectangularSelectDecorator decorator, LayerWidget interractionLayer, RectangularSelectProvider provider)
decorator
- the rectangular select decoratorinterractionLayer
- the interraction layer where the selection rectangle will be visualizedprovider
- the rectangular select logic provider
public static WidgetAction createResizeAction()
public static WidgetAction createResizeAction(ResizeStrategy strategy, ResizeProvider provider)
strategy
- the resize strategy; if null, then the default (free without any restriction) strategy is usedprovider
- the resize logic provider; if null, then the default logic provider is used
(the action affect preferredBounds of a widget where it is assigned)
public static WidgetAction createResizeAction(ResizeStrategy strategy, ResizeControlPointResolver resolver, ResizeProvider provider)
strategy
- the resize strategy; if null, then the default (free without any restriction) strategy is usedresolver
- the resize control point resolver; if null, then the default (points are at corners and center of edges) is usedprovider
- the resize logic provider; if null, then the default logic provider is used
(the action affect preferredBounds of a widget where it is assigned)
public static WidgetAction createSelectAction(SelectProvider provider)
provider
- the select logic provider
public static WidgetAction createSwitchCardAction(Widget cardLayoutWidget)
cardLayoutWidget
- the widget where a card layout is used
public static WidgetAction createZoomAction()
public static WidgetAction createZoomAction(double zoomMultiplier, boolean animated)
zoomMultiplier
- the zoom multiplier of each zoom stepanimated
- if true, then the zoom factor changed is animated
public static MoveStrategy createFreeMoveStrategy()
public static MoveStrategy createSnapToGridMoveStrategy(int horizontalGridSize, int verticalGridSize)
horizontalGridSize
- the horizontal grid sizeverticalGridSize
- the vertical grid size
public static MoveProvider createDefaultMoveProvider()
public static AlignWithMoveDecorator createDefaultAlignWithMoveDecorator()
public static MoveControlPointProvider createFreeMoveControlPointProvider()
public static MoveControlPointProvider createOrthogonalMoveControlPointProvider()
public static RectangularSelectDecorator createDefaultRectangularSelectDecorator(Scene scene)
scene
- the scene where an action is used
public static RectangularSelectProvider createObjectSceneRectangularSelectProvider(ObjectScene scene)
scene
- the object scene where an action is used
public static ConnectDecorator createDefaultConnectDecorator()
public static ReconnectDecorator createDefaultReconnectDecorator()
public static ResizeStrategy createFreeResizeStategy()
public static ResizeProvider createDefaultResizeProvider()
public static ResizeControlPointResolver createDefaultResizeControlPointResolver()
public static WidgetAction createCycleObjectSceneFocusAction()
public static WidgetAction createCycleFocusAction(CycleFocusProvider provider)
provider
- the cycle focus provider
public static WidgetAction createForwardKeyEventsAction(Widget forwardToWidget, String forwardToTool)
forwardToWidget
- the widget to which events are forwardedforwardToTool
- the tool to which events are forwarded; if null, then default action chain is used
public static InplaceEditorProvider.EditorController getInplaceEditorController(WidgetAction inplaceEditorAction)
ActionFactory.createInplaceEditorAction
method.
inplaceEditorAction
- the inplace-editor action
public static WidgetAction createCenteredZoomAction(double zoomMultiplier)
zoomMultiplier
- the zoom multiplier
|
org.netbeans.api.visual 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |