Package DisplayProject

Examples of DisplayProject.TreeViewModel


        // 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


        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

   *            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 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

        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

   *            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 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

TOP

Related Classes of 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.