java.awt.CardLayout.removeLayoutComponent()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(128)

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

CardLayout.removeLayoutComponent介绍

[英]Removes the specified component from the layout.
[中]从布局中删除指定的零部件。

代码示例

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
public void removeLayoutComponent(Component comp) {
  super.removeLayoutComponent(comp);
  String wasCard = cards.remove(comp);
  if(wasCard != null){
    comps.remove(wasCard);
  }
}

代码示例来源:origin: stackoverflow.com

// original cardPanel1 name is "card1"
 CardLayout lay = (CardLayout)parentPanel.getLayout();
 lay.removeLayoutComponent(cardPanel1);
 lay.addLayoutComponent(cardPanel1, "card4");
 // cardPanel1 can now be shown using "card4" name

代码示例来源:origin: Multibit-Legacy/multibit-hd

@Override
public void removeLayoutComponent(Component comp) {
 super.removeLayoutComponent(comp);
 if (!(comp instanceof JComponent)) return;
 JComponent component = (JComponent) comp;
 cards.remove(component);
 if (component.equals(firstCard)
  && cards.size() > 0) {
  firstCard = cards.get(0);
 }
 if (component.equals(lastCard)
  && cards.size() > 0) {
  lastCard = cards.get(cards.size() - 1);
 }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-terminal-nb

@Override
final protected void removeTabWork(JComponent comp) {
cardContainer.remove(comp);
cardLayout.removeLayoutComponent(comp);
components.remove(comp);
JComponent vc = figureVisibleComponent();
notify(vc);
}

代码示例来源:origin: org.orbisgis/toc

/**
 * Remove the given panel from the card layout and refresh the display.
 *
 * @param panel Panel
 */
public void legendRemoved(ISELegendPanel panel) {
  cardLayout.removeLayoutComponent(panel.getComponent());
  showDialogForCurrentlySelectedLegend();
}

相关文章