create CardsTablePanel as superclass for CardTablePanelA/B and DeckTablePanel.

master
lodici 2017-02-04 14:42:32 +00:00
parent 7da96d7399
commit 69a603477e
4 changed files with 11 additions and 6 deletions

View File

@ -16,12 +16,11 @@ import magic.data.GeneralConfig;
import magic.model.MagicCardDefinition;
import magic.ui.FontsAndBorders;
import magic.ui.widget.M.MScrollPane;
import magic.ui.widget.TexturedPanel;
import magic.ui.widget.TitleBar;
import net.miginfocom.swing.MigLayout;
@SuppressWarnings("serial")
public class CardTablePanelA extends TexturedPanel {
public class CardTablePanelA extends CardsTablePanel {
// fired when selection changes.
public static final String CP_CARD_SELECTED = "7f9bfa20-a363-4ce4-8491-8bfb219a808d";

View File

@ -19,12 +19,11 @@ import magic.model.MagicCardDefinition;
import magic.model.MagicRandom;
import magic.ui.FontsAndBorders;
import magic.ui.widget.M.MScrollPane;
import magic.ui.widget.TexturedPanel;
import magic.ui.widget.TitleBar;
import net.miginfocom.swing.MigLayout;
@SuppressWarnings("serial")
public class CardTablePanelB extends TexturedPanel
public class CardTablePanelB extends CardsTablePanel
implements ListSelectionListener {
private final MigLayout migLayout = new MigLayout();

View File

@ -0,0 +1,8 @@
package magic.ui.widget.cards.table;
import magic.ui.widget.TexturedPanel;
@SuppressWarnings("serial")
class CardsTablePanel extends TexturedPanel {
}

View File

@ -17,12 +17,11 @@ import magic.model.MagicCardDefinition;
import magic.model.MagicDeck;
import magic.ui.FontsAndBorders;
import magic.ui.widget.M.MScrollPane;
import magic.ui.widget.TexturedPanel;
import magic.ui.widget.TitleBar;
import net.miginfocom.swing.MigLayout;
@SuppressWarnings("serial")
public class DeckTablePanel extends TexturedPanel {
public class DeckTablePanel extends CardsTablePanel {
// fired when selection changes.
public static final String CP_CARD_SELECTED = "21b18a13-afbb-4d6a-9edc-3119653f4560";