本文整理了Java中org.netbeans.api.visual.widget.Widget.addDependency()
方法的一些代码示例,展示了Widget.addDependency()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.addDependency()
方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:addDependency
[英]Adds a dependency listener which is notified when the widget placement or boundary is going to be changed or similar thing happens to its parent widget.
[中]添加一个依赖侦听器,当小部件的位置或边界将要更改或其父小部件发生类似情况时,该侦听器会收到通知。
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Called by ConnectionWidget to register the usage of the anchor.
* @param entry the anchor entry
*/
public final void addEntry (Anchor.Entry entry) {
if (entry == null)
return;
notifyEntryAdded (entry);
entries.add (entry);
if (! attachedToWidget && entries.size () > 0) {
attachedToWidget = true;
if (relatedWidget != null)
relatedWidget.addDependency (this);
notifyUsed ();
}
revalidateDependency ();
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Called by ConnectionWidget to register the usage of the anchor.
* @param entry the anchor entry
*/
public final void addEntry (Anchor.Entry entry) {
if (entry == null)
return;
notifyEntryAdded (entry);
entries.add (entry);
if (! attachedToWidget && entries.size () > 0) {
attachedToWidget = true;
if (relatedWidget != null)
relatedWidget.addDependency (this);
notifyUsed ();
}
revalidateDependency ();
}
内容来源于网络,如有侵权,请联系作者删除!