本文整理了Java中org.netbeans.api.visual.widget.Widget.addChild()
方法的一些代码示例,展示了Widget.addChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.addChild()
方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:addChild
[英]Adds a child at a specified index
[中]在指定索引处添加子级
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Adds a child widget as the last one.
* @param child the child widget to be added
*/
public final void addChild (Widget child) {
addChild (child, null);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Adds all children in a specified list.
* @param children the list of children widgets
*/
public final void addChildren (List<? extends Widget> children) {
for (Widget child : children)
addChild (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
*/
public final void addChild (int index, Widget child) {
addChild (index, child, null);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Adds all children in a specified list.
* @param children the list of children widgets
*/
public final void addChildren (List<? extends Widget> children) {
for (Widget child : children)
addChild (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
*/
public final void addChild (Widget child) {
addChild (child, null);
}
代码示例来源: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
*/
public final void addChild (int index, Widget child) {
addChild (index, child, null);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Sets an scrolled widget.
* @param view the scrolled widget
*/
public final void setView (Widget view) {
if (this.view != null)
viewport.removeChild (this.view);
this.view = view;
if (this.view != null)
viewport.addChild (this.view);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Sets an scrolled widget.
* @param view the scrolled widget
*/
public final void setView (Widget view) {
if (this.view != null)
viewport.removeChild (this.view);
this.view = view;
if (this.view != null)
viewport.addChild (this.view);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Sets an scrolled widget.
* @param view the scrolled widget
*/
public final void setView (Widget view) {
if (this.view != null)
viewport.removeChild (this.view);
this.view = view;
if (this.view != null)
viewport.addChild (this.view);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Sets an scrolled widget.
* @param view the scrolled widget
*/
public final void setView (Widget view) {
if (this.view != null)
viewport.removeChild (this.view);
this.view = view;
if (this.view != null)
viewport.addChild (this.view);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
protected State mousePressedCore (Widget widget, WidgetMouseEvent event) {
if (event.getButton () == MouseEvent.BUTTON1 && event.getClickCount () == 1) {
if (provider.isSourceWidget (widget)) {
sourceWidget = widget;
targetWidget = null;
startingPoint = new Point (event.getPoint ());
connectionWidget = decorator.createConnectionWidget (interractionLayer.getScene ());
assert connectionWidget != null;
connectionWidget.setSourceAnchor (decorator.createSourceAnchor (widget));
interractionLayer.addChild (connectionWidget);
return State.createLocked (widget, this);
}
}
return State.REJECTED;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
protected State mousePressedCore (Widget widget, WidgetMouseEvent event) {
if (event.getButton () == MouseEvent.BUTTON1 && event.getClickCount () == 1) {
if (provider.isSourceWidget (widget)) {
sourceWidget = widget;
targetWidget = null;
startingPoint = new Point (event.getPoint ());
connectionWidget = decorator.createConnectionWidget (interractionLayer.getScene ());
assert connectionWidget != null;
connectionWidget.setSourceAnchor (decorator.createSourceAnchor (widget));
interractionLayer.addChild (connectionWidget);
return State.createLocked (widget, this);
}
}
return State.REJECTED;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
minimizeWidget.getActions ().addAction (new ToggleMinimizedAction ());
if (! right)
header.addChild (minimizeWidget);
header.addChild (imageWidget);
header.addChild (nameWidget);
header.addChild (typeWidget);
header.addChild (glyphSetWidget);
header.addChild (widget, 1000);
header.addChild (minimizeWidget);
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
minimizeWidget.getActions ().addAction (new ToggleMinimizedAction ());
if (! right)
header.addChild (minimizeWidget);
header.addChild (imageWidget);
header.addChild (nameWidget);
header.addChild (typeWidget);
header.addChild (glyphSetWidget);
header.addChild (widget, 1000);
header.addChild (minimizeWidget);
代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-graph
final String value = nameSpaceManager.resolveURI(property.get().toString());
labelWidget.setLabel(name + " = " + value);
widget.addChild(labelWidget);
propertiesWidget.addChild(widget);
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Creates a list widget.
* @param scene the scene
*/
public ListWidget (Scene scene) {
super (scene);
GeomUtil.LOG.warning ("org.netbeans.api.visual.widget.general.ListWidget class is deprecated. Use org.netbeans.modules.visual.experimental.widget.general.ListWidget class instead. Since it is an experimental class outside of public-API packages, you have to set an implementation dependency on the org.netbeans.api.visual module."); // NOI18N
LookFeel lookFeel = scene.getLookFeel ();
setOpaque (true);
setBackground (lookFeel.getBackground ());
setBorder (BorderFactory.createLineBorder ());
setLayout (LayoutFactory.createVerticalFlowLayout ());
header = new Widget (scene);
header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
header.addChild (imageWidget = new ImageWidget (scene));
header.addChild (labelWidget = new LabelWidget (scene));
addChild (header);
addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
setState (ObjectState.createNormal ());
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Creates a list widget.
* @param scene the scene
*/
public ListWidget (Scene scene) {
super (scene);
GeomUtil.LOG.warning ("org.netbeans.api.visual.widget.general.ListWidget class is deprecated. Use org.netbeans.modules.visual.experimental.widget.general.ListWidget class instead. Since it is an experimental class outside of public-API packages, you have to set an implementation dependency on the org.netbeans.api.visual module."); // NOI18N
LookFeel lookFeel = scene.getLookFeel ();
setOpaque (true);
setBackground (lookFeel.getBackground ());
setBorder (BorderFactory.createLineBorder ());
setLayout (LayoutFactory.createVerticalFlowLayout ());
header = new Widget (scene);
header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
header.addChild (imageWidget = new ImageWidget (scene));
header.addChild (labelWidget = new LabelWidget (scene));
addChild (header);
addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
setState (ObjectState.createNormal ());
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Creates a list widget.
* @param scene the scene
*/
public ListWidget (Scene scene) {
super (scene);
LookFeel lookFeel = scene.getLookFeel ();
setOpaque (true);
setBackground (lookFeel.getBackground ());
setBorder (BorderFactory.createLineBorder ());
setLayout (LayoutFactory.createVerticalFlowLayout ());
header = new Widget (scene);
header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
header.addChild (imageWidget = new ImageWidget (scene));
header.addChild (labelWidget = new LabelWidget (scene));
addChild (header);
addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
setState (ObjectState.createNormal ());
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Creates a list widget.
* @param scene the scene
*/
public ListWidget (Scene scene) {
super (scene);
LookFeel lookFeel = scene.getLookFeel ();
setOpaque (true);
setBackground (lookFeel.getBackground ());
setBorder (BorderFactory.createLineBorder ());
setLayout (LayoutFactory.createVerticalFlowLayout ());
header = new Widget (scene);
header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
header.addChild (imageWidget = new ImageWidget (scene));
header.addChild (labelWidget = new LabelWidget (scene));
addChild (header);
addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
setState (ObjectState.createNormal ());
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation
imageWidget.getActions().addAction(connectAction);
imageWidget.getActions().addAction(createWidgetHoverAction());
header.addChild(imageWidget);
header.getActions().addAction(createWidgetHoverAction());
内容来源于网络,如有侵权,请联系作者删除!