javax.swing.JLayeredPane.getComponents()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(156)

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

JLayeredPane.getComponents介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

public void changeGUISize() {
  setGUISize();
  for (Component component : cardArea.getComponents()) {
    if (component instanceof CardPanel) {
      component.setBounds(0, 0, cardDimension.width, cardDimension.height);
    }
  }
}

代码示例来源:origin: magefree/mage

public void cleanUp() {
  for (Component c : this.jPanel.getComponents()) {
    if (c instanceof Permanent || c instanceof MagePermanent) {
      this.jPanel.remove(c);
    }
  }
  permanents.clear();
  // Plugins.getInstance().sortPermanents(uiComponentsList, permanents.values());
  this.bigCard = null;
}

代码示例来源:origin: magefree/mage

public void setPopupMenu(JPopupMenu popupMenu) {
  for (Component component : cardArea.getComponents()) {
    if (component instanceof MageCard) {
      MageCard mageCard = (MageCard) component;
      mageCard.setPopupMenu(popupMenu);
    }
  }
}

代码示例来源:origin: magefree/mage

public void cleanUp() {
  for (Component comp : cardArea.getComponents()) {
    if (comp instanceof CardPanel) {
      ((CardPanel) comp).cleanUp();
      cardArea.remove(comp);
    }
  }
}

代码示例来源:origin: magefree/mage

public void selectCards(List<UUID> selected) {
  for (Component component : cardArea.getComponents()) {
    if (component instanceof MageCard) {
      MageCard mageCard = (MageCard) component;
      if (selected.contains(mageCard.getOriginal().getId())) {
        mageCard.setSelected(true);
      }
    }
  }
}

代码示例来源:origin: magefree/mage

public void markCards(List<UUID> marked) {
  for (Component component : cardArea.getComponents()) {
    if (component instanceof MageCard) {
      MageCard mageCard = (MageCard) component;
      if (marked.contains(mageCard.getOriginal().getId())) {
        mageCard.setChoosable(true);
      }
    }
  }
}

代码示例来源:origin: magefree/mage

private void removePermanent(UUID permanentId, final int count) {
  for (Component c : this.jPanel.getComponents()) {
    final Component comp = c;
    if (comp instanceof Permanent) {
      if (((Permanent) comp).getPermanentId().equals(permanentId)) {
        comp.setVisible(false);
        this.jPanel.remove(comp);
      }
    } else if (comp instanceof MagePermanent) {
      if (((MagePermanent) comp).getOriginal().getId().equals(permanentId)) {
        Thread t = new Thread(() -> {
          Plugins.instance.onRemoveCard((MagePermanent) comp, count);
          comp.setVisible(false);
          BattlefieldPanel.this.jPanel.remove(comp);
        });
        t.start();
      }
      if (((MagePermanent) comp).getOriginal().isCreature()) {
        removedCreature = true;
      }
    }
  }
}

代码示例来源:origin: magefree/mage

currentView.clearCardEventListeners();
for (Component comp : cardArea.getComponents()) {
  if (comp instanceof CardPanel) {
    ((CardPanel) comp).cleanUp();

代码示例来源:origin: edu.toronto.cs.medsavant/mfiume-component-transition

private void rebound() {
  for (Component c : layers.getComponents()) {
    c.setBounds(layers.getBounds());
  }
  this.updateUI();
}

代码示例来源:origin: eu.limetri.client/mapviewer-nb-swing

/**
 * internal method to remove a layerpanel. Only call from the AWT thread.
 *
 * @param layerPanel
 */
private void internalRemoveLayerPanel(final LayerPanel layerPanel) {
  if (this.layerPanels.contains(layerPanel)) {
    this.layerPanels.remove(layerPanel);
  }
  for (Component c : layerPanelContainer.getComponents()) {
    if (c.equals(layerPanel)) {
      layerPanelContainer.remove(layerPanel);
    }
  }
  mouseHandler.removeMapMouseListener(layerPanel);
  getMapViewer().repaint();
}

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

Component[] components = layeredPane.getComponents();

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

for( Component cLayerPanel : cLayerPanels.getComponents() )

相关文章