Java Code Examples for org.netbeans.api.visual.action.WidgetAction#WidgetEvent
The following examples show how to use
org.netbeans.api.visual.action.WidgetAction#WidgetEvent .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 6 votes |
private WidgetAction.State processSingleOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetEvent event) { WidgetAction.State state; state = operator.operate (widget.getActions (), widget, event); if (state.isConsumed ()) return state; WidgetAction.Chain actions = widget.getActions (tool); if (actions != null) { state = operator.operate (actions, widget, event); if (state.isConsumed ()) return state; } return WidgetAction.State.REJECTED; }
Example 2
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 6 votes |
private WidgetAction.State processOperator (Operator operator, WidgetAction.WidgetEvent event) { WidgetAction.State state; String tool = scene.getActiveTool (); WidgetAction.Chain priorActions = scene.getPriorActions (); if (! priorActions.getActions ().isEmpty ()) if (operator.operate (priorActions, scene, event).isConsumed ()) return WidgetAction.State.CONSUMED; if (lockedAction != null) { state = operator.operate (lockedAction, lockedWidget, event); if (! state.isConsumed ()) state = processOperator (operator, tool, scene, event); } else state = processOperator (operator, tool, scene, event); lockedWidget = state.getLockedWidget (); lockedAction = state.getLockedAction (); scene.validate (); if (lockedWidget != null) scrollRectToVisible (scene.convertSceneToView (lockedWidget.convertLocalToScene (lockedWidget.getBounds ()))); return state; }
Example 3
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 5 votes |
private WidgetAction.State processOperator (Operator operator, String tool, Widget widget, WidgetAction.WidgetEvent event) { if (! widget.isVisible () || ! widget.isEnabled ()) return WidgetAction.State.REJECTED; WidgetAction.State state; List<Widget> children = widget.getChildren (); Widget[] childrenArray = children.toArray (new Widget[children.size ()]); for (int i = childrenArray.length - 1; i >= 0; i --) { Widget child = childrenArray[i]; state = processOperator (operator, tool, child, event); if (state.isConsumed ()) return state; } state = operator.operate (widget.getActions (), widget, event); if (state.isConsumed ()) return state; WidgetAction.Chain actions = widget.getActions (tool); if (actions != null) { state = operator.operate (actions, widget, event); if (state.isConsumed ()) return state; } return WidgetAction.State.REJECTED; }
Example 4
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.dragExit (widget, (WidgetAction.WidgetDropTargetEvent) event); }
Example 5
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.dropActionChanged (widget, (WidgetAction.WidgetDropTargetDragEvent) event); }
Example 6
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.dragOver (widget, (WidgetAction.WidgetDropTargetDragEvent) event); }
Example 7
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.dragEnter (widget, (WidgetAction.WidgetDropTargetDragEvent) event); }
Example 8
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.focusLost (widget, (WidgetAction.WidgetFocusEvent) event); }
Example 9
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.focusGained (widget, (WidgetAction.WidgetFocusEvent) event); }
Example 10
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.keyReleased (widget, (WidgetAction.WidgetKeyEvent) event); }
Example 11
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.keyPressed (widget, (WidgetAction.WidgetKeyEvent) event); }
Example 12
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.keyTyped (widget, (WidgetAction.WidgetKeyEvent) event); }
Example 13
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseWheelMoved (widget, (WidgetAction.WidgetMouseWheelEvent) event); }
Example 14
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseMoved (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 15
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseDragged (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 16
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseExited (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 17
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseEntered (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 18
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mouseReleased (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 19
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.mousePressed (widget, (WidgetAction.WidgetMouseEvent) event); }
Example 20
Source File: SceneComponent.java From netbeans with Apache License 2.0 | 4 votes |
public WidgetAction.State operate (WidgetAction action, Widget widget, WidgetAction.WidgetEvent event) { return action.drop (widget, (WidgetAction.WidgetDropTargetDropEvent) event); }