Replace reference to JTable with CardsJTable.
parent
c1abec2727
commit
7da96d7399
|
@ -8,7 +8,6 @@ import java.util.List;
|
|||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTable;
|
||||
import magic.data.MagicIcon;
|
||||
import magic.model.MagicCardDefinition;
|
||||
import magic.model.MagicDeck;
|
||||
|
@ -17,6 +16,7 @@ import magic.ui.MagicImages;
|
|||
import magic.ui.MagicSound;
|
||||
import magic.ui.ScreenController;
|
||||
import magic.ui.screen.widget.ActionBarButton;
|
||||
import magic.ui.widget.cards.table.CardsJTable;
|
||||
import magic.ui.widget.cards.table.DeckTablePanel;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
|
@ -200,11 +200,11 @@ class DeckPanel extends JPanel implements IDeckEditorView {
|
|||
deckTablePanel.setSelectedCard(selectedCard);
|
||||
}
|
||||
|
||||
JTable getDeckTable() {
|
||||
CardsJTable getDeckTable() {
|
||||
return deckTablePanel.getDeckTable();
|
||||
}
|
||||
|
||||
void setDeckTable(final JTable aDeckTable) {
|
||||
void setDeckTable(CardsJTable aDeckTable) {
|
||||
deckTablePanel.setDeckTable(aDeckTable);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.awt.Component;
|
|||
import java.awt.event.ActionEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JToggleButton;
|
||||
import magic.data.GeneralConfig;
|
||||
import magic.data.stats.MagicStats;
|
||||
|
@ -15,6 +14,7 @@ import magic.ui.MagicSound;
|
|||
import magic.ui.ScreenController;
|
||||
import magic.ui.helpers.MouseHelper;
|
||||
import magic.ui.screen.deck.editor.stats.DeckStatsPanel;
|
||||
import magic.ui.widget.cards.table.CardsJTable;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
|
@ -42,7 +42,7 @@ class MainViewsPanel extends JPanel implements IDeckEditorListener {
|
|||
private final DeckStatsPanel statsPanel;
|
||||
|
||||
private IDeckEditorView activeView;
|
||||
private final JTable deckTable;
|
||||
private final CardsJTable deckTable;
|
||||
private final IDeckEditorListener listener;
|
||||
private JToggleButton statsToggleButton;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class DeckTablePanel extends TexturedPanel {
|
|||
private final MigLayout migLayout = new MigLayout();
|
||||
private final MScrollPane scrollpane = new MScrollPane();
|
||||
private final CardTableModel tableModel;
|
||||
private JTable table;
|
||||
private CardsJTable table;
|
||||
|
||||
private final TitleBar titleBar;
|
||||
private List<MagicCardDefinition> lastSelectedCards;
|
||||
|
@ -198,11 +198,11 @@ public class DeckTablePanel extends TexturedPanel {
|
|||
table.clearSelection();
|
||||
}
|
||||
|
||||
public JTable getDeckTable() {
|
||||
public CardsJTable getDeckTable() {
|
||||
return table;
|
||||
}
|
||||
|
||||
public void setDeckTable(JTable aDeckTable) {
|
||||
public void setDeckTable(CardsJTable aDeckTable) {
|
||||
this.table = aDeckTable;
|
||||
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); // ensures horizontal scrollbar is visible.
|
||||
scrollpane.setViewportView(table);
|
||||
|
|
Loading…
Reference in New Issue