Package DisplayProject

Examples of DisplayProject.DisplayNode$qq_Resolver


    /**
     * Method to recalculate how wide each column should be
     */
    private void calculateColumnWidths() {
        DisplayNode[] nodes = null;
        DisplayNode root = this.getRoot(false);

        this.columnSizes = new int[this.headerLabels.length];

        if (root != null) {

            if (this.tree.isRootVisible()) {
                nodes = new DisplayNode[1];
                nodes[0] = root;
            }
            else {
                nodes = new DisplayNode[(root == null) ? 0 : root.getChildCount()];

                for (int i=0; i<nodes.length; i++) {
                    if (root != null)
                        nodes[i] = (DisplayNode)root.getChildAt(i);
                }
            }
        }

        // Loop through each column
View Full Code Here


     * @param pNode
     */
    public void nodeAdded(DisplayNode pNode) {
        int depthLevel = 0;
        boolean requiresRedraw = false;
        DisplayNode tmp = (DisplayNode)pNode.getParent();

        // Expand the parent if necessary
        if (tmp!= null && tmp.isOpened() && this.tree.isExpanded(new TreePath(tmp)) == false) {
            this.tree.expandPath(new TreePath(tmp.getPath()));
        }

        // Calculate the depth
        while (tmp != null) {
            tmp = (DisplayNode)tmp.getParent();
            depthLevel++;
        }

        if (isRootDisplayed() == false) {
            depthLevel--;
View Full Code Here

  public Array_Of_DisplayNode<DisplayNode> getSelectedNodes() {
      // TF:08/08/2009:Coded this method
      Array_Of_DisplayNode<DisplayNode> nodes = new Array_Of_DisplayNode<DisplayNode>();

      for (TreePath path : this.tree.getSelectionPaths()) {
            DisplayNode node = (DisplayNode)path.getLastPathComponent();
            nodes.add(node);
      }
      return nodes;
    }
View Full Code Here

        }
    }

    private void fireCollapsed(TreeExpansionEvent event) {
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        DisplayNode dn  = ((DisplayNode)event.getPath().getPath()[event.getPath().getPathCount()-1]);
        qq_Params.put( "Folder", new ParameterHolder(dn) );
        ClientEventManager.postEvent( this, "RequestFolderClose", qq_Params );
    }
View Full Code Here

        ClientEventManager.postEvent( this, "RequestFolderClose", qq_Params );
    }

    private void fireExpanded(TreeExpansionEvent event) {
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        DisplayNode dn  = ((DisplayNode)event.getPath().getPath()[event.getPath().getPathCount()-1]);
        qq_Params.put( "Folder", new ParameterHolder(dn) );
        ClientEventManager.postEvent( this, "RequestFolderOpen", qq_Params );
    }
View Full Code Here

        }
        else if (pControl != null && pControl instanceof JTable)
        {
            JTable table = (JTable)pControl;
            if (table.getModel() instanceof TableSorter) {
                DisplayNode dn = ((DisplayNode)((ArrayFieldModel)((TableSorter)table.getModel()).getTableModel()).getData().get(table.getSelectedRow()));
                params.put( "node", new ParameterHolder(dn) );
            }
            else {
                params.put( "node", new ParameterHolder(null) );
            }
View Full Code Here

   *
   * @param parent
     * CraigM:29/07/2008.
   */
    private void checkExpand(TreePath parent) {
      DisplayNode node = (DisplayNode)parent.getLastPathComponent();
      HashMap<DisplayNode, Boolean> isOpenedStates = new HashMap<DisplayNode, Boolean>();
    ArrayList<DisplayNode> nodes = this.getNodes(node);

    for (DisplayNode aNode : nodes) {
      isOpenedStates.put(aNode, aNode.isOpened());
View Full Code Here

     * Recursive method only to be called from {@link TreeViewWidget#checkExpand(TreePath)}
     * CraigM:29/07/2008.
     */
    @SuppressWarnings("unchecked")
  private void checkExpand(TreePath parent, HashMap<DisplayNode, Boolean> isOpenedStates) {
      DisplayNode node = (DisplayNode)parent.getLastPathComponent();

      // CraigM:29/07/2008 - We need to store all the isOpened states as when we ask a node to expand/collapse, the parent
      // nodes are automatically expanded, which overrides the correct isOpened value.
      if (isOpenedStates == null) {
        isOpenedStates = new HashMap<DisplayNode, Boolean>();
        ArrayList<DisplayNode> nodes = this.getNodes(node);
        for (DisplayNode aNode : nodes) {
          isOpenedStates.put(aNode, aNode.isOpened());
        }
      }
     
        if (node.getChildCount() > 0){
            for (Enumeration<DisplayNode> e = node.children(); e.hasMoreElements();){
                TreePath path = parent.pathByAddingChild(e.nextElement());
                checkExpand(path, isOpenedStates);
            }
        }
        // CraigM:29/07/2008 - Use the stored isOpened value
View Full Code Here

TOP

Related Classes of DisplayProject.DisplayNode$qq_Resolver

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.