当前位置: 首页>>代码示例>>Java>>正文


Java ActionFactory.createSelectAction方法代码示例

本文整理汇总了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);
    }
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:18,代码来源:ModelerDiagramEngine.java

示例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);

    }
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:34,代码来源:JPADiagramEngine.java

示例3: ExtendedSelectAction

import org.netbeans.api.visual.action.ActionFactory; //导入方法依赖的package包/类
public ExtendedSelectAction(SelectProvider provider) {
    innerAction = ActionFactory.createSelectAction(provider);
    panel = new JPanel();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:5,代码来源:ExtendedSelectAction.java

示例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 ());
    }
 
开发者ID:jGauravGupta,项目名称:jBPMNSuite,代码行数:62,代码来源:BPMNConversationDiagramEngine.java

示例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 ());
    }
 
开发者ID:jGauravGupta,项目名称:jBPMNSuite,代码行数:62,代码来源:BPMNProcessDiagramEngine.java


注:本文中的org.netbeans.api.visual.action.ActionFactory.createSelectAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。