本文整理了Java中org.netbeans.swing.outline.Outline.getOutlineModel()
方法的一些代码示例,展示了Outline.getOutlineModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.getOutlineModel()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:getOutlineModel
[英]Convenience getter for the TableModel
as an instance of OutlineModel. If no OutlineModel has been set, returns null.
[中]TableModel
作为OutlineModel实例的便利获取程序。如果未设置OutlineModel,则返回null。
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
/** Get the TreePathSupport object which manages path expansion for this
* Outline. */
TreePathSupport getTreePathSupport () {
OutlineModel mdl = getOutlineModel();
if (mdl != null) {
return mdl.getTreePathSupport();
} else {
return null;
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public String getShortDescription(int column) {
return outline.getOutlineModel().getColumnName(column);
}
public void propertyChange(PropertyChangeEvent evt) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
public String getShortDescription(int column) {
return outline.getOutlineModel().getColumnName(column);
}
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
/** Get the layout cache which manages layout data for the Outline.
* <strong>Under no circumstances directly call the methods on the
* layout cache which change the expanded state - such changes will not
* be propagated into the table model, and will leave the model and
* its layout in inconsistent states. Any calls that affect expanded
* state must go through <code>getTreePathSupport()</code>.</strong> */
public final AbstractLayoutCache getLayoutCache () {
OutlineModel mdl = getOutlineModel();
if (mdl != null) {
return mdl.getLayout();
} else {
return null;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
public Icon getIcon(Object o) {
if( getOutline().getOutlineModel().isLeaf(o) )
return NO_ICON;
return null;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void addTreeExpansionListener( TreeExpansionListener l ) {
TreePathSupport tps = getOutline().getOutlineModel().getTreePathSupport();
if( tps != null )
tps.addTreeExpansionListener(l);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void removeTreeExpansionListener( TreeExpansionListener l ) {
TreePathSupport tps = getOutline().getOutlineModel().getTreePathSupport();
if( tps != null )
tps.removeTreeExpansionListener(l);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
private Node getNodeAt( int rowIndex ) {
Node result = null;
TreePath path = view.getOutline().getOutlineModel().getLayout().getPathForRow(rowIndex);
if (path != null) {
result = Visualizer.findNode(path.getLastPathComponent());
}
return result;
}
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
/** Set whether or not the root is visible */
public void setRootVisible (boolean val) {
if (getOutlineModel() == null) {
cachedRootVisible = val ? Boolean.TRUE : Boolean.FALSE;
}
if (val != isRootVisible()) {
//TODO - need to force a property change on the model,
//the layout cache doesn't have direct listener support
getLayoutCache().setRootVisible(val);
firePropertyChange("rootVisible", !val, val); //NOI18N
}
}
代码示例来源: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: in.jlibs/org-netbeans-swing-outline
public void actionPerformed(ActionEvent e) {
if( getSelectedRowCount() == 1 && isTreeColumnIndex (getSelectedColumn()) ) {
int selRow = getSelectedRow();
TreePath selPath = getLayoutCache().getPathForRow(selRow);
if( null != selPath
&& !getOutlineModel().isLeaf(selPath.getLastPathComponent()) ) {
boolean expanded = getLayoutCache().isExpanded(selPath);
if( expanded && !expand ) {
collapsePath(selPath);
return;
} else if( !expanded && expand ) {
expandPath(selPath);
return;
}
}
}
if( null != origAction )
origAction.actionPerformed(e);
}
}
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
MouseEvent me = (MouseEvent) e;
TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row));
if (!getOutlineModel().isLeaf(path.getLastPathComponent())) {
int handleWidth = DefaultOutlineCellRenderer.getExpansionHandleWidth();
Insets ins = getInsets();
int cCount = getOutlineModel().getChildCount(ourObject);
if (cCount > 0) {
Object lastChild = getOutlineModel().getChild(ourObject, cCount - 1);
TreePath lastChildPath = path.pathByAddingChild(lastChild);
int lastRow = getLayoutCache().getRowForPath(lastChildPath);
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
TreePath parent2 = tp2.getParentPath();
if (parent1 != null && parent2 != null && parent1.equals(parent2) &&
getOutlineModel().isLeaf(tp1.getLastPathComponent()) &&
getOutlineModel().isLeaf(tp2.getLastPathComponent())) {
return ascending ? super.compare(rm1, rm2) : - super.compare(rm1, rm2);
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
AbstractLayoutCache layout = tbl.getLayoutCache();
row = tbl.convertRowIndexToModel(row);
boolean leaf = tbl.getOutlineModel().isLeaf(value);
setLeaf(leaf);
setShowHandle(true);
内容来源于网络,如有侵权,请联系作者删除!