Examples of HierarchyEditMode


Examples of y.view.hierarchy.HierarchyEditMode

    private void registerViewModes() {
        // add another view mode that acts upon clicking on
        // a folder node and clicking on the open/close icon
        getView().addViewMode(new HierarchicClickViewMode(this));

        HierarchyEditMode hierarchyEditMode = createHierarchyEditMode();
        // add custom popup menus
        hierarchyEditMode.setPopupMode(new DAForJavaPopupMode(this));
        getView().addViewMode(hierarchyEditMode);
    }
View Full Code Here

Examples of y.view.hierarchy.HierarchyEditMode

     * Create a new HierarchyEditMode that uses the edge tips defined on {@link GraphLoader}.
     *
     * @return the configured edit mode
     */
    private HierarchyEditMode createHierarchyEditMode() {
        HierarchyEditMode mode = new HierarchyEditMode() {
            @Override
            protected String getEdgeTip(Edge edge) {
                return fDependencyGraph.getEdgeTip(edge);
            }

            @Override
            protected String getNodeTip(Node node) {
                return fDependencyGraph.getNodeTip(node);
            }
        };

        mode.allowBendCreation(false);
        mode.allowEdgeCreation(false);
        mode.allowMoveLabels(false);
        mode.allowMovePorts(false);
        mode.allowNodeCreation(false);
        mode.allowNodeEditing(false);
        mode.allowResizeNodes(false);
        // show tool tips over nodes & edges
        mode.showNodeTips(true);
        mode.showEdgeTips(true);
        return mode;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.