本文整理了Java中javax.swing.JTree.getClientProperty()
方法的一些代码示例,展示了JTree.getClientProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.getClientProperty()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:getClientProperty
暂无
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
/**
* Checks whether the specified tree component has automatic drag and drop
* support.
*
* @param tree
* Tree component.
* @return <code>true</code> if the specified text component has automatic
* drag and drop support, <code>false</code> otherwise.
*/
public static boolean hasAutomaticDnDSupport(JTree tree) {
Object dndProperty = tree
.getClientProperty(LafWidget.TREE_AUTO_DND_SUPPORT);
if (Boolean.TRUE.equals(dndProperty))
return true;
if (Boolean.FALSE.equals(dndProperty))
return false;
return (Boolean.TRUE.equals(UIManager
.get(LafWidget.TREE_AUTO_DND_SUPPORT)));
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-base-swing
/**
* Remove listener, if any.
*/
public void dispose()
{
if(cmslistener!=null)
{
CMSUpdateHandler cmshandler = (CMSUpdateHandler)getTree().getClientProperty(CMSUpdateHandler.class);
cmshandler.removeCMSListener(listenercid, cmslistener);
}
}
}
代码示例来源:origin: de.sciss/jtreetable
NimbusRenderer() {
current = (UIDefaults)tree.getClientProperty("Nimbus.Overrides");
rowSelection = current;
rowSelection.put(collapsed, UIManager.get(collapsed));
rowSelection.put(expanded, UIManager.get(expanded));
rowSelection.put(collapsedSelected, UIManager.get(collapsedSelected));
rowSelection.put(expandedSelected, UIManager.get(expandedSelected));
}
代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui
/**
* Test if a tree node is expanded or should be.
*/
public static boolean isTreeExpanded(JTree tree, TreePath path)
{
boolean ret = tree.isExpanded(path);
if(!ret)
{
List tehs = (List)tree.getClientProperty(TreeExpansionHandler.class);
for(int i=0; !ret && tehs!=null && i<tehs.size(); i++)
{
TreeExpansionHandler teh = (TreeExpansionHandler)tehs.get(i);
ret = teh.isExpanded(path);
}
}
return ret;
}
}
代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui
/**
* Create a tree expansion handler for a given tree.
*/
public TreeExpansionHandler(JTree tree)
{
this.tree = tree;
this.expanded = new HashSet();
tree.addTreeExpansionListener(this);
tree.getModel().addTreeModelListener(this);
List tehs = (List)tree.getClientProperty(TreeExpansionHandler.class);
if(tehs==null)
{
tehs = new ArrayList();
tree.putClientProperty(TreeExpansionHandler.class, tehs);
}
tehs.add(this);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public void treeExpanded(TreeExpansionEvent event) {
if (internalChange || Boolean.TRUE.equals(tree.getClientProperty(PROP_EXPANSION_TRANSACTION))) { // NOI18N
return;
}
// Auto expand more if the just expanded child has only one child
TreePath path = event.getPath();
JTree tree = (JTree) event.getSource();
internalChange = true;
autoExpand(tree, path, MAX_TREE_AUTOEXPAND_LINES, maxChildToExpand, dontExpandToLeafs);
internalChange = false;
}
});
代码示例来源:origin: org.netbeans.api/org-openide-explorer
private void change() {
ViewTooltips vtt = (ViewTooltips) (tree != null ?
tree.getClientProperty(KEY) : list.getClientProperty(KEY));
if (vtt != null) {
vtt.hide();
}
detach();
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-base-swing
/**
* Dispose the tree.
* Should be called to remove listeners etc.
*/
public void dispose()
{
PropertyUpdateHandler prophandler = (PropertyUpdateHandler)tree.getClientProperty(PropertyUpdateHandler.class);
if(prophandler!=null)
{
prophandler.removePropertyCommand(propcmd);
}
getModel().dispose();
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-base-swing
CMSUpdateHandler cmshandler = (CMSUpdateHandler)getTree().getClientProperty(CMSUpdateHandler.class);
this.listenercid = cid;
this.cmslistener = new ICMSComponentListener()
内容来源于网络,如有侵权,请联系作者删除!