本文整理了Java中org.netbeans.swing.outline.Outline.setDefaultRenderer()
方法的一些代码示例,展示了Outline.setDefaultRenderer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.setDefaultRenderer()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:setDefaultRenderer
暂无
代码示例来源:origin: senbox-org/snap-desktop
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);
}
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
private void init() {
initialized = true;
setDefaultRenderer(Object.class, new DefaultOutlineCellRenderer());
ActionMap am = getActionMap();
//make rows expandable with left/rigt arrow keys
Action a = am.get("selectNextColumn"); //NOI18N
am.put("selectNextColumn", new ExpandAction(true, a)); //NOI18N
a = am.get("selectPreviousColumn"); //NOI18N
am.put("selectPreviousColumn", new ExpandAction(false, a)); //NOI18N
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
public AdvancedDataRowTableOutline(String nodeColumnName, AdvancedTableViewVisualizerConfiguration configuration) {
super(nodeColumnName);
this.nodeColumnName = nodeColumnName;
this.configuration = configuration;
AdvancedTableViewVisualizerConfigurationAccessor accessor =
AdvancedTableViewVisualizerConfigurationAccessor.getDefault();
List<String> hiddenColumns = accessor.getHiddenColumnNames(configuration);
DataTableMetadata metadata = configuration.getMetadata();
String nodeRowColumnID = accessor.getRowNodeColumnName(configuration);
Outline outline = getOutline();
List<Column> columns = new ArrayList<Column>();
for (String columnName : metadata.getColumnNames()) {
if (nodeColumnName.equals(columnName) || nodeRowColumnID.equals(columnName) || hiddenColumns.contains(columnName)) {
continue;
}
Column c = metadata.getColumnByName(columnName);
columns.add(c);
addPropertyColumn(c.getColumnName(), c.getColumnUName(), c.getColumnLongUName());
}
String iconColumnID = accessor.getIconColumnID(configuration);
if (iconColumnID == null || configuration.getMetadata().getColumnByName(iconColumnID) == null) {
outline.setDefaultRenderer(Object.class, new ExtendedTableCellRendererForNode());
}
outline.setDefaultRenderer(Node.Property.class, new FunctionsListSheetCell.OutlineSheetCell(outline, columns));
initActionMap();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
public FunctionsListViewTable(final ExplorerManager explorerManager, String nodeColumnName, ColumnsUIMapping columnsUIMapping, List<Column> metrics) {
super(nodeColumnName);
for (Column c : metrics) {
String displayedName = columnsUIMapping == null || columnsUIMapping.getDisplayedName(c.getColumnName()) == null
? c.getColumnUName()
: columnsUIMapping.getDisplayedName(c.getColumnName());
String displayedTooltip = columnsUIMapping == null || columnsUIMapping.getTooltip(c.getColumnName()) == null
? c.getColumnLongUName()
: columnsUIMapping.getTooltip(c.getColumnName());
addPropertyColumn(c.getColumnName(), displayedName, displayedTooltip);
}
final Outline outline = getOutline();
outline.setDefaultRenderer(Object.class, new FunctionCallNodeRenderer(explorerManager));
outline.setDefaultRenderer(Node.Property.class, new FunctionsListSheetCell.OutlineSheetCell(outline, metrics));
initActionMap();
}
}
代码示例来源:origin: digital-preservation/droid
nodeColumn0.setNestedComparator(new DefaultMutableTreeNodeComparator(nodeColumn0));
nodeColumn0.setCellRenderer(new NodeRenderer(backColor));
resultsOutline.setDefaultRenderer(Object.class, new NodeRenderer(backColor));
代码示例来源:origin: uk.gov.nationalarchives/droid-ui
nodeColumn0.setNestedComparator(new DefaultMutableTreeNodeComparator(nodeColumn0));
nodeColumn0.setCellRenderer(new NodeRenderer(backColor));
resultsOutline.setDefaultRenderer(Object.class, new NodeRenderer(backColor));
内容来源于网络,如有侵权,请联系作者删除!