本文整理了Java中org.netbeans.api.visual.widget.Widget.setChildConstraint()
方法的一些代码示例,展示了Widget.setChildConstraint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.setChildConstraint()
方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:setChildConstraint
[英]Assigns a constraint to a child widget.
[中]将约束指定给子小部件。
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Adds a child widget as the last one.
* @param child the child widget to be added
* @param constraint the constraint assigned to the child widget
*/
public final void addChild (Widget child, Object constraint) {
assert child.parentWidget == null;
Widget widget = this;
while (widget != null) {
assert widget != child;
widget = widget.parentWidget;
}
children.add(child);
child.parentWidget = this;
setChildConstraint (child, constraint);
child.updateResources(this, true);
child.revalidate();
revalidate ();
scene.dispatchNotifyAdded (child);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Adds a child widget as the last one.
* @param child the child widget to be added
* @param constraint the constraint assigned to the child widget
*/
public final void addChild (Widget child, Object constraint) {
assert child.parentWidget == null;
Widget widget = this;
while (widget != null) {
assert widget != child;
widget = widget.parentWidget;
}
children.add(child);
child.parentWidget = this;
setChildConstraint (child, constraint);
child.updateResources(this, true);
child.revalidate();
revalidate ();
scene.dispatchNotifyAdded (child);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Removes a child widget.
* @param child the child widget
*/
public final void removeChild (Widget child) {
assert child.parentWidget == this;
setChildConstraint (child, null);
child.parentWidget = null;
children.remove (child);
child.updateResources(this, false);
child.revalidate ();
revalidate ();
if (accessibleContext != null && accessibleContext instanceof WidgetAccessibleContext)
((WidgetAccessibleContext) accessibleContext).notifyChildRemoved (this, child);
scene.dispatchNotifyRemoved (child);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Removes a child widget.
* @param child the child widget
*/
public final void removeChild (Widget child) {
assert child.parentWidget == this;
setChildConstraint (child, null);
child.parentWidget = null;
children.remove (child);
child.updateResources(this, false);
child.revalidate ();
revalidate ();
if (accessibleContext != null && accessibleContext instanceof WidgetAccessibleContext)
((WidgetAccessibleContext) accessibleContext).notifyChildRemoved (this, child);
scene.dispatchNotifyRemoved (child);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Adds a child at a specified index
* @param index the index (the child is added before the one that is not the index place)
* @param child the child widget
* @param constraint the constraint assigned to the child widget
*/
public final void addChild (int index, Widget child, Object constraint) {
assert child.parentWidget == null;
children.add (index, child);
child.parentWidget = this;
setChildConstraint (child, constraint);
child.updateResources(this, true);
child.revalidate ();
revalidate ();
if (accessibleContext != null && accessibleContext instanceof WidgetAccessibleContext)
((WidgetAccessibleContext) accessibleContext).notifyChildAdded (this, child);
scene.dispatchNotifyAdded (child);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Adds a child at a specified index
* @param index the index (the child is added before the one that is not the index place)
* @param child the child widget
* @param constraint the constraint assigned to the child widget
*/
public final void addChild (int index, Widget child, Object constraint) {
assert child.parentWidget == null;
children.add (index, child);
child.parentWidget = this;
setChildConstraint (child, constraint);
child.updateResources(this, true);
child.revalidate ();
revalidate ();
if (accessibleContext != null && accessibleContext instanceof WidgetAccessibleContext)
((WidgetAccessibleContext) accessibleContext).notifyChildAdded (this, child);
scene.dispatchNotifyAdded (child);
}
内容来源于网络,如有侵权,请联系作者删除!