Java Code Examples for org.openide.explorer.view.OutlineView#setPropertyColumns()

The following examples show how to use org.openide.explorer.view.OutlineView#setPropertyColumns() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetadataViewTopComponent.java    From snap-desktop with GNU General Public License v3.0 6 votes vote down vote up
private void initView() {
    setLayout(new BorderLayout());
    outlineView = new OutlineView(nodesColumnName);
    outlineView.setPropertyColumns(COLUMN_NAMES);
    final Outline outline = outlineView.getOutline();
    outline.setRootVisible(false);
    DefaultTableCellRenderer decimalTableCellRenderer = new StringDecimalFormatRenderer();
    outline.setDefaultRenderer(Double.class, decimalTableCellRenderer);
    outline.setDefaultRenderer(Float.class, decimalTableCellRenderer);
    outline.setDefaultRenderer(Node.Property.class, new MetadataOutlineCellRenderer());
    final TableColumnModel columnModel = outline.getColumnModel();
    columnModel.getColumn(0).setCellRenderer(new MetadataOutlineCellRenderer());
    final int[] columnWidths = COLUMN_WIDTHS;
    for (int i = 0; i < columnModel.getColumnCount(); i++) {
        columnModel.getColumn(i).setPreferredWidth(columnWidths[i]);
    }
    add(outlineView, BorderLayout.CENTER);
}
 
Example 2
Source File: JustificationTupleNode.java    From Llunatic with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void createTableColumns(OutlineView outlineView) {
    outlineView.setPropertyColumns("tid", "tid", "table", "table", "attribute", "attribute", "value", "value", "authoritative", "authoritative");
}
 
Example 3
Source File: OccurrenceTupleNode.java    From Llunatic with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void createTableColumns(OutlineView outlineView) {
    outlineView.setPropertyColumns(TID, TID, TABLE, TABLE, ATTRIBUTE, ATTRIBUTE, PREVIOUS_VALUE, Bundle.COL_PreviousValue(), ORIGINAL_VALUE, Bundle.COL_OriginalValue());
}
 
Example 4
Source File: UserCellTupleNode.java    From Llunatic with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void createTableColumns(OutlineView outlineView) {
    outlineView.setPropertyColumns("value", "value");
}