Package com.intellij.jam.view.tree

Examples of com.intellij.jam.view.tree.JamNodeDescriptor


      }

      public void setValueAt(final Object aValue, Object node, int column) {
        try {
          final ColumnInfo columnInfo = getColumnInfos()[column];
          final JamNodeDescriptor descriptor = getJamNodeDescriptor(node);
          getCachedColumnValues(((DefaultMutableTreeNode) node).getUserObjectPath()).set(column, aValue);
          JamTreeTableView.this.setValueAt(columnInfo, descriptor, aValue);
        }
        catch (LoadingNodeException e) {
        }
      }

      public Object getValueAt(Object value, int column) {
        return getCachedColumnValues(((DefaultMutableTreeNode) value).getUserObjectPath()).get(column);
      }
    };
    myTreeTableView = new MyTreeTableView(myModel);

    myBuilder = new JamAbstractTreeBuilder(project, getTree(), myModel, rootDescriptor) {

      protected boolean updateNodeDescriptor(final NodeDescriptor descriptor) {
        final boolean result = super.updateNodeDescriptor(descriptor);
        if (!descriptor.equals(myRootDescriptor) || getTree().isRootVisible()) {
          if (((JamNodeDescriptor) descriptor).isValid()) {
            cacheNode((JamNodeDescriptor)descriptor);
          }
        }
        return result;
View Full Code Here


      }
    }

    public TableCellRenderer getCellRenderer(int row, int column) {
      try {
        final JamNodeDescriptor node = getJamNodeDescriptor(super.getRowElement(row));
        return getColumnInfo(column).getCustomizedRenderer(node, new StripeTableCellRenderer(super.getCellRenderer(row, column)));
      }
      catch (LoadingNodeException e) {
        return LOADING_NODE_RENDERER;
      }
View Full Code Here

  public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf,
                                    int row, boolean hasFocus) {
    super.customizeCellRenderer(tree, value, selected, expanded, leaf, row, hasFocus);
    final Object userObject = ((DefaultMutableTreeNode) value).getUserObject();
    if (userObject instanceof JamNodeDescriptor) {
      final JamNodeDescriptor descriptor = (JamNodeDescriptor)userObject;
      //if (descriptor.getProject() != null && !descriptor.getProject().isOpen() || !descriptor.isValid()) return;

      setToolTipText(descriptor.getTooltip());
      String comment = descriptor.getComment();
      if (comment != null) {
        append(" " + comment, SimpleTextAttributes.GRAY_ATTRIBUTES);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.intellij.jam.view.tree.JamNodeDescriptor

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.