mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Remove unnecessary setting of scroll pane border to null
This commit is contained in:
@@ -8,8 +8,6 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
@@ -82,7 +80,6 @@ public enum FNetOverlay {
|
||||
|
||||
FScrollPane _operationLogScroller = new FScrollPane(txtLog);
|
||||
_operationLogScroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
_operationLogScroller.setBorder((Border)null);
|
||||
new SmartScroller(_operationLogScroller);
|
||||
pnl.add(_operationLogScroller, "pushx, hmin 24, pushy, growy, growx, gap 2px 2px 2px 0, sx 2");
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package forge.gui.deckeditor.views;
|
||||
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.gui.deckeditor.controllers.CEditorPreferences;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -136,7 +134,6 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
|
||||
pnl.add(chbCardDisplayUnique, "h 25px!, gap 5px 5px 5px 5px, ax center, span 2 1");
|
||||
|
||||
pnl.setOpaque(false);
|
||||
scroller.setBorder((Border)null);
|
||||
scroller.getViewport().setBorder(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import java.util.List;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.deck.DeckBase;
|
||||
import forge.gui.deckeditor.CDeckEditorUI;
|
||||
@@ -60,7 +58,6 @@ public enum VProbabilities implements IVDoc<CProbabilities> {
|
||||
pnlContent.setOpaque(false);
|
||||
pnlHand.setOpaque(false);
|
||||
pnlLibrary.setOpaque(false);
|
||||
scroller.setBorder((Border)null);
|
||||
scroller.getViewport().setBorder(null);
|
||||
|
||||
lblSampleHand.setBorder(new FSkin.MatteSkinBorder(1, 0, 1, 0, FSkin.getColor(FSkin.Colors.CLR_BORDERS)));
|
||||
|
||||
@@ -5,8 +5,6 @@ import java.awt.Font;
|
||||
import forge.gui.toolbox.FLabel;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.gui.deckeditor.controllers.CStatistics;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -75,7 +73,6 @@ public enum VStatistics implements IVDoc<CStatistics> {
|
||||
|
||||
//========== Constructor
|
||||
private VStatistics() {
|
||||
scroller.setBorder((Border)null);
|
||||
scroller.getViewport().setBorder(null);
|
||||
|
||||
// Color stats
|
||||
|
||||
@@ -2,8 +2,6 @@ package forge.gui.home.gauntlet;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.gui.framework.DragCell;
|
||||
import forge.gui.framework.DragTab;
|
||||
@@ -47,8 +45,6 @@ public enum VSubmenuGauntletLoad implements IVSubmenu<CSubmenuGauntletLoad> {
|
||||
|
||||
private VSubmenuGauntletLoad() {
|
||||
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
|
||||
scrLoad.setBorder((Border)null);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -6,8 +6,6 @@ import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JSlider;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.gui.deckchooser.FDeckChooser;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -20,7 +18,6 @@ import forge.gui.home.VHomeUI;
|
||||
import forge.gui.toolbox.FCheckBox;
|
||||
import forge.gui.toolbox.FLabel;
|
||||
import forge.gui.toolbox.FPanel;
|
||||
import forge.gui.toolbox.FScrollPane;
|
||||
import forge.gui.toolbox.FSkin;
|
||||
import forge.gui.toolbox.FSkin.SkinnedSlider;
|
||||
|
||||
@@ -62,8 +59,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
||||
private final FLabel lblOptions = new FLabel.Builder().fontSize(16)
|
||||
.fontStyle(Font.BOLD).text("OPTIONS").fontAlign(SwingConstants.CENTER).build();
|
||||
|
||||
private final FScrollPane scrLoad = new FScrollPane(gauntletList);
|
||||
|
||||
private final FLabel lblDesc1 = new FLabel.Builder()
|
||||
.text("Matches per gauntlet").fontStyle(Font.ITALIC).build();
|
||||
|
||||
@@ -93,8 +88,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
||||
sliOpponents.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||
sliOpponents.setFont(FSkin.getFont(12));
|
||||
|
||||
scrLoad.setBorder((Border)null);
|
||||
|
||||
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
pnlOptions.add(lblOptions, "h 30px!, w 96%!, gap 2% 0 0 5px");
|
||||
pnlOptions.add(sliOpponents, "h 40px!, w 96%!, gap 2% 0 0 5px, ax center");
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.util.Map;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.plaf.basic.BasicComboBoxRenderer;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
@@ -179,25 +178,23 @@ public enum VSubmenuQuestData implements IVSubmenu<CSubmenuQuestData> {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
updateEnableFormats();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Aux function for enabling or disabling the format selection according to world selection.
|
||||
*/
|
||||
private void updateEnableFormats() {
|
||||
final QuestWorld qw = Singletons.getModel().getWorlds().get(getStartingWorldName());
|
||||
if (qw != null) {
|
||||
cbxStartingPool.setEnabled(qw.getFormat() == null);
|
||||
cbxFormat.setEnabled(qw.getFormat() == null);
|
||||
cbxCustomDeck.setEnabled(qw.getFormat() == null);
|
||||
// Do NOT disable the following...
|
||||
// cbxPrizeFormat.setEnabled(qw.getFormat() == null);
|
||||
// cboAllowUnlocks.setEnabled(qw.getFormat() == null);
|
||||
// cbxPrizedCards.setEnabled(qw.getFormat() == null);
|
||||
|
||||
}
|
||||
}
|
||||
private void updateEnableFormats() {
|
||||
final QuestWorld qw = Singletons.getModel().getWorlds().get(getStartingWorldName());
|
||||
if (qw != null) {
|
||||
cbxStartingPool.setEnabled(qw.getFormat() == null);
|
||||
cbxFormat.setEnabled(qw.getFormat() == null);
|
||||
cbxCustomDeck.setEnabled(qw.getFormat() == null);
|
||||
// Do NOT disable the following...
|
||||
// cbxPrizeFormat.setEnabled(qw.getFormat() == null);
|
||||
// cboAllowUnlocks.setEnabled(qw.getFormat() == null);
|
||||
// cbxPrizedCards.setEnabled(qw.getFormat() == null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -207,8 +204,6 @@ public enum VSubmenuQuestData implements IVSubmenu<CSubmenuQuestData> {
|
||||
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
lblTitleNew.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
|
||||
scrQuests.setBorder((Border)null);
|
||||
|
||||
final JXButtonPanel difficultyPanel = new JXButtonPanel();
|
||||
final String difficulty_constraints = "h 27px!, gapbottom 5";
|
||||
difficultyPanel.add(radEasy, difficulty_constraints);
|
||||
|
||||
@@ -132,9 +132,6 @@ public enum VSubmenuQuestPrefs implements IVSubmenu<CSubmenuQuestPrefs> {
|
||||
pnlContent.add(pnlTitleShop, "w 96%!, h 36px!, gap 2% 0 10px 10px");
|
||||
pnlContent.add(pnlShop, "w 96%!, gap 2% 0 10px 20px");
|
||||
populateShop();
|
||||
|
||||
scrContent.setBorder((Border)null);
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -10,8 +10,6 @@ import javax.swing.JPanel;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.Command;
|
||||
import forge.gui.SOverlayUtils;
|
||||
@@ -90,8 +88,6 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
|
||||
|
||||
pnlContent.add(btnLicensing, constraintsBTN);
|
||||
pnlContent.add(_makeLabel("Forge legal."), constraintsLBL);
|
||||
|
||||
scrContent.setBorder((Border)null);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -179,7 +175,6 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
|
||||
FTextArea directions = new FTextArea(FileUtil.readFileToString(NewConstants.TEXT_HOWTO_FILE));
|
||||
final FScrollPane scr = new FScrollPane(directions, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
|
||||
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
scr.setBorder((Border)null);
|
||||
|
||||
_showDialog(scr, new Runnable() {
|
||||
@Override public void run() { scr.getViewport().setViewPosition(new Point(0, 0)); }
|
||||
|
||||
@@ -17,8 +17,6 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -231,8 +229,6 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
pnlPrefs.add(field, "w 25%!");
|
||||
shortcutFields.put(s.getPrefKey(), field);
|
||||
}
|
||||
|
||||
scrContent.setBorder((Border)null);
|
||||
}
|
||||
|
||||
public void reloadShortcuts() {
|
||||
|
||||
@@ -15,7 +15,6 @@ import javax.swing.JTextArea;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.Scrollable;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.plaf.LayerUI;
|
||||
|
||||
@@ -80,7 +79,6 @@ public class GameLogPanel extends JPanel {
|
||||
scrollPane = new FScrollPane();
|
||||
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
||||
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
scrollPane.setBorder((Border)null);
|
||||
scrollPane.getViewport().add(scrollablePanel);
|
||||
layer = new JLayer<FScrollPane>(scrollPane, layerUI);
|
||||
this.add(layer, "w 10:100%, h 100%");
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
|
||||
import javax.swing.AbstractListModel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
|
||||
@@ -71,7 +70,6 @@ public class QuestWinLoseCardViewer extends FPanel {
|
||||
this.setBorderToggle(false);
|
||||
this.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
picture.setOpaque(false);
|
||||
scroller.setBorder((Border)null);
|
||||
|
||||
this.setLayout(new MigLayout("insets 0, gap 0"));
|
||||
this.add(scroller, "w 32%!, h 98%!, gap 1% 1% 1% 1%");
|
||||
|
||||
@@ -177,7 +177,6 @@ public class VAssignDamage {
|
||||
pnlDefenders.setLayout(new MigLayout("insets 0, gap 0, ax center, " + wrap));
|
||||
|
||||
final FScrollPane scrDefenders = new FScrollPane(pnlDefenders);
|
||||
scrDefenders.setBorder((Border)null);
|
||||
|
||||
// Top row of cards...
|
||||
for (final Card c : defenderCards) {
|
||||
|
||||
@@ -9,8 +9,6 @@ import java.awt.datatransfer.StringSelection;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.Command;
|
||||
import forge.Singletons;
|
||||
@@ -86,7 +84,6 @@ public class ViewWinLose {
|
||||
pnlLeft.setOpaque(false);
|
||||
pnlRight.setOpaque(false);
|
||||
pnlCustom.setOpaque(false);
|
||||
scrCustom.setBorder((Border)null);
|
||||
scrCustom.getViewport().add(pnlCustom);
|
||||
|
||||
lblTitle.setForeground(Color.white);
|
||||
@@ -156,7 +153,6 @@ public class ViewWinLose {
|
||||
|
||||
final JPanel pnlLog = new JPanel(new MigLayout("insets 0, wrap, ax center"));
|
||||
final FScrollPane scrLog = new FScrollPane(txtLog);
|
||||
scrLog.setBorder((Border)null);
|
||||
pnlLog.setOpaque(false);
|
||||
|
||||
pnlLog.add(
|
||||
|
||||
@@ -23,8 +23,6 @@ import java.util.TreeSet;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.player.Player;
|
||||
@@ -61,7 +59,6 @@ public enum VAntes implements IVDoc<CAntes> {
|
||||
private VAntes() {
|
||||
pnl.setLayout(new WrapLayout());
|
||||
pnl.setOpaque(false);
|
||||
scroller.setBorder((Border)null);
|
||||
}
|
||||
|
||||
//========== Overridden methods
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
package forge.gui.match.views;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
@@ -76,8 +74,6 @@ public class VCommand implements IVDoc<CCommand> {
|
||||
tabletop.setOpaque(false);
|
||||
|
||||
scroller.setViewportView(this.tabletop);
|
||||
scroller.setBorder((Border)null);
|
||||
|
||||
}
|
||||
|
||||
//========= Overridden methods
|
||||
|
||||
@@ -127,7 +127,6 @@ public class VField implements IVDoc<CField> {
|
||||
tabletop.setOpaque(false);
|
||||
|
||||
scroller.setViewportView(this.tabletop);
|
||||
scroller.setBorder((Border)null);
|
||||
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
package forge.gui.match.views;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.game.player.Player;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -64,7 +62,6 @@ public class VHand implements IVDoc<CHand> {
|
||||
tab.setText(owner.getName() + " Hand");
|
||||
}
|
||||
|
||||
scroller.setBorder((Border)null);
|
||||
scroller.setViewportView(VHand.this.hand);
|
||||
|
||||
hand.setOpaque(false);
|
||||
|
||||
@@ -94,7 +94,6 @@ public class ViewStall extends JPanel {
|
||||
|
||||
this.pnlInventory.setOpaque(false);
|
||||
|
||||
this.scrInventory.setBorder((Border)null);
|
||||
this.scrInventory.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||
this.scrInventory.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user