本文整理了Java中org.netbeans.swing.outline.Outline.getModel()
方法的一些代码示例,展示了Outline.getModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.getModel()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:getModel
暂无
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
/** Convenience getter for the <code>TableModel</code> as an instance of
* OutlineModel. If no OutlineModel has been set, returns null. */
public OutlineModel getOutlineModel() {
TableModel mdl = getModel();
if (mdl instanceof OutlineModel) {
return (OutlineModel) getModel();
} else {
return null;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
private static boolean testNodeInRow(Outline outline, Node node, int i) {
int modelIndex = outline.convertRowIndexToModel(i);
if (modelIndex != -1) {
Object o = outline.getModel().getValueAt(modelIndex, 0);
Node n = Visualizer.findNode(o);
if (n == node) {
return true;
}
}
return false;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int r, int c) {
TableModel tableModel = outline.getModel();
tableModel.addTableModelListener(this);
return super.getTableCellEditorComponent(table, value, isSelected, r, c);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
protected void detachEditor() {
super.detachEditor();
TableModel tableModel = outline.getModel();
tableModel.removeTableModelListener(this);
}
@Override
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
protected void detachEditor() {
super.detachEditor();
TableModel tableModel = outline.getModel();
tableModel.removeTableModelListener(this);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int r, int c) {
TableModel tableModel = outline.getModel();
tableModel.addTableModelListener(this);
return super.getTableCellEditorComponent(table, value, isSelected, r, c);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public void propertyChange(final PropertyChangeEvent evt) {
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
propertyChange(evt);
}
});
return;
}
//fireTableDataChanged();
int row = rowForNode((Node)evt.getSource());
if (row == -1) {
return;
}
int column = columnForProperty(evt.getPropertyName());
if (column == -1) {
outline.tableChanged(new TableModelEvent(outline.getModel(), row, row,
TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE));
} else {
outline.tableChanged(new TableModelEvent(outline.getModel(), row, row,
column+1, TableModelEvent.UPDATE));
}
}
};
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
public void run() {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
}
});
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void propertyChange(PropertyChangeEvent evt) {
// We get this event while editing
stopCellEditingNoCommit();
if( SwingUtilities.isEventDispatchThread() ) {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
} else {
SwingUtilities.invokeLater( new Runnable() {
public void run() {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
}
});
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void run() {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
public void propertyChange(PropertyChangeEvent evt) {
stopCellEditing();
if (SwingUtilities.isEventDispatchThread()) {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
} else {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
}
});
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
private static Node[] getChildrenInDisplayedOrder(Node parent,
OutlineView outlineView) {
Outline outline = outlineView.getOutline();
Node[] unsortedChildren = parent.getChildren().getNodes(true);
int rows = outlineView.getOutline().getRowCount();
int start = findRowIndexInOutline(parent, outline, rows);
if (start == -1 && parent != ExplorerManager.find(outlineView).getRootContext()) {
return unsortedChildren;
}
List<Node> children = new LinkedList<Node>();
for (int j = start + 1; j < rows; j++) {
int childModelIndex = outline.convertRowIndexToModel(j);
if (childModelIndex == -1) {
continue;
}
Object childObject = outline.getModel().getValueAt(
childModelIndex, 0);
Node childNode = Visualizer.findNode(childObject);
if (childNode.getParentNode() == parent) {
children.add(childNode);
} else if (children.size() == unsortedChildren.length) {
break;
}
}
return children.toArray(new Node[children.size()]);
}
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
int r2 = getLayoutCache().getRowForPath(tp2);
Object obj1 = getModel().getValueAt(r1, column);
Object obj2 = getModel().getValueAt(r2, column);
obj1 = transformValue(obj1);
obj2 = transformValue(obj2);
内容来源于网络,如有侵权,请联系作者删除!