mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Background for deck editor, the same as for table.
This commit is contained in:
parent
13e7826239
commit
fdfb7efa5f
6 changed files with 62 additions and 2 deletions
|
@ -70,6 +70,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener
|
|||
|
||||
public CardGrid() {
|
||||
initComponents();
|
||||
setOpaque(false);
|
||||
}
|
||||
|
||||
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) {
|
||||
|
|
|
@ -60,6 +60,9 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
|
|||
/** Creates new form Cards */
|
||||
public CardsList() {
|
||||
initComponents();
|
||||
jScrollPane1.setOpaque(false);
|
||||
cardArea.setOpaque(false);
|
||||
jScrollPane1.getViewport().setOpaque(false);
|
||||
}
|
||||
|
||||
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) {
|
||||
|
|
|
@ -67,6 +67,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
public CardSelector() {
|
||||
initComponents();
|
||||
this.addComponentListener(this);
|
||||
setOpaque(false);
|
||||
cardGrid.setOpaque(false);
|
||||
jScrollPane1.setOpaque(false);
|
||||
jScrollPane1.getViewport().setOpaque(false);
|
||||
}
|
||||
|
||||
public void loadCards(BigCard bigCard) {
|
||||
|
|
|
@ -46,6 +46,9 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
/** Creates new form DeckArea */
|
||||
public DeckArea() {
|
||||
initComponents();
|
||||
jSplitPane1.setOpaque(false);
|
||||
deckList.setOpaque(false);
|
||||
sideboardList.setOpaque(false);
|
||||
}
|
||||
|
||||
public CardsList getDeckList() {
|
||||
|
|
|
@ -34,7 +34,14 @@
|
|||
|
||||
package mage.client.deckeditor;
|
||||
|
||||
import mage.client.*;
|
||||
import java.awt.Component;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
|
||||
import mage.client.MagePane;
|
||||
import mage.client.plugins.impl.Plugins;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,7 +51,23 @@ public class DeckEditorPane extends MagePane {
|
|||
|
||||
/** Creates new form TablesPane */
|
||||
public DeckEditorPane() {
|
||||
initComponents();
|
||||
|
||||
boolean initialized = false;
|
||||
if (Plugins.getInstance().isThemePluginLoaded()) {
|
||||
Map<String, JComponent> ui = new HashMap<String, JComponent>();
|
||||
JComponent container = Plugins.getInstance().updateTablePanel(ui);
|
||||
if (container != null) {
|
||||
deckEditorPanel1 = new mage.client.deckeditor.DeckEditorPanel();
|
||||
initComponents(container);
|
||||
container.add(deckEditorPanel1);
|
||||
container.setOpaque(false);
|
||||
deckEditorPanel1.setOpaque(false);
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
if (!initialized) {
|
||||
initComponents();
|
||||
}
|
||||
}
|
||||
|
||||
public void showTables() {
|
||||
|
@ -78,6 +101,21 @@ public class DeckEditorPane extends MagePane {
|
|||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void initComponents(Component container) {
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
pack();
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private mage.client.deckeditor.DeckEditorPanel deckEditorPanel1;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
package mage.client.deckeditor;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Cursor;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -41,15 +42,21 @@ import java.lang.reflect.Constructor;
|
|||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import javax.swing.plaf.ColorUIResource;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.util.Event;
|
||||
import mage.client.util.Listener;
|
||||
import mage.client.util.gui.DividerColorUtill;
|
||||
import mage.game.GameException;
|
||||
import mage.view.CardsView;
|
||||
|
||||
|
@ -72,6 +79,10 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
fcImportDeck = new JFileChooser();
|
||||
fcImportDeck.setAcceptAllFileFilterUsed(false);
|
||||
fcImportDeck.addChoosableFileFilter(new ImportFilter());
|
||||
|
||||
deckArea.setOpaque(false);
|
||||
jPanel1.setOpaque(false);
|
||||
jSplitPane1.setOpaque(false);
|
||||
}
|
||||
|
||||
public void showDeckEditor() {
|
||||
|
|
Loading…
Reference in a new issue