org.netbeans.swing.outline.Outline.getRenderDataProvider()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.netbeans.swing.outline.Outline.getRenderDataProvider()方法的一些代码示例,展示了Outline.getRenderDataProvider()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.getRenderDataProvider()方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:getRenderDataProvider

Outline.getRenderDataProvider介绍

[英]Get the RenderDataProvider which is providing text, icons and tooltips for items in the tree column. The default property for this value is null, in which case standard JTable/JTree object -> icon/string conventions are used
[中]获取RenderDataProvider,它为树列中的项目提供文本、图标和工具提示。此值的默认属性为null,在这种情况下,使用标准的JTable/JTree对象->图标/字符串约定

代码示例

代码示例来源:origin: in.jlibs/org-netbeans-swing-outline

protected void configureTreeCellEditor( Component editor, int row, int column ) {
  if( !(editor instanceof JComponent) ) {
    return;
  }
  TreeCellEditorBorder b = new TreeCellEditorBorder();
  TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row));
  Object o = getValueAt(row, column);
  RenderDataProvider rdp = getRenderDataProvider();
  b.icon = rdp.getIcon(o);
  b.nestingDepth = Math.max( 0, path.getPathCount() - (isRootVisible() ? 1 : 2) );
  b.isLeaf = getOutlineModel().isLeaf(o);
  b.isExpanded = getLayoutCache().isExpanded(path);
  
  ((JComponent)editor).setBorder(b);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial

@NbBundle.Messages("LBL_DiffView.TreeColumnLabel=Revision")
public DiffTreeTable(SearchHistoryPanel master) {
  super(Bundle.LBL_DiffView_TreeColumnLabel());
  this.master = master;
  getOutline().setShowHorizontalLines(true);
  getOutline().setShowVerticalLines(false);
  getOutline().setRootVisible(false);
  setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  setupColumns();
  getOutline().setRenderDataProvider( new NoLeafIconRenderDataProvider( getOutline().getRenderDataProvider() ) );
}

代码示例来源:origin: in.jlibs/org-netbeans-swing-outline

RenderDataProvider rendata = tbl.getRenderDataProvider();
Icon icon = null;
if (rendata != null) {

相关文章