Package org.openquark.gems.client.explorer

Examples of org.openquark.gems.client.explorer.ExplorerTree


     */
    private void maybeAddGem() {

        if (gemCutter.getGUIState() == GemCutter.GUIState.ADD_GEM) {

            ExplorerTree explorerTree = tableTopExplorer.getExplorerTree();
            DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) explorerTree.getLastSelectedPathComponent();
            Object userObject = treeNode != null ? treeNode.getUserObject() : null;

            if (gemCutter.getAddingDisplayedGem() == null) {

                // This means we have to invoke Intellicut to add a gem.

                if (treeNode == null) {
                    treeNode = (DefaultMutableTreeNode) explorerTree.getModel().getRoot();
                    explorerTree.setSelectionPath(new TreePath(treeNode.getPath()));
                }

                Rectangle location = getIntellicutLocation(treeNode);
                DisplayedPartConnectable displayedPart = null;

View Full Code Here


            private static final long serialVersionUID = 5114481077769168106L;

            public void actionPerformed(ActionEvent evt) {

                ExplorerTree explorerTree = tableTopExplorer.getExplorerTree();
                DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) explorerTree.getLastSelectedPathComponent();

                if (treeNode == null) {
                    treeNode = (DefaultMutableTreeNode) explorerTree.getModel().getRoot();
                    explorerTree.setSelectionPath(new TreePath(treeNode.getPath()));
                }

                Rectangle location = getIntellicutLocation(treeNode);

                gemCutter.getIntellicutManager().startIntellicutMode(null, location, false, null, explorerTree);
View Full Code Here

     * @param treeNode the tree node to get the intellicut position for
     * @return the position at which intellicut should be displayed for a given node
     */
    private Rectangle getIntellicutLocation(DefaultMutableTreeNode treeNode) {

        ExplorerTree explorerTree = tableTopExplorer.getExplorerTree();
        Rectangle location = explorerTree.getPathBounds(new TreePath(treeNode.getPath()));

        if (treeNode == explorerTree.getModel().getRoot()) {
            // For the root node we want to display Intellicut off to the right.
            // This is so it doesn't obscure the rest of the tree.
            location.x += location.width + 3;
            location.y += 3;
            location.height = 0;
View Full Code Here

     * This is called by the GemCutter if the user activates the Intellicut keyboard shortcut.
     * @return true if menu was displayed, false otherwise
     */
    boolean maybeDisplayIntellicut() {

        ExplorerTree explorerTree = getTableTopExplorer().getExplorerTree();

        if (explorerTree.isFocusOwner()) {

            DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) explorerTree.getLastSelectedPathComponent();

            if (treeNode == null) {
                treeNode = (DefaultMutableTreeNode) explorerTree.getModel().getRoot();
            }               

            Rectangle location = getIntellicutLocation(treeNode);
            Object userObject = treeNode.getUserObject();

View Full Code Here

TOP

Related Classes of org.openquark.gems.client.explorer.ExplorerTree

Copyright © 2018 www.massapicom. 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.