org.netbeans.api.visual.widget.Widget.removeChild()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.netbeans.api.visual.widget.Widget.removeChild()方法的一些代码示例,展示了Widget.removeChild()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.removeChild()方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:removeChild

Widget.removeChild介绍

[英]Removes a child widget.
[中]删除子部件。

代码示例

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

/**
 * Removes all children widget that are in a specified list.
 * @param widgets the list of children widgets to be removed
 */
public final void removeChildren (List<Widget> widgets) {
  for (Widget widget : widgets)
    removeChild (widget);
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

/**
 * Removes the widget from its parent.
 */
public final void removeFromParent () {
  if (parentWidget != null)
    parentWidget.removeChild (this);
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

/**
 * Removes all children widget that are in a specified list.
 * @param widgets the list of children widgets to be removed
 */
public final void removeChildren (List<Widget> widgets) {
  for (Widget widget : widgets)
    removeChild (widget);
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

/**
 * Removes the widget from its parent.
 */
public final void removeFromParent () {
  if (parentWidget != null)
    parentWidget.removeChild (this);
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

/**
 * Removes all children widgets.
 */
public final void removeChildren () {
  while (! children.isEmpty ())
    removeChild (children.get (0));
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

/**
 * Removes all children widgets.
 */
public final void removeChildren () {
  while (! children.isEmpty ())
    removeChild (children.get (0));
}

代码示例来源: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: in.jlibs/org-netbeans-api-visual

private void cancel () {
  sourceWidget = null;
  targetWidget = null;
  startingPoint = null;
  connectionWidget.setSourceAnchor (null);
  connectionWidget.setTargetAnchor (null);
  interractionLayer.removeChild (connectionWidget);
  connectionWidget = null;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

private void cancel () {
  sourceWidget = null;
  targetWidget = null;
  startingPoint = null;
  connectionWidget.setSourceAnchor (null);
  connectionWidget.setTargetAnchor (null);
  interractionLayer.removeChild (connectionWidget);
  connectionWidget = null;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

public State mouseReleased (Widget widget, WidgetMouseEvent event) {
  if (selectionSceneRectangle != null) {
    move (widget, event.getPoint ());
    selectionWidget.getParentWidget ().removeChild (selectionWidget);
    provider.performSelection (selectionSceneRectangle);
    selectionWidget = null;
    selectionSceneRectangle = null;
  }
  return State.REJECTED;
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

public State mouseReleased (Widget widget, WidgetMouseEvent event) {
  if (selectionSceneRectangle != null) {
    move (widget, event.getPoint ());
    selectionWidget.getParentWidget ().removeChild (selectionWidget);
    provider.performSelection (selectionSceneRectangle);
    selectionWidget = null;
    selectionSceneRectangle = null;
  }
  return State.REJECTED;
}

相关文章