mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Removed parent view accessors in home UI in favor of singleton access.
This commit is contained in:
@@ -322,7 +322,7 @@ public class ControlQuest {
|
|||||||
qPrefs.setPreference(QPref.CURRENT_QUEST, questName + ".dat");
|
qPrefs.setPreference(QPref.CURRENT_QUEST, questName + ".dat");
|
||||||
Singletons.getModel().getQuestPreferences().save();
|
Singletons.getModel().getQuestPreferences().save();
|
||||||
|
|
||||||
view.getParentView().resetQuest();
|
Singletons.getView().getViewHome().resetQuest();
|
||||||
} // New Quest
|
} // New Quest
|
||||||
|
|
||||||
private void changeQuest() {
|
private void changeQuest() {
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public class ControlSettings {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
Singletons.getModel().getPreferences().reset();
|
Singletons.getModel().getPreferences().reset();
|
||||||
view.getParentView().resetSettings();
|
Singletons.getView().getViewHome().resetSettings();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,12 +74,12 @@ public class ViewHomeUI extends FPanel {
|
|||||||
public ViewHomeUI() {
|
public ViewHomeUI() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
constructed = new ViewConstructed(this);
|
constructed = new ViewConstructed();
|
||||||
sealed = new ViewSealed(this);
|
sealed = new ViewSealed();
|
||||||
draft = new ViewDraft(this);
|
draft = new ViewDraft();
|
||||||
quest = new ViewQuest(this);
|
quest = new ViewQuest();
|
||||||
settings = new ViewSettings(this);
|
settings = new ViewSettings();
|
||||||
utilities = new ViewUtilities(this);
|
utilities = new ViewUtilities();
|
||||||
|
|
||||||
this.setCornerDiameter(0);
|
this.setCornerDiameter(0);
|
||||||
this.setBorderToggle(false);
|
this.setBorderToggle(false);
|
||||||
@@ -294,33 +294,38 @@ public class ViewHomeUI extends FPanel {
|
|||||||
|
|
||||||
/** @return {@link forge.view.home.ViewConstructed} */
|
/** @return {@link forge.view.home.ViewConstructed} */
|
||||||
public ViewConstructed getViewConstructed() {
|
public ViewConstructed getViewConstructed() {
|
||||||
return constructed;
|
return this.constructed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.home.ViewDraft} */
|
/** @return {@link forge.view.home.ViewDraft} */
|
||||||
public ViewDraft getViewDraft() {
|
public ViewDraft getViewDraft() {
|
||||||
return draft;
|
return this.draft;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.home.ViewSealed} */
|
/** @return {@link forge.view.home.ViewSealed} */
|
||||||
public ViewSealed getViewSealed() {
|
public ViewSealed getViewSealed() {
|
||||||
return sealed;
|
return this.sealed;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return {@link forge.view.home.ViewSettings} */
|
||||||
|
public ViewSettings getViewSettings() {
|
||||||
|
return this.settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.home.ViewUtilities} */
|
/** @return {@link forge.view.home.ViewUtilities} */
|
||||||
public ViewUtilities getViewUtilities() {
|
public ViewUtilities getViewUtilities() {
|
||||||
return utilities;
|
return this.utilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
public void resetQuest() {
|
public void resetQuest() {
|
||||||
quest = new ViewQuest(this);
|
quest = new ViewQuest();
|
||||||
showQuestMenu();
|
showQuestMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
public void resetSettings() {
|
public void resetSettings() {
|
||||||
settings = new ViewSettings(this);
|
settings = new ViewSettings();
|
||||||
showSettingsMenu();
|
showSettingsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package forge.view.home;
|
|||||||
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
|
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.FSkin;
|
import forge.view.toolbox.FSkin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,10 +10,8 @@ import forge.view.toolbox.FSkin;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class StartButton extends JButton {
|
public class StartButton extends JButton {
|
||||||
/**
|
/** */
|
||||||
* @param v0   ViewHomeUI
|
public StartButton() {
|
||||||
*/
|
|
||||||
public StartButton(ViewHomeUI v0) {
|
|
||||||
super();
|
super();
|
||||||
setRolloverEnabled(true);
|
setRolloverEnabled(true);
|
||||||
setRolloverIcon(FSkin.getIcon(FSkin.ButtonImages.IMG_BTN_START_OVER));
|
setRolloverIcon(FSkin.getIcon(FSkin.ButtonImages.IMG_BTN_START_OVER));
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import javax.swing.JScrollPane;
|
|||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.control.home.ControlConstructed;
|
import forge.control.home.ControlConstructed;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.FCheckBox;
|
import forge.view.toolbox.FCheckBox;
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
import forge.view.toolbox.FProgressBar;
|
import forge.view.toolbox.FProgressBar;
|
||||||
@@ -19,8 +18,7 @@ import forge.view.toolbox.FSkin;
|
|||||||
import forge.view.toolbox.SubTab;
|
import forge.view.toolbox.SubTab;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Write javadoc for this type.
|
* Assembles swing components for "Draft" mode menu.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewConstructed extends JPanel {
|
public class ViewConstructed extends JPanel {
|
||||||
@@ -32,12 +30,8 @@ public class ViewConstructed extends JPanel {
|
|||||||
private final FProgressBar barProgress;
|
private final FProgressBar barProgress;
|
||||||
private ControlConstructed control;
|
private ControlConstructed control;
|
||||||
|
|
||||||
/**
|
/** Assembles swing components for "Constructed" mode menu. */
|
||||||
*
|
public ViewConstructed() {
|
||||||
* TODO: Write javadoc for Constructor.
|
|
||||||
* @param v0   {@link forge.view.ViewHomeUI}
|
|
||||||
*/
|
|
||||||
public ViewConstructed(ViewHomeUI v0) {
|
|
||||||
// Instantiation
|
// Instantiation
|
||||||
pnlTabber = new JPanel();
|
pnlTabber = new JPanel();
|
||||||
pnlStart = new JPanel();
|
pnlStart = new JPanel();
|
||||||
@@ -55,7 +49,7 @@ public class ViewConstructed extends JPanel {
|
|||||||
cbSingletons = new FCheckBox("Singleton Mode");
|
cbSingletons = new FCheckBox("Singleton Mode");
|
||||||
cbArtifacts = new FCheckBox("Remove Artifacts");
|
cbArtifacts = new FCheckBox("Remove Artifacts");
|
||||||
cbRemoveSmall = new FCheckBox("Remove Small Creatures");
|
cbRemoveSmall = new FCheckBox("Remove Small Creatures");
|
||||||
btnStart = new StartButton(v0);
|
btnStart = new StartButton();
|
||||||
barProgress = new FProgressBar();
|
barProgress = new FProgressBar();
|
||||||
|
|
||||||
// Population
|
// Population
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import forge.Command;
|
|||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.control.home.ControlDraft;
|
import forge.control.home.ControlDraft;
|
||||||
import forge.game.GameType;
|
import forge.game.GameType;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.DeckLister;
|
import forge.view.toolbox.DeckLister;
|
||||||
import forge.view.toolbox.FButton;
|
import forge.view.toolbox.FButton;
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
@@ -37,7 +36,6 @@ import forge.view.toolbox.FSkin;
|
|||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewDraft extends JPanel {
|
public class ViewDraft extends JPanel {
|
||||||
private final ControlDraft control;
|
private final ControlDraft control;
|
||||||
private final ViewHomeUI parentView;
|
|
||||||
private final JList lstAI;
|
private final JList lstAI;
|
||||||
private final FProgressBar barProgress;
|
private final FProgressBar barProgress;
|
||||||
private final DeckLister lstHumanDecks;
|
private final DeckLister lstHumanDecks;
|
||||||
@@ -104,13 +102,9 @@ public class ViewDraft extends JPanel {
|
|||||||
+ "\r\n\r\n"
|
+ "\r\n\r\n"
|
||||||
+ "(Credit: Wikipedia <http://en.wikipedia.org/wiki/Magic:_The_Gathering_formats#Booster_Draft>)";
|
+ "(Credit: Wikipedia <http://en.wikipedia.org/wiki/Magic:_The_Gathering_formats#Booster_Draft>)";
|
||||||
|
|
||||||
/**
|
/** Assembles swing components for "Draft" mode menu. */
|
||||||
* Assembles swing components for "Draft" mode menu.
|
public ViewDraft() {
|
||||||
* @param v0 (ViewHomeUI, parent view)
|
|
||||||
*/
|
|
||||||
public ViewDraft(ViewHomeUI v0) {
|
|
||||||
super();
|
super();
|
||||||
this.parentView = v0;
|
|
||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
this.setLayout(new MigLayout("insets 0, gap 0, hidemode 2"));
|
this.setLayout(new MigLayout("insets 0, gap 0, hidemode 2"));
|
||||||
|
|
||||||
@@ -181,7 +175,7 @@ public class ViewDraft extends JPanel {
|
|||||||
lblDirections.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
lblDirections.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||||
this.add(lblDirections, "alignx center, span 2 1, gap 5% 5% 5% 2%, wrap");
|
this.add(lblDirections, "alignx center, span 2 1, gap 5% 5% 5% 2%, wrap");
|
||||||
|
|
||||||
btnStart = new StartButton(parentView);
|
btnStart = new StartButton();
|
||||||
this.add(btnStart, "gap 5% 5% 0 0, ax center, span 2 1, wrap");
|
this.add(btnStart, "gap 5% 5% 0 0, ax center, span 2 1, wrap");
|
||||||
|
|
||||||
barProgress = new FProgressBar();
|
barProgress = new FProgressBar();
|
||||||
@@ -216,11 +210,6 @@ public class ViewDraft extends JPanel {
|
|||||||
Singletons.getView().getOverlay().showOverlay();
|
Singletons.getView().getOverlay().showOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return ViewHomeUI */
|
|
||||||
public ViewHomeUI getParentView() {
|
|
||||||
return parentView;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return JList */
|
/** @return JList */
|
||||||
public DeckLister getLstHumanDecks() {
|
public DeckLister getLstHumanDecks() {
|
||||||
return lstHumanDecks;
|
return lstHumanDecks;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import javax.swing.border.MatteBorder;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
|
import forge.Singletons;
|
||||||
import forge.control.home.ControlQuest;
|
import forge.control.home.ControlQuest;
|
||||||
import forge.game.GameType;
|
import forge.game.GameType;
|
||||||
import forge.properties.ForgeProps;
|
import forge.properties.ForgeProps;
|
||||||
@@ -26,7 +27,6 @@ import forge.properties.NewConstants;
|
|||||||
import forge.quest.data.QuestChallenge;
|
import forge.quest.data.QuestChallenge;
|
||||||
import forge.quest.data.QuestDuel;
|
import forge.quest.data.QuestDuel;
|
||||||
import forge.quest.data.QuestEvent;
|
import forge.quest.data.QuestEvent;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.DeckLister;
|
import forge.view.toolbox.DeckLister;
|
||||||
import forge.view.toolbox.FCheckBox;
|
import forge.view.toolbox.FCheckBox;
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
@@ -44,7 +44,6 @@ import forge.view.toolbox.SubTab;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewQuest extends JScrollPane {
|
public class ViewQuest extends JScrollPane {
|
||||||
private final ViewHomeUI parentView;
|
|
||||||
private final ControlQuest control;
|
private final ControlQuest control;
|
||||||
private final String eventPanelConstraints;
|
private final String eventPanelConstraints;
|
||||||
private final Color clrBorders;
|
private final Color clrBorders;
|
||||||
@@ -67,12 +66,8 @@ public class ViewQuest extends JScrollPane {
|
|||||||
private QuestFileLister lstQuests;
|
private QuestFileLister lstQuests;
|
||||||
private final FProgressBar barProgress;
|
private final FProgressBar barProgress;
|
||||||
|
|
||||||
/**
|
/** Assembles swing components for "Quest" mode menu. */
|
||||||
* Populates Swing components of Quest mode in home screen.
|
public ViewQuest() {
|
||||||
*
|
|
||||||
* @param v0   {@link forge.view.ViewHomeUI} parent view
|
|
||||||
*/
|
|
||||||
public ViewQuest(final ViewHomeUI v0) {
|
|
||||||
// Display
|
// Display
|
||||||
super(VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
super(VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
this.setBorder(null);
|
this.setBorder(null);
|
||||||
@@ -81,7 +76,6 @@ public class ViewQuest extends JScrollPane {
|
|||||||
this.getVerticalScrollBar().setUnitIncrement(16);
|
this.getVerticalScrollBar().setUnitIncrement(16);
|
||||||
|
|
||||||
// Non-final inits
|
// Non-final inits
|
||||||
this.parentView = v0;
|
|
||||||
this.clrBorders = FSkin.getColor(FSkin.Colors.CLR_THEME2);
|
this.clrBorders = FSkin.getColor(FSkin.Colors.CLR_THEME2);
|
||||||
this.eventPanelConstraints = "w 100%!, h 86px!, gap 0 0 5px 5px";
|
this.eventPanelConstraints = "w 100%!, h 86px!, gap 0 0 5px 5px";
|
||||||
|
|
||||||
@@ -126,7 +120,7 @@ public class ViewQuest extends JScrollPane {
|
|||||||
btnSpellShop = new FLabel.Builder().opaque(true).hoverable(true).text("Spell Shop")
|
btnSpellShop = new FLabel.Builder().opaque(true).hoverable(true).text("Spell Shop")
|
||||||
.fontScaleAuto(false).tooltip("Travel to the Spell Shop").build();
|
.fontScaleAuto(false).tooltip("Travel to the Spell Shop").build();
|
||||||
btnSpellShop.setFont(FSkin.getFont(14));
|
btnSpellShop.setFont(FSkin.getFont(14));
|
||||||
btnStart = new StartButton(parentView);
|
btnStart = new StartButton();
|
||||||
btnEmbark = new FLabel.Builder().opaque(true).hoverable(true).text("Embark!").build();
|
btnEmbark = new FLabel.Builder().opaque(true).hoverable(true).text("Embark!").build();
|
||||||
btnNewDeck = new FLabel.Builder().opaque(true).hoverable(true).text("Build a New Deck").build();
|
btnNewDeck = new FLabel.Builder().opaque(true).hoverable(true).text("Build a New Deck").build();
|
||||||
btnResetPrefs = new FLabel.Builder().opaque(true).hoverable(true).text("Reset to Defaults").build();
|
btnResetPrefs = new FLabel.Builder().opaque(true).hoverable(true).text("Reset to Defaults").build();
|
||||||
@@ -407,7 +401,7 @@ public class ViewQuest extends JScrollPane {
|
|||||||
pnlPrefs.removeAll();
|
pnlPrefs.removeAll();
|
||||||
populatePrefs();
|
populatePrefs();
|
||||||
pnlPrefs.revalidate();
|
pnlPrefs.revalidate();
|
||||||
this.getParentView().getBtnQuest().grabFocus();
|
Singletons.getView().getViewHome().getBtnQuest().grabFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
//========= TAB SHOW METHODS
|
//========= TAB SHOW METHODS
|
||||||
@@ -628,11 +622,6 @@ public class ViewQuest extends JScrollPane {
|
|||||||
return selectedOpponent;
|
return selectedOpponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.ViewHomeUI} */
|
|
||||||
public ViewHomeUI getParentView() {
|
|
||||||
return parentView;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link forge.control.home.ControlQuest} */
|
/** @return {@link forge.control.home.ControlQuest} */
|
||||||
public ControlQuest getControl() {
|
public ControlQuest getControl() {
|
||||||
return control;
|
return control;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import javax.swing.SwingConstants;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.control.home.ControlSealed;
|
import forge.control.home.ControlSealed;
|
||||||
import forge.game.GameType;
|
import forge.game.GameType;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.DeckLister;
|
import forge.view.toolbox.DeckLister;
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
import forge.view.toolbox.FProgressBar;
|
import forge.view.toolbox.FProgressBar;
|
||||||
@@ -21,23 +20,17 @@ import forge.view.toolbox.FSkin;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewSealed extends JPanel {
|
public class ViewSealed extends JPanel {
|
||||||
private final ViewHomeUI parentView;
|
|
||||||
private final ControlSealed control;
|
private final ControlSealed control;
|
||||||
private DeckLister lstHumanDecks;
|
private DeckLister lstHumanDecks;
|
||||||
private final JButton btnStart;
|
private final JButton btnStart;
|
||||||
private final FLabel btnBuild;
|
private final FLabel btnBuild;
|
||||||
private final FProgressBar barProgress;
|
private final FProgressBar barProgress;
|
||||||
|
|
||||||
/**
|
/** Assembles swing components for "Sealed" mode menu. */
|
||||||
* Assembles swing components for "Sealed" mode menu.
|
public ViewSealed() {
|
||||||
*
|
|
||||||
* @param v0 {@link forge.view.ViewHomeUI} parent view
|
|
||||||
*/
|
|
||||||
public ViewSealed(ViewHomeUI v0) {
|
|
||||||
super();
|
super();
|
||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
this.setLayout(new MigLayout("insets 0, gap 0, hidemode 2, wrap"));
|
this.setLayout(new MigLayout("insets 0, gap 0, hidemode 2, wrap"));
|
||||||
parentView = v0;
|
|
||||||
control = new ControlSealed(this);
|
control = new ControlSealed(this);
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
@@ -53,7 +46,7 @@ public class ViewSealed extends JPanel {
|
|||||||
btnBuild = new FLabel.Builder().opaque(true).hoverable(true).text("Build A New Deck").build();
|
btnBuild = new FLabel.Builder().opaque(true).hoverable(true).text("Build A New Deck").build();
|
||||||
|
|
||||||
// Start button
|
// Start button
|
||||||
btnStart = new StartButton(parentView);
|
btnStart = new StartButton();
|
||||||
barProgress = new FProgressBar();
|
barProgress = new FProgressBar();
|
||||||
barProgress.setVisible(false);
|
barProgress.setVisible(false);
|
||||||
|
|
||||||
@@ -68,11 +61,6 @@ public class ViewSealed extends JPanel {
|
|||||||
control.addListeners();
|
control.addListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.ViewHomeUI} */
|
|
||||||
public ViewHomeUI getParentView() {
|
|
||||||
return parentView;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JList} */
|
/** @return {@link javax.swing.JList} */
|
||||||
public DeckLister getLstHumanDecks() {
|
public DeckLister getLstHumanDecks() {
|
||||||
return lstHumanDecks;
|
return lstHumanDecks;
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import forge.control.home.ControlSettings;
|
|||||||
import forge.properties.ForgePreferences.FPref;
|
import forge.properties.ForgePreferences.FPref;
|
||||||
import forge.properties.ForgeProps;
|
import forge.properties.ForgeProps;
|
||||||
import forge.properties.NewConstants.Lang.OldGuiNewGame.NewGameText;
|
import forge.properties.NewConstants.Lang.OldGuiNewGame.NewGameText;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
import forge.view.toolbox.FList;
|
import forge.view.toolbox.FList;
|
||||||
import forge.view.toolbox.FScrollPane;
|
import forge.view.toolbox.FScrollPane;
|
||||||
@@ -53,7 +52,6 @@ import forge.view.toolbox.WrapLayout;
|
|||||||
public class ViewSettings extends JPanel {
|
public class ViewSettings extends JPanel {
|
||||||
private final ControlSettings control;
|
private final ControlSettings control;
|
||||||
private final FLabel btnReset, lblTitleSkin;
|
private final FLabel btnReset, lblTitleSkin;
|
||||||
private final ViewHomeUI parentView;
|
|
||||||
|
|
||||||
private final JList lstChooseSkin;
|
private final JList lstChooseSkin;
|
||||||
|
|
||||||
@@ -67,16 +65,12 @@ public class ViewSettings extends JPanel {
|
|||||||
|
|
||||||
private AvatarLabel avatarHuman, avatarAI;
|
private AvatarLabel avatarHuman, avatarAI;
|
||||||
private List<AvatarLabel> lstAvatars;
|
private List<AvatarLabel> lstAvatars;
|
||||||
/**
|
|
||||||
*
|
/** Assembles swing components for "Settings" mode menu. */
|
||||||
* Assembles swing components for "Settings" mode menu.
|
public ViewSettings() {
|
||||||
* @param view0   HomeTopLevel
|
|
||||||
*/
|
|
||||||
public ViewSettings(final ViewHomeUI view0) {
|
|
||||||
// Display
|
// Display
|
||||||
super();
|
super();
|
||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
this.parentView = view0;
|
|
||||||
|
|
||||||
// Final component inits: JPanels
|
// Final component inits: JPanels
|
||||||
pnlTabber = new JPanel();
|
pnlTabber = new JPanel();
|
||||||
@@ -585,11 +579,6 @@ public class ViewSettings extends JPanel {
|
|||||||
return ViewSettings.this.control;
|
return ViewSettings.this.control;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.view.home.HomeTopLevel} */
|
|
||||||
public ViewHomeUI getParentView() {
|
|
||||||
return parentView;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link forge.view.toolbox.FLabel} */
|
/** @return {@link forge.view.toolbox.FLabel} */
|
||||||
public FLabel getBtnReset() {
|
public FLabel getBtnReset() {
|
||||||
return btnReset;
|
return btnReset;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import javax.swing.text.StyledDocument;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.control.home.ControlUtilities;
|
import forge.control.home.ControlUtilities;
|
||||||
import forge.view.ViewHomeUI;
|
|
||||||
import forge.view.toolbox.FButton;
|
import forge.view.toolbox.FButton;
|
||||||
import forge.view.toolbox.FLabel;
|
import forge.view.toolbox.FLabel;
|
||||||
import forge.view.toolbox.FPanel;
|
import forge.view.toolbox.FPanel;
|
||||||
@@ -28,7 +27,6 @@ import forge.view.toolbox.FSkin;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewUtilities extends JPanel {
|
public class ViewUtilities extends JPanel {
|
||||||
private final ViewHomeUI parentView;
|
|
||||||
private final ControlUtilities control;
|
private final ControlUtilities control;
|
||||||
private final JTextPane tpnLicensing;
|
private final JTextPane tpnLicensing;
|
||||||
private final JLabel lblLicensing;
|
private final JLabel lblLicensing;
|
||||||
@@ -48,18 +46,11 @@ public class ViewUtilities extends JPanel {
|
|||||||
+ "You should have received a copy of the GNU General Public License "
|
+ "You should have received a copy of the GNU General Public License "
|
||||||
+ "along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
+ "along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
||||||
|
|
||||||
/**
|
/** Assembles swing components for "Utilities" mode menu. */
|
||||||
*
|
public ViewUtilities() {
|
||||||
* Assembles swing components for "Utilities" mode menu.
|
|
||||||
*
|
|
||||||
* @param v0
|
|
||||||
*   ViewHomeUI
|
|
||||||
*/
|
|
||||||
public ViewUtilities(ViewHomeUI v0) {
|
|
||||||
super();
|
super();
|
||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
this.setLayout(new MigLayout("insets 0, gap 0, wrap, ay center"));
|
this.setLayout(new MigLayout("insets 0, gap 0, wrap, ay center"));
|
||||||
parentView = v0;
|
|
||||||
final String constraintsLBL = "w 90%!, h 20px!, gap 5% 0 3px 8px";
|
final String constraintsLBL = "w 90%!, h 20px!, gap 5% 0 3px 8px";
|
||||||
final String constraintsBTN = "h 30px!, w 50%!, gap 25% 0 0 0";
|
final String constraintsBTN = "h 30px!, w 50%!, gap 25% 0 0 0";
|
||||||
|
|
||||||
@@ -222,9 +213,4 @@ public class ViewUtilities extends JPanel {
|
|||||||
public ControlUtilities getControl() {
|
public ControlUtilities getControl() {
|
||||||
return ViewUtilities.this.control;
|
return ViewUtilities.this.control;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return ViewHomeUI */
|
|
||||||
public ViewHomeUI getParentView() {
|
|
||||||
return parentView;
|
|
||||||
}
|
|
||||||
} // end class ViewUtilities
|
} // end class ViewUtilities
|
||||||
|
|||||||
Reference in New Issue
Block a user