本文整理汇总了Java中org.jdesktop.swingx.JXTree.setCellEditor方法的典型用法代码示例。如果您正苦于以下问题:Java JXTree.setCellEditor方法的具体用法?Java JXTree.setCellEditor怎么用?Java JXTree.setCellEditor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXTree
的用法示例。
在下文中一共展示了JXTree.setCellEditor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: interactiveTreeEditingRToLDatePicker
import org.jdesktop.swingx.JXTree; //导入方法依赖的package包/类
/**
* visualize datepicker editing of the hierarchical column, both
* in a tree and a xTree switching CO.
*
* standard editor
*/
public void interactiveTreeEditingRToLDatePicker() {
TreeModel model = createTreeModelWithDates();
JTree tree = new JTree(model);
tree.setEditable(true);
tree.setCellEditor(new DefaultTreeCellEditor(tree, null, new DatePickerCellEditor()));
JXTree xTree = new JXTree(model);
xTree.setEditable(true);
xTree.setCellEditor(new DefaultTreeCellEditor(tree, null, new DatePickerCellEditor()));
final JXFrame frame = wrapWithScrollingInFrame(tree, xTree, "standard Editing (DatePicker): compare tree and xtree");
addComponentOrientationToggle(frame);
show(frame);
}
示例2: interactiveXTreeEditingRToLDatePicker
import org.jdesktop.swingx.JXTree; //导入方法依赖的package包/类
/**
* visualize date picker editing of the hierarchical column, both
* in a tree and a xTree switching CO.
* using DefaultXTreeCellEditor.
*/
public void interactiveXTreeEditingRToLDatePicker() {
TreeModel model = createTreeModelWithDates();
JTree tree = new JTree(model);
tree.setEditable(true);
tree.setCellEditor(new DefaultXTreeCellEditor(tree, null, new DatePickerCellEditor()));
JXTree xTree = new JXTree(model);
xTree.setEditable(true);
xTree.setCellEditor(new DefaultXTreeCellEditor(xTree, null, new DatePickerCellEditor()));
final JXFrame frame = wrapWithScrollingInFrame(tree, xTree, "XEditing(DatePicker): compare tree and xtree");
addComponentOrientationToggle(frame);
show(frame);
}
示例3: interactiveDatePickerCellEditorXTree
import org.jdesktop.swingx.JXTree; //导入方法依赖的package包/类
/**
* Issue ??-swingx: picker cell editor popup commit/cancel
* transfers focus out-off the tree (1.5)
*
*
* a) commit by keyboard - commit okay but focus moved where?
* b) click into popup to commit - did not commit.
* Now fixed (CellEditorRemover copes with popup) okay committed,
* but focus where (as in a)?
* c) click on month navigation - editing canceled fixed.
* d) click in month navigation, then cancel by keyboard -
* focus where?
*
* focus handling is done in BasicTreeUI.completeEditing - and
* does not cope with popup. All termination is done in uidelegate,
* no central method in the tree called.
*
* independent on stopCellEditing flag - semantic in tree is
* different from semantic in table (first is "how" to terminate,
* second is "if" to terminate)
*
*/
public void interactiveDatePickerCellEditorXTree() {
final JXTree tree = new JXTree(createTreeModelWithDates());
tree.setEditable(true);
tree.setCellEditor(new DefaultXTreeCellEditor(tree, null, new DatePickerCellEditor()));
Action action = new AbstractAction("toggle terminate") {
public void actionPerformed(ActionEvent e) {
tree.setInvokesStopCellEditing(!tree.getInvokesStopCellEditing());
}
};
JXFrame frame = wrapWithScrollingInFrame(tree, "JXTree - date picker cell editor");
addAction(frame, action);
frame.add(new JTextField("yet another thing to focus"), BorderLayout.SOUTH);
show(frame);
}