com.google.gwt.user.client.ui.Panel.remove()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(123)

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

Panel.remove介绍

[英]Removes a child widget.

How to Override this Method

There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.

  1. Validate: Make sure this Panel is actually the parent of the child Widget; return false if it is not.
  2. Orphan: Call #orphan(Widget) first while the child Widget is still attached.
  3. Physical Detach: Adjust the DOM to account for the removal of the child Widget. The Widget's Element must be physically removed from the DOM.
  4. Logical Detach: Update the Panel's state variables to reflect the removal of the child Widget. Example: the Widget is removed from the Panel's WidgetCollection.
    [中]

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

public boolean remove(IsWidget child) {
 return remove(asWidgetOrNull(child));
}

代码示例来源:origin: kiegroup/appformer

@Override
public void removeColumnFilterEditor(ColumnFilterEditor editor) {
  filterListPanel.remove(editor);
}

代码示例来源:origin: org.dashbuilder/dashbuilder-displayer-client

@Override
public void removeColumnFilterEditor(ColumnFilterEditor editor) {
  filterListPanel.remove(editor);
}

代码示例来源:origin: org.dashbuilder/dashbuilder-displayer-client

@Override
public void removeColumnEditor(ColumnFunctionEditor editor) {
  columnsPanel.remove(editor);
}

代码示例来源:origin: kiegroup/appformer

@Override
public void removeColumnEditor(ColumnFunctionEditor editor) {
  columnsPanel.remove(editor);
}

代码示例来源:origin: nmorel/gflot

public void onRemoveSeries( PlotModel model, SeriesHandler handler )
{
  legendPanel.remove( legend.get( handler ) );
  legend.remove( handler );
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

public boolean remove(IsWidget child) {
 return remove(asWidgetOrNull(child));
}

代码示例来源:origin: net.wetheinter/gwt-user

public boolean remove(IsWidget child) {
 return remove(asWidgetOrNull(child));
}

代码示例来源:origin: com.googlecode.gwtupload/gwtupload

/**
 * Override the default progress widget with a customizable one.
 *
 * @param progress
 */
protected void setProgressWidget(Widget progress) {
 if (prg != null) {
  panel.remove(prg);
 }
 prg = progress;
 panel.add(prg);
 prg.setVisible(false);
 prg.addStyleName("prgbar");
}

代码示例来源:origin: com.googlecode.mgwt/mgwt

@Override
public boolean remove(Widget w) {
 children.remove(w);
 boolean remove = container.remove(w);
 if(w == firstChild) {
  firstChild.removeStyleName(this.appearance.css().formEntryFirstChild());
  firstChild = null;
  if(children.size() > 0) {
   firstChild = children.get(0);
   firstChild.addStyleName(this.appearance.css().formEntryFirstChild());
  }
 }
 if(w == lastChild) {
  lastChild.removeStyleName(this.appearance.css().formEntryLastChild());
  lastChild = null;
  if(children.size() > 0) {
   lastChild = children.get(children.size() - 1);
   lastChild.addStyleName(this.appearance.css().formEntryLastChild());
  }
 }
 return remove;
}

代码示例来源:origin: dankurka/mgwt

@Override
public boolean remove(Widget w) {
 children.remove(w);
 boolean remove = container.remove(w);
 if(w == firstChild) {
  firstChild.removeStyleName(this.appearance.css().formEntryFirstChild());
  firstChild = null;
  if(children.size() > 0) {
   firstChild = children.get(0);
   firstChild.addStyleName(this.appearance.css().formEntryFirstChild());
  }
 }
 if(w == lastChild) {
  lastChild.removeStyleName(this.appearance.css().formEntryLastChild());
  lastChild = null;
  if(children.size() > 0) {
   lastChild = children.get(children.size() - 1);
   lastChild.addStyleName(this.appearance.css().formEntryLastChild());
  }
 }
 return remove;
}

代码示例来源:origin: com.googlecode.gwtupload/gwtupload

/**
 * set the status widget used to display the upload progress.
 */
public void setStatusWidget(IUploadStatus stat) {
 if (stat == null) {
  return;
 }
 uploaderPanel.remove(statusWidget.asWidget());
 statusWidget = stat;
 if (!stat.asWidget().isAttached()) {
  uploaderPanel.add(statusWidget.asWidget());
 }
 statusWidget.asWidget().addStyleName(STYLE_STATUS);
 statusWidget.setVisible(false);
 statusWidget.addCancelHandler(cancelHandler);
 statusWidget.setStatusChangedHandler(statusChangedHandler);
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * @see Container#setLayout(GenericLayout)
 */
@Override
public void setLayout(GenericLayout rLayout)
{
  boolean bFullSize = getViewStyle().hasFlag(ViewStyle.Flag.FULL_SIZE);
  Widget  rWidget   = getWidget();
  Panel rRootPanel = bFullSize ? RootLayoutPanel.get() : RootPanel.get();
  if (rWidget != null)
  {
    rRootPanel.remove(rWidget);
  }
  super.setLayout(rLayout);
  setWidget(createWidget(StyleData.DEFAULT));
  rWidget = getWidget();
  setDefaultStyleName(GewtResources.INSTANCE.css().ewtMainView());
  rRootPanel.add(rWidget);
}

代码示例来源:origin: net.sf.advanced-gwt/advanced-gwt

getScrollPanel().remove(getBodyTable());
GWTUtil.adjustWidgetSize(getScrollPanel(), DOM.getParent(getScrollPanel().getElement()), isScrollable());
getScrollPanel().add(getBodyTable());

相关文章