本文整理了Java中javax.swing.JTree.addComponentListener()
方法的一些代码示例,展示了JTree.addComponentListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.addComponentListener()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:addComponentListener
暂无
代码示例来源:origin: org.nuiton/nuiton-widgets
/**
* Enable data tips for a tree component.
* @param tree the tree which should be enhanced with data tips.
*/
public synchronized void register(JTree tree) {
tree.addMouseListener(treeMouseListener);
tree.addMouseMotionListener(treeMouseListener);
tree.addComponentListener(treeMouseListener);
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra
/**
* Enable data tips for a tree component.
*
* @param tree the tree which should be enhanced with data tips.
*/
public synchronized void register(JTree tree) {
tree.addMouseListener(treeMouseListener);
tree.addMouseMotionListener(treeMouseListener);
tree.addComponentListener(treeMouseListener);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
private void attach() {
if (tree != null) {
tree.getModel().addTreeModelListener(this);
tree.getSelectionModel().addTreeSelectionListener(this);
tree.addHierarchyBoundsListener(this);
tree.addHierarchyListener(this);
tree.addComponentListener(this);
} else {
list.getSelectionModel().addListSelectionListener(this);
list.getModel().addListDataListener(this);
list.addHierarchyBoundsListener(this);
list.addHierarchyListener(this);
list.addComponentListener(this);
}
pane.getHorizontalScrollBar().getModel().addChangeListener(this);
pane.getVerticalScrollBar().getModel().addChangeListener(this);
KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(this);
}
代码示例来源:origin: jpcsp/jpcsp
private void attach() {
if (tree != null) {
tree.getModel().addTreeModelListener(this);
tree.getSelectionModel().addTreeSelectionListener(this);
tree.addHierarchyBoundsListener(this);
tree.addHierarchyListener(this);
tree.addComponentListener(this);
} else {
list.getSelectionModel().addListSelectionListener(this);
list.getModel().addListDataListener(this);
list.addHierarchyBoundsListener(this);
list.addHierarchyListener(this);
list.addComponentListener(this);
}
if(null!=pane.getHorizontalScrollBar())
{
pane.getHorizontalScrollBar().getModel().addChangeListener(this);
}
if(null!=pane.getVerticalScrollBar())
{
pane.getVerticalScrollBar().getModel().addChangeListener(this);
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(this);
}
代码示例来源:origin: org.orbisgis/mapeditor
/**
* Notifies this component that it now has a parent component. When this
* method is invoked, the chain of parent components is set up with
* KeyboardAction event listeners.
*/
@Override
public void addNotify() {
super.addNotify();
if (!initialised.getAndSet(true)) {
addComponentListener(sizeListener);
// Read the default map context file
initMapContext();
//Register listener
dragDropHandler.getTransferEditableEvent().addListener(this, EventHandler.create(EditableTransferListener.class, this, "onDropEditable", "editableList"));
mapControl.addMouseMotionListener(EventHandler.create(MouseMotionListener.class, this, "onMouseMove", "point", "mouseMoved"));
mapStatusBar.addVetoableChangeListener(
MapStatusBar.PROP_USER_DEFINED_SCALE_DENOMINATOR,
EventHandler.create(VetoableChangeListener.class, this,
"onUserSetScaleDenominator", ""));
// When the tree is expanded update the manager size
mapsManager.getTree().addComponentListener(sizeListener);
mapsManager.getTree().addTreeExpansionListener(EventHandler.create(TreeExpansionListener.class,this,"updateMapControlSize"));
}
}
内容来源于网络,如有侵权,请联系作者删除!