本文整理了Java中javax.swing.JTree.stopEditing()
方法的一些代码示例,展示了JTree.stopEditing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.stopEditing()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:stopEditing
暂无
代码示例来源:origin: pentaho/mondrian
public void itemStateChanged(ItemEvent e) {
tree.stopEditing();
TreePath tpath = tree.getSelectionPath();
if (tpath != null) {
TreePath parentpath = tpath.getParentPath();
if (parentpath != null) {
refreshTree(parentpath);
}
}
}
});
代码示例来源:origin: de.schlichtherle.truezip/truezip-file
@Override
public boolean stopEditing() {
final boolean stop = super.stopEditing();
if (stop)
editedNode = null;
return stop;
}
代码示例来源:origin: org.orbisgis/toc
@Override
public void keyTyped(KeyEvent e) {
if (e.getKeyChar() == KeyEvent.VK_ENTER) {
tree.stopEditing();
}
}
代码示例来源:origin: org.orbisgis/toc
@Override
public void keyTyped(KeyEvent e) {
if (e.getKeyChar() == KeyEvent.VK_ENTER) {
tree.stopEditing();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public void mouseClicked(MouseEvent e) {
tree.stopEditing();
int selRow = tree.getRowForLocation(e.getX(), e.getY());
if ((selRow != -1) && SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
// Default action.
if (defaultActionEnabled) {
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
Node node = Visualizer.findNode(selPath.getLastPathComponent());
Action a = takeAction(node.getPreferredAction(), node);
if (a != null) {
if (a.isEnabled()) {
a.actionPerformed(new ActionEvent(node, ActionEvent.ACTION_PERFORMED, "")); // NOI18N
} else {
Toolkit.getDefaultToolkit().beep();
}
e.consume();
return;
}
}
if (tree.isExpanded(selRow)) {
tree.collapseRow(selRow);
} else {
tree.expandRow(selRow);
}
}
}
代码示例来源:origin: robward-scisys/sldeditor
(DefaultMutableTreeNode) editPath.getLastPathComponent();
if (node == editNode) {
tree.stopEditing();
代码示例来源:origin: stackoverflow.com
@Override public void focusGained(FocusEvent e) { }
@Override public void focusLost(FocusEvent e) {
tree.stopEditing();} } );
内容来源于网络,如有侵权,请联系作者删除!