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; }
public void cleanUp() { // Remove all of the cards from us for (MageCard cardView : cardViews.values()) { cardContent.remove(cardView); } // Clear out our tracking of stuff cardGrid.clear(); maxStackSize.clear(); allCards.clear(); lastBigCard = null; clearCardEventListeners(); }
@Override protected void end() { animationPanel.setVisible(false); animationPanel.repaint(); EventQueue.invokeLater(() -> layeredPane.remove(animationPanel)); } };
public void cleanUp() { for (Component comp : cardArea.getComponents()) { if (comp instanceof CardPanel) { ((CardPanel) comp).cleanUp(); cardArea.remove(comp); } } }
private void removeCardView(CardView card) { allCards.remove(card); // Remove fromcounts for (CardTypeCounter counter : allCounters) { counter.remove(card); } updateCounts(); cardContent.remove(cardViews.get(card.getId())); cardViews.remove(card.getId()); }
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; } } } }
cardArea.remove(card);
private void removeView() { if (this.component != null) { layeredPane.remove(this.component); this.component = null; } }
public final void removeDecoration(String id) { if (decorations.containsKey(id)) { Component comp = decorations.remove(id); super.remove(comp); } }
public final void removeDecorations() { for (Component c : decorations.values()) { super.remove(c); } decorations.clear(); }
/** * Hides this dialog and removes it from its parent. */ public void dismissDialog () { setVisible(false); _parent.remove(this); }
protected void setMapComponent(Component comp){ if(mapComponent != null){ mapDecorationPane.remove(mapComponent); } mapComponent = comp; mapDecorationPane.add(mapComponent, new Integer(0)); mapDecorationPane.revalidate(); }
private void removeFromRootPane() { JRootPane rp = getRootPane(); if (rp != null) { rp.getLayeredPane().remove(this); } }
public void setJMenuBar(JMenuBar menu) { if(menuBar != null && menuBar.getParent() == scrollableBar) layeredPane.remove(scrollableBar); menuBar = menu; if(menuBar != null) { scrollableBar = new ScrollableBar(menu); layeredPane.add(scrollableBar, JLayeredPane.FRAME_CONTENT_LAYER); } }
public void removeDecoration(MapDecoration deco) { if (deco != null && userDecorations.contains(deco)) { deco.setMap2D(null); deco.dispose(); userDecorations.remove(deco); userDecorationPane.remove(deco.geComponent()); userDecorationPane.revalidate(); userDecorationPane.repaint(); } }
protected void onFinishAnimation() { switch (getAnimationDirection()) { case INCOMING: sheet.setBounds(bounds); break; case OUTGOING: layeredPane.remove(sheet); sheet.setBorder(null); sheet.removeAll(); break; } }
private void showNextComponent() { Component component = components.get(components.size() - 1); Integer modalDepth = depths.get(component); rootPane.getLayeredPane().remove(getModalPanel()); rootPane.getLayeredPane().add(getModalPanel(), modalDepth); getModalPanel().add("", component); getModalPanel().revalidate(); getModalPanel().repaint(); }