本文整理汇总了Java中org.netbeans.api.visual.action.ActionFactory.createSelectAction方法的典型用法代码示例。如果您正苦于以下问题:Java ActionFactory.createSelectAction方法的具体用法?Java ActionFactory.createSelectAction怎么用?Java ActionFactory.createSelectAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.visual.action.ActionFactory
的用法示例。
在下文中一共展示了ActionFactory.createSelectAction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setNodeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
@Override
public void setNodeWidgetAction(final INodeWidget nodeWidget) {
WidgetAction selectAction = ActionFactory.createSelectAction(NODE_WIDGET_SELECT_PROVIDER);
WidgetAction moveAction = new MoveAction(nodeWidget, null, MOVE_PROVIDER_DEFAULT, ALIGNSTRATEGY_PROVIDER, ALIGNSTRATEGY_PROVIDER);
WidgetAction popupMenuAction = ActionFactory.createPopupMenuAction(nodeWidget.getPopupMenuProvider());
WidgetAction snapMoveAction = ActionFactory.createMoveAction(ActionFactory.createSnapToGridMoveStrategy(5, 5), null);
WidgetAction acceptAction = ActionFactory.createAcceptAction(new PinWidgetAcceptProvider(file.getModelerScene()));
WidgetAction.Chain selectActionTool = nodeWidget.createActions(DesignerTools.SELECT);
selectActionTool.addAction(selectAction);
// selectActionTool.addAction(NODE_DELETE_ACTION);
selectActionTool.addAction(moveAction);
selectActionTool.addAction(nodeWidget.getModelerScene().createWidgetHoverAction());
selectActionTool.addAction(acceptAction);
selectActionTool.addAction(popupMenuAction);
selectActionTool.addAction(snapMoveAction);
}
示例2: setNodeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
@Override
public void setNodeWidgetAction(final INodeWidget nodeWidget) {
// IModelerScene modelerScene = nodeWidget.getModelerScene();
// WidgetAction doubleClickAction = new DoubleClickAction(new DoubleClickProvider() {
// @Override
// public void onDoubleClick(Widget widget, Point point, boolean bln) {
// nodeWidget.showProperties();
// nodeWidget.getModelerScene().getModelerPanelTopComponent().changePersistenceState(false);
// }
// });
WidgetAction selectAction = ActionFactory.createSelectAction(new NodeWidgetSelectProvider(nodeWidget.getModelerScene()));
// WidgetAction moveAction = new MoveAction(nodeWidget,
// null, new MultiMoveProvider(nodeWidget.getModelerScene()),
// alignStrategyProvider, alignStrategyProvider);
WidgetAction moveAction = new MoveAction(nodeWidget,
null, MOVE_PROVIDER_DEFAULT,
alignStrategyProvider, alignStrategyProvider);
WidgetAction popupMenuAction = ActionFactory.createPopupMenuAction(nodeWidget.getPopupMenuProvider());
// NodeWidgetResizeProvider nodeWidgetResizeProvider = new NodeWidgetResizeProvider();
// WidgetAction resizeAction = ActionFactory.createResizeAction(nodeWidgetResizeProvider, nodeWidgetResizeProvider);
WidgetAction snapMoveAction = ActionFactory.createMoveAction(ActionFactory.createSnapToGridMoveStrategy(5, 5), null);
WidgetAction.Chain selectActionTool = nodeWidget.createActions(DesignerTools.SELECT);
// selectActionTool.addAction(doubleClickAction);
selectActionTool.addAction(selectAction);
selectActionTool.addAction(moveAction);
// selectActionTool.addAction(ActionFactory.createMoveAction());//BUG : above move interrupt gui view
selectActionTool.addAction(getScene().createWidgetHoverAction());
selectActionTool.addAction(popupMenuAction);
// selectActionTool.addAction(resizeAction);
selectActionTool.addAction(snapMoveAction);
}
示例3: ExtendedSelectAction
import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
public ExtendedSelectAction(SelectProvider provider) {
innerAction = ActionFactory.createSelectAction(provider);
panel = new JPanel();
}
示例4: setNodeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
@Override
public void setNodeWidgetAction(final INodeWidget nodeWidget) {
// WidgetAction editorAction = ActionFactory.createInplaceEditorAction(new LabelTextFieldEditor());
// WidgetAction deleteAction = new KeyEventLoggerAction();
WidgetAction doubleClickAction = new DoubleClickAction(new DoubleClickProvider() {
@Override
public void onDoubleClick(Widget widget, Point point, boolean bln) {
nodeWidget.showProperties();
nodeWidget.getModelerScene().getModelerPanelTopComponent().changePersistenceState(false);
}
});
WidgetAction selectAction = ActionFactory.createSelectAction(new NodeWidgetSelectProvider(nodeWidget.getModelerScene()));
// WidgetAction alignWithMoveAction = ActionFactory.createAlignWithMoveAction(nodeWidget.getModelerScene().getMainLayer(), nodeWidget.getModelerScene().getInterractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator());
WidgetAction moveAction = new MoveAction(nodeWidget,
null, new MultiMoveProvider(nodeWidget.getModelerScene()),
alignStrategyProvider, alignStrategyProvider);//ActionFactory.createMoveAction(null, new MultiMoveProvider(nodeWidget.getModelerScene()));
// WidgetAction alignWithResizeAction = ActionFactory.createAlignWithResizeAction ( nodeWidget.getBPMNScene().getMainLayer(), nodeWidget.getBPMNScene().getInterractionLayer(), null, false);
WidgetAction popupMenuAction = ActionFactory.createPopupMenuAction(nodeWidget.getPopupMenuProvider());
NodeWidgetResizeProvider nodeWidgetResizeProvider = new NodeWidgetResizeProvider();
WidgetAction resizeAction = ActionFactory.createResizeAction(nodeWidgetResizeProvider, nodeWidgetResizeProvider);
WidgetAction snapMoveAction = ActionFactory.createMoveAction(ActionFactory.createSnapToGridMoveStrategy(5, 5), null);
WidgetAction.Chain selectActionTool = nodeWidget.createActions(DesignerTools.SELECT);
// if (nodeWidget instanceof ActivityWidget) {
// selectActionTool.addAction(((ActivityWidget) nodeWidget).getBoundaryAcceptProvider());
// }
// if (nodeWidget instanceof SubProcessWidget) {
// selectActionTool.addAction(((SubProcessWidget) nodeWidget).getAcceptProvider());
// }
selectActionTool.addAction(doubleClickAction);
// selectActionTool.addAction(new MoveNodeKeyAction(moveStrategy, moveProvider));//Subprocesss Support
selectActionTool.addAction(selectAction);
//selectActionTool.addAction(deleteAction);
//selectActionTool.addAction(((GraphScene) scene).createObjectHoverAction());
//getLabelWidget().getActions().addAction(editorAction);
//selectActionTool.addAction(ActionFactory.createExtendedConnectAction(connectionLayer, new SequenceFlowConnectionProvider(scene)));
//selectActionTool.addAction (new NodeWidgetLockAction ());
// if (!(nodeWidget instanceof LaneWidget) && !(nodeWidget instanceof LaneSetWidget) && !(nodeWidget instanceof LaneSetBodyWidget) && !(nodeWidget instanceof LaneSetHeadWidget)) {
// selectActionTool.addAction(alignWithMoveAction);
selectActionTool.addAction(moveAction);
selectActionTool.addAction(super.getScene().createWidgetHoverAction());
selectActionTool.addAction(popupMenuAction);
// }
// if(nodeWidget instanceof LaneSetHeadWidget){
// selectActionTool.addAction(ActionFactory.createMoveAction(null, new PoolMultiMoveProvider(nodeWidget.getBPMNScene())));
// }
// selectActionTool.addAction(new MoveAction(moveStrategy, moveProvider));//Subprocesss Support
((NodeWidget) nodeWidget).getActions().addAction(resizeAction);
// if (!(nodeWidget instanceof LaneWidget) && !(nodeWidget instanceof LaneSetWidget) && !(nodeWidget instanceof LaneSetBodyWidget) && !(nodeWidget instanceof LaneSetHeadWidget)) {
selectActionTool.addAction(snapMoveAction);
// }
// WidgetAction.Chain paletteActionTool = this.createActions(DesignerTools.CONTEXT_PALETTE);
// paletteActionTool.addAction (new NodeWidgetAction ());
// paletteActionTool.addAction (new NodeWidgetLockAction ());
}
示例5: setNodeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
@Override
public void setNodeWidgetAction(final INodeWidget nodeWidget) {
// WidgetAction editorAction = ActionFactory.createInplaceEditorAction(new LabelTextFieldEditor());
WidgetAction doubleClickAction = new DoubleClickAction(new DoubleClickProvider() {
@Override
public void onDoubleClick(Widget widget, Point point, boolean bln) {
nodeWidget.showProperties();
nodeWidget.getModelerScene().getModelerPanelTopComponent().changePersistenceState(false);
}
});
// WidgetAction deleteAction = new KeyEventLoggerAction();
WidgetAction selectAction = ActionFactory.createSelectAction(new NodeWidgetSelectProvider(nodeWidget.getModelerScene()));
// WidgetAction alignWithMoveAction = ActionFactory.createAlignWithMoveAction(nodeWidget.getModelerScene().getMainLayer(), nodeWidget.getModelerScene().getInterractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator());
WidgetAction moveAction = new MoveAction(nodeWidget,
null, new MultiMoveProvider(nodeWidget.getModelerScene()),
alignStrategyProvider, alignStrategyProvider);//ActionFactory.createMoveAction(null, new MultiMoveProvider(nodeWidget.getModelerScene()));
// WidgetAction alignWithResizeAction = ActionFactory.createAlignWithResizeAction ( nodeWidget.getBPMNScene().getMainLayer(), nodeWidget.getBPMNScene().getInterractionLayer(), null, false);
WidgetAction popupMenuAction = ActionFactory.createPopupMenuAction(nodeWidget.getPopupMenuProvider());
NodeWidgetResizeProvider nodeWidgetResizeProvider = new NodeWidgetResizeProvider();
WidgetAction resizeAction = ActionFactory.createResizeAction(nodeWidgetResizeProvider, nodeWidgetResizeProvider);
WidgetAction snapMoveAction = ActionFactory.createMoveAction(ActionFactory.createSnapToGridMoveStrategy(5, 5), null);
WidgetAction.Chain selectActionTool = nodeWidget.createActions(DesignerTools.SELECT);
if (nodeWidget instanceof ActivityWidget) { //commented in conversation
selectActionTool.addAction(((ActivityWidget) nodeWidget).getBoundaryAcceptProvider());
}
if (nodeWidget instanceof SubProcessWidget) {//commented in conversation
selectActionTool.addAction(((SubProcessWidget) nodeWidget).getAcceptProvider());
}
selectActionTool.addAction(doubleClickAction);
// selectActionTool.addAction(new MoveNodeKeyAction(moveStrategy, moveProvider));//Subprocesss Support
selectActionTool.addAction(selectAction);
//selectActionTool.addAction(deleteAction);
//selectActionTool.addAction(((GraphScene) scene).createObjectHoverAction());
//getLabelWidget().getActions().addAction(editorAction);
//selectActionTool.addAction(ActionFactory.createExtendedConnectAction(connectionLayer, new SequenceFlowConnectionProvider(scene)));
//selectActionTool.addAction (new NodeWidgetLockAction ());
// if (!(nodeWidget instanceof LaneWidget) && !(nodeWidget instanceof LaneSetWidget) && !(nodeWidget instanceof LaneSetBodyWidget) && !(nodeWidget instanceof LaneSetHeadWidget)) {
// selectActionTool.addAction(alignWithMoveAction);
selectActionTool.addAction(moveAction);
selectActionTool.addAction(getScene().createWidgetHoverAction());
selectActionTool.addAction(popupMenuAction);
// }
// if(nodeWidget instanceof LaneSetHeadWidget){
// selectActionTool.addAction(ActionFactory.createMoveAction(null, new PoolMultiMoveProvider(nodeWidget.getBPMNScene())));
// }
// selectActionTool.addAction(new MoveAction(moveStrategy, moveProvider));//Subprocesss Support
((NodeWidget) nodeWidget).getActions().addAction(resizeAction);
// if (!(nodeWidget instanceof LaneWidget) && !(nodeWidget instanceof LaneSetWidget) && !(nodeWidget instanceof LaneSetBodyWidget) && !(nodeWidget instanceof LaneSetHeadWidget)) {
selectActionTool.addAction(snapMoveAction);
// }
// WidgetAction.Chain paletteActionTool = this.createActions(DesignerTools.CONTEXT_PALETTE);
// paletteActionTool.addAction (new NodeWidgetAction ());
// paletteActionTool.addAction (new NodeWidgetLockAction ());
}