Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.TreeViewModel


        CloneHelper.cloneClientProperties(source, target);
        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here


        this.editor = new BorderedComboBoxEditor();
        this.setEditor(this.editor);
        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }
View Full Code Here

            }
            if (autoComplete) {
                editComponent.setDocument(new FillinManagementDocument(this, showDropdowns, listEntriesOnly, maxCharacters));
            }
            else {
                editComponent.setDocument(new FixedLengthDocument(maxCharacters));
            }
        }
    }
View Full Code Here

        target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
        target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
        target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
       
        if (source instanceof JComponent) {
          GridCell orig = GridCell.getExisting((JComponent)source);
          if (orig != null) {
            GridCell cell = GridCell.get((JComponent)target);
            cell.setWidthPolicy(orig.getWidthPolicy());
            cell.setHeightPolicy(orig.getHeightPolicy());
          }
          // TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
          ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
        }
    }
View Full Code Here

                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here

        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
                "actionMap", // class javax.swing.ActionMap
View Full Code Here

        // as being expanded. The events shouldn't be fired as this is a programmatic change, we
        // redraw the nodes later in this method anyone (ONCE!) and since the setCollapsed marks the
        // parents of the children as being expanded and sets their opened state, we definitely don't
        // want this either.
        this.tree.removeTreeExpansionListener(expansionListener);
        this.tree.setModel(new TreeViewModel(this.rootNode));
        this.tree.addTreeExpansionListener(expansionListener);

        // TF:25/9/07:The user object of the root node will have been reset by setting the tree, reset it to this
        if (pRootNode != null) {
            pRootNode.setUserObject(this);
View Full Code Here

   *            a boolean, false if any node can have children, true if each
   *            node is asked to see if it can have children
   * @return The created TreeView as a <code>JTree</code>
   */
    public static TreeViewWidget newTreeView(TreeNode root, boolean asksAllowsChildren) {
        TreeViewModel dtm = new TreeViewModel(root, asksAllowsChildren);
        return new TreeViewWidget(dtm);
    }
View Full Code Here

   * @param root
   *            a <code>TreeNode</code> object that is the root of the tree in the <code>TreeViewModel</code>
   * @return The created TreeView as a <code>JTree</code>
   */
    public static TreeViewWidget newTreeView(TreeNode root){
        TreeViewModel dtm = new TreeViewModel(root);
        return new TreeViewWidget(dtm);
    }
View Full Code Here

        return this.value;
    }
  public void performAction() {
        if (this._component instanceof JTree) {
            // TF:4/8/07: Reset the tree's model to correctly populate it.
            ((JTree)this._component).setModel(new TreeViewModel(this.value));
            //PM:12/10/07 select the root node this forces the scrollpant to the top left
            if (this.value != null)
                ((JTree)this._component).setSelectionPath(new TreePath(this.value));
        }
        else if (this._component instanceof JListView) {
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.TreeViewModel

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.