Restore borders that were accidentally removed from scroll panes

This commit is contained in:
drdev
2014-01-23 23:15:08 +00:00
parent 9c37156906
commit 7b799eb531
41 changed files with 64 additions and 61 deletions

View File

@@ -134,7 +134,7 @@ public class CardDetailPanel extends FPanel {
this.cdArea.setFont(new java.awt.Font("Dialog", 0, 14)); this.cdArea.setFont(new java.awt.Font("Dialog", 0, 14));
this.cdArea.setBorder(new EmptyBorder(4, 4, 4, 4)); this.cdArea.setBorder(new EmptyBorder(4, 4, 4, 4));
this.cdArea.setOpaque(false); this.cdArea.setOpaque(false);
this.scrArea = new FScrollPane(this.cdArea); this.scrArea = new FScrollPane(this.cdArea, true);
GridBagConstraints areaConstraints = new GridBagConstraints(); GridBagConstraints areaConstraints = new GridBagConstraints();
areaConstraints.fill = GridBagConstraints.BOTH; areaConstraints.fill = GridBagConstraints.BOTH;

View File

@@ -114,7 +114,7 @@ public class CardListViewer extends FDialog {
}); });
this.add(new FLabel.Builder().text(message).build(), "cell 0 0, spanx 3, gapbottom 4"); this.add(new FLabel.Builder().text(message).build(), "cell 0 0, spanx 3, gapbottom 4");
this.add(new FScrollPane(this.jList), "cell 0 1, w 225, growy, pushy, ax c"); this.add(new FScrollPane(this.jList, true), "cell 0 1, w 225, growy, pushy, ax c");
this.add(this.picture, "cell 1 1, w 225, growy, pushy, ax c"); this.add(this.picture, "cell 1 1, w 225, growy, pushy, ax c");
this.add(this.detail, "cell 2 1, w 225, growy, pushy, ax c"); this.add(this.detail, "cell 2 1, w 225, growy, pushy, ax c");
this.add(btnOK, "cell 1 2, w 150, h 26, ax c, gaptop 6"); this.add(btnOK, "cell 1 2, w 150, h 26, ax c, gaptop 6");

View File

@@ -153,7 +153,7 @@ public class DualListBox<T> extends FDialog {
FPanel leftPanel = new FPanel(new BorderLayout()); FPanel leftPanel = new FPanel(new BorderLayout());
selectOrder = new FLabel.Builder().text("Select Order:").build(); selectOrder = new FLabel.Builder().text("Select Order:").build();
leftPanel.add(selectOrder, BorderLayout.NORTH); leftPanel.add(selectOrder, BorderLayout.NORTH);
leftPanel.add(new FScrollPane(sourceList), BorderLayout.CENTER); leftPanel.add(new FScrollPane(sourceList, true), BorderLayout.CENTER);
leftPanel.add(okButton, BorderLayout.SOUTH); leftPanel.add(okButton, BorderLayout.SOUTH);
FPanel centerPanel = new FPanel(new GridLayout(6, 1)); FPanel centerPanel = new FPanel(new GridLayout(6, 1));
@@ -170,7 +170,7 @@ public class DualListBox<T> extends FDialog {
FPanel rightPanel = new FPanel(new BorderLayout()); FPanel rightPanel = new FPanel(new BorderLayout());
rightPanel.add(orderedLabel, BorderLayout.NORTH); rightPanel.add(orderedLabel, BorderLayout.NORTH);
rightPanel.add(new FScrollPane(destList), BorderLayout.CENTER); rightPanel.add(new FScrollPane(destList, true), BorderLayout.CENTER);
rightPanel.add(autoButton, BorderLayout.SOUTH); rightPanel.add(autoButton, BorderLayout.SOUTH);
add(leftPanel, "w 250, h 300"); add(leftPanel, "w 250, h 300");

View File

@@ -78,7 +78,7 @@ public enum FNetOverlay {
txtLog.setFocusable(true); txtLog.setFocusable(true);
txtLog.setBackground(FSkin.getColor(FSkin.Colors.CLR_ZEBRA)); txtLog.setBackground(FSkin.getColor(FSkin.Colors.CLR_ZEBRA));
FScrollPane _operationLogScroller = new FScrollPane(txtLog); FScrollPane _operationLogScroller = new FScrollPane(txtLog, false);
_operationLogScroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); _operationLogScroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
new SmartScroller(_operationLogScroller); new SmartScroller(_operationLogScroller);
pnl.add(_operationLogScroller, "pushx, hmin 24, pushy, growy, growx, gap 2px 2px 2px 0, sx 2"); pnl.add(_operationLogScroller, "pushx, hmin 24, pushy, growy, growx, gap 2px 2px 2px 0, sx 2");

View File

@@ -127,7 +127,7 @@ public class ImportDialog {
blurbPanelInterior.add(new FLabel.Builder().text( blurbPanelInterior.add(new FLabel.Builder().text(
"<html><b>Remember, your data won't be available until you complete this step!</b></html>").build(), "growx, w 50:50:"); "<html><b>Remember, your data won't be available until you complete this step!</b></html>").build(), "growx, w 50:50:");
FScrollPane blurbScroller = new FScrollPane(blurbPanelInterior, FScrollPane blurbScroller = new FScrollPane(blurbPanelInterior, true,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
blurbPanel.add(blurbScroller, "hmin 150, growy, growx, center, gap 0 0 5 5"); blurbPanel.add(blurbScroller, "hmin 150, growy, growx, center, gap 0 0 5 5");
_topPanel.add(blurbPanel, "gap 10 10 20 0, growy, growx, w 50:50:"); _topPanel.add(blurbPanel, "gap 10 10 20 0, growy, growx, w 50:50:");

View File

@@ -103,7 +103,7 @@ public class ListChooser<T> {
this.lstChoices.setCellRenderer(new TransformedCellRenderer(display)); this.lstChoices.setCellRenderer(new TransformedCellRenderer(display));
} }
FScrollPane listScroller = new FScrollPane(this.lstChoices); FScrollPane listScroller = new FScrollPane(this.lstChoices, true);
int minWidth = this.lstChoices.getAutoSizeWidth(); int minWidth = this.lstChoices.getAutoSizeWidth();
if (this.lstChoices.getModel().getSize() > this.lstChoices.getVisibleRowCount()) { if (this.lstChoices.getModel().getSize() > this.lstChoices.getVisibleRowCount()) {
minWidth += listScroller.getVerticalScrollBar().getPreferredSize().width; minWidth += listScroller.getVerticalScrollBar().getPreferredSize().width;

View File

@@ -89,8 +89,8 @@ public class DeckImport<TItem extends InventoryItem, TModel extends DeckBase> ex
+ "</html>"; + "</html>";
private final FHtmlViewer htmlOutput = new FHtmlViewer(DeckImport.HTML_WELCOME_TEXT); private final FHtmlViewer htmlOutput = new FHtmlViewer(DeckImport.HTML_WELCOME_TEXT);
private final FScrollPane scrollInput = new FScrollPane(this.txtInput); private final FScrollPane scrollInput = new FScrollPane(this.txtInput, false);
private final FScrollPane scrollOutput = new FScrollPane(this.htmlOutput); private final FScrollPane scrollOutput = new FScrollPane(this.htmlOutput, false);
private final FLabel summaryMain = new FLabel.Builder().text("Imported deck summary will appear here").build(); private final FLabel summaryMain = new FLabel.Builder().text("Imported deck summary will appear here").build();
private final FLabel summarySide = new FLabel.Builder().text("Line for sideboard summary").build(); private final FLabel summarySide = new FLabel.Builder().text("Line for sideboard summary").build();
private final FButton cmdAccept = new FButton("Import Deck"); private final FButton cmdAccept = new FButton("Import Deck");

View File

@@ -67,7 +67,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
private FCheckBox chbCardDisplayUnique = new FCheckBox("Show unique cards only (only affects Constructed)"); private FCheckBox chbCardDisplayUnique = new FCheckBox("Show unique cards only (only affects Constructed)");
private JPanel pnl = new JPanel(new MigLayout("insets 0, gap 0, wrap 2, ax left")); private JPanel pnl = new JPanel(new MigLayout("insets 0, gap 0, wrap 2, ax left"));
private FScrollPane scroller = new FScrollPane(pnl); private FScrollPane scroller = new FScrollPane(pnl, false);
//========== Constructor //========== Constructor
private VEditorPreferences() { private VEditorPreferences() {

View File

@@ -49,7 +49,7 @@ public enum VProbabilities implements IVDoc<CProbabilities> {
// Layout containers // Layout containers
private final JPanel pnlContent = new JPanel(new MigLayout("insets 0, gap 0, wrap")); private final JPanel pnlContent = new JPanel(new MigLayout("insets 0, gap 0, wrap"));
private final FScrollPane scroller = new FScrollPane(pnlContent); private final FScrollPane scroller = new FScrollPane(pnlContent, false);
private final JPanel pnlHand = new JPanel(new MigLayout("insets 0, gap 0, wrap")); private final JPanel pnlHand = new JPanel(new MigLayout("insets 0, gap 0, wrap"));
private final JPanel pnlLibrary = new JPanel(new MigLayout("insets 0, gap 0, wrap")); private final JPanel pnlLibrary = new JPanel(new MigLayout("insets 0, gap 0, wrap"));

View File

@@ -69,7 +69,7 @@ public enum VStatistics implements IVDoc<CStatistics> {
private final FLabel lblCMC6 = buildLabel(SItemManagerUtil.StatTypes.CMC_6, true); private final FLabel lblCMC6 = buildLabel(SItemManagerUtil.StatTypes.CMC_6, true);
// Layout containers // Layout containers
private final FScrollPane scroller = new FScrollPane(pnlStats); private final FScrollPane scroller = new FScrollPane(pnlStats, false);
//========== Constructor //========== Constructor
private VStatistics() { private VStatistics() {

View File

@@ -51,7 +51,7 @@ public enum VSubmenuGauntletBuild implements IVSubmenu<CSubmenuGauntletBuild> {
private final FDeckChooser lstLeft = new FDeckChooser(false); private final FDeckChooser lstLeft = new FDeckChooser(false);
private final JList<String> lstRight = new FList<String>(); private final JList<String> lstRight = new FList<String>();
private final FScrollPane scrRight = new FScrollPane(lstRight, private final FScrollPane scrRight = new FScrollPane(lstRight, true,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
private final FTextField txfFilename = new FTextField.Builder().text(GauntletIO.TXF_PROMPT).build(); private final FTextField txfFilename = new FTextField.Builder().text(GauntletIO.TXF_PROMPT).build();

View File

@@ -46,7 +46,7 @@ public enum VSubmenuGauntletContests implements IVSubmenu<CSubmenuGauntletContes
private final ContestGauntletLister gauntletList = new ContestGauntletLister(); private final ContestGauntletLister gauntletList = new ContestGauntletLister();
private final FDeckChooser lstDecks = new FDeckChooser(false); private final FDeckChooser lstDecks = new FDeckChooser(false);
private final FScrollPane scrLeft = new FScrollPane(gauntletList, private final FScrollPane scrLeft = new FScrollPane(gauntletList, false,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
private final FLabel lblLoad = new FLabel.Builder().fontSize(16) private final FLabel lblLoad = new FLabel.Builder().fontSize(16)

View File

@@ -35,7 +35,7 @@ public enum VSubmenuGauntletLoad implements IVSubmenu<CSubmenuGauntletLoad> {
private final QuickGauntletLister gauntletList = new QuickGauntletLister(); private final QuickGauntletLister gauntletList = new QuickGauntletLister();
private final FScrollPane scrLoad = new FScrollPane(gauntletList); private final FScrollPane scrLoad = new FScrollPane(gauntletList, false);
private final FLabel lblDesc = new FLabel.Builder().text( private final FLabel lblDesc = new FLabel.Builder().text(
"Load a previous gauntlet (uses the deck with which it was started).") "Load a previous gauntlet (uses the deck with which it was started).")

View File

@@ -139,7 +139,7 @@ public class DialogChooseSets {
JPanel pnl = new JPanel(new MigLayout("center, wrap")); JPanel pnl = new JPanel(new MigLayout("center, wrap"));
pnl.setOpaque(false); pnl.setOpaque(false);
pnl.add(new FLabel.Builder().text(title).build()); pnl.add(new FLabel.Builder().text(title).build());
pnl.add(new FScrollPane(cbl)); pnl.add(new FScrollPane(cbl, true));
return pnl; return pnl;
} }

View File

@@ -66,7 +66,7 @@ public enum VSubmenuQuestData implements IVSubmenu<CSubmenuQuestData> {
.fontAlign(SwingConstants.CENTER).fontSize(12).build(); .fontAlign(SwingConstants.CENTER).fontSize(12).build();
private final QuestFileLister lstQuests = new QuestFileLister(); private final QuestFileLister lstQuests = new QuestFileLister();
private final FScrollPane scrQuests = new FScrollPane(lstQuests); private final FScrollPane scrQuests = new FScrollPane(lstQuests, false);
private final JPanel pnlOptions = new JPanel(); private final JPanel pnlOptions = new JPanel();
/* Fist column */ /* Fist column */

View File

@@ -9,7 +9,6 @@ import java.awt.event.MouseEvent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.border.Border; import javax.swing.border.Border;
@@ -50,8 +49,7 @@ public enum VSubmenuQuestPrefs implements IVSubmenu<CSubmenuQuestPrefs> {
.opaque(true).fontSize(16).build(); .opaque(true).fontSize(16).build();
private final JPanel pnlContent = new JPanel(); private final JPanel pnlContent = new JPanel();
private final FScrollPane scrContent = new FScrollPane(pnlContent, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, private final FScrollPane scrContent = new FScrollPane(pnlContent, false);
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
private final JPanel pnlRewards = new JPanel(); private final JPanel pnlRewards = new JPanel();
private final JPanel pnlDifficulty = new JPanel(); private final JPanel pnlDifficulty = new JPanel();

View File

@@ -39,15 +39,15 @@ public class AvatarSelector extends FDialog {
} }
} }
final int width = (int) (this.getOwner().getWidth() * .8); final int width = this.getOwner().getWidth() * 3 / 4;
final int height = (int) (this.getOwner().getHeight() * .8); final int height = this.getOwner().getHeight() * 3 / 4;
this.setPreferredSize(new Dimension(width, height)); this.setPreferredSize(new Dimension(width, height));
this.setSize(width, height); this.setSize(width, height);
FScrollPane scroller = new FScrollPane(pnlAvatarPics); FScrollPane scroller = new FScrollPane(pnlAvatarPics, false);
scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
this.add(scroller, "w 90%!, pushy, growy, gap 5% 0 0 0"); this.add(scroller, "w 100%-24px!, pushy, growy, gap 12px 0 0 0");
initialSelection.requestFocusInWindow(); this.setDefaultFocus(initialSelection);
} }
private FLabel makeAvatarLabel(final SkinImage img0, final int index0, final int oldIndex) { private FLabel makeAvatarLabel(final SkinImage img0, final int index0, final int oldIndex) {
@@ -62,7 +62,7 @@ public class AvatarSelector extends FDialog {
lbl.setName("AvatarLabel" + index0); lbl.setName("AvatarLabel" + index0);
if (oldIndex == index0) { if (oldIndex == index0) {
lbl.setBorder(new FSkin.LineSkinBorder(FSkin.getColor(FSkin.Colors.CLR_BORDERS).alphaColor(255), 3));; lbl.setBorder(new FSkin.LineSkinBorder(FSkin.getColor(FSkin.Colors.CLR_BORDERS).alphaColor(255), 3));
} }
selectables.add(lbl); selectables.add(lbl);

View File

@@ -143,7 +143,7 @@ public enum VSubmenuConstructed implements IVSubmenu<CSubmenuConstructed> {
variantsPanel.add(vntArchenemy); variantsPanel.add(vntArchenemy);
comboArchenemy.addTo(variantsPanel); comboArchenemy.addTo(variantsPanel);
constructedFrame.add(new FScrollPane(variantsPanel, true, constructedFrame.add(new FScrollPane(variantsPanel, false,
ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED),
"w 100%, gapbottom 10px, spanx 2, wrap"); "w 100%, gapbottom 10px, spanx 2, wrap");

View File

@@ -98,7 +98,7 @@ public enum VSubmenuAvatars implements IVSubmenu<CSubmenuAvatars> {
pnlAvatars.removeAll(); pnlAvatars.removeAll();
pnlAvatars.setLayout(new MigLayout("insets 0, gap 0")); pnlAvatars.setLayout(new MigLayout("insets 0, gap 0"));
pnlAvatars.add(pnlAvatarUsers, "w 90%!, h 150px!, wrap"); pnlAvatars.add(pnlAvatarUsers, "w 90%!, h 150px!, wrap");
FScrollPane scroller = new FScrollPane(pnlAvatarPics); FScrollPane scroller = new FScrollPane(pnlAvatarPics, true);
scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pnlAvatars.add(scroller, "w 90%!, pushy, growy, gap 5% 0 0 0"); pnlAvatars.add(scroller, "w 90%!, pushy, growy, gap 5% 0 0 0");

View File

@@ -45,7 +45,7 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
/** */ /** */
private final JPanel pnlContent = new JPanel(new MigLayout("insets 0, gap 0, wrap, ay center")); private final JPanel pnlContent = new JPanel(new MigLayout("insets 0, gap 0, wrap, ay center"));
private final FScrollPane scrContent = new FScrollPane(pnlContent); private final FScrollPane scrContent = new FScrollPane(pnlContent, false);
private final FLabel btnDownloadSetPics = _makeButton("Download LQ Set Pictures"); private final FLabel btnDownloadSetPics = _makeButton("Download LQ Set Pictures");
private final FLabel btnDownloadPics = _makeButton("Download LQ Card Pictures"); private final FLabel btnDownloadPics = _makeButton("Download LQ Card Pictures");
@@ -173,7 +173,7 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
public void showHowToPlay() { public void showHowToPlay() {
FTextArea directions = new FTextArea(FileUtil.readFileToString(NewConstants.TEXT_HOWTO_FILE)); FTextArea directions = new FTextArea(FileUtil.readFileToString(NewConstants.TEXT_HOWTO_FILE));
final FScrollPane scr = new FScrollPane(directions, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, final FScrollPane scr = new FScrollPane(directions, false, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
_showDialog(scr, new Runnable() { _showDialog(scr, new Runnable() {

View File

@@ -56,7 +56,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
/** */ /** */
private final JPanel pnlPrefs = new JPanel(); private final JPanel pnlPrefs = new JPanel();
private final FScrollPane scrContent = new FScrollPane(pnlPrefs, private final FScrollPane scrContent = new FScrollPane(pnlPrefs, false,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
private final FLabel btnReset = new FLabel.Builder().opaque(true).hoverable(true).text("Reset to Default Settings").build(); private final FLabel btnReset = new FLabel.Builder().opaque(true).hoverable(true).text("Reset to Default Settings").build();

View File

@@ -69,7 +69,7 @@ public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
tar.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT)); tar.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
tar.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2)); tar.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
scroller = new FScrollPane(tar); scroller = new FScrollPane(tar, true);
pnlMain.add(scroller, "w 100%!, h 100%!"); pnlMain.add(scroller, "w 100%!, h 100%!");
} }

View File

@@ -150,7 +150,7 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
archenemySchemes.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); archenemySchemes.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
FScrollPane scrSchemes = new FScrollPane(archenemySchemes, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); FScrollPane scrSchemes = new FScrollPane(archenemySchemes, true, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrSchemes, "h 90%, w 33%, gap 0px 10px 0px 10px, growy, pushy, wrap"); tempPanel.add(scrSchemes, "h 90%, w 33%, gap 0px 10px 0px 10px, growy, pushy, wrap");
} }

View File

@@ -156,7 +156,7 @@ public enum VSubmenuCommander implements IVSubmenu<CSubmenuCommander> {
tempPanel.add(typeBtnPanel); tempPanel.add(typeBtnPanel);
FScrollPane scrDecks = new FScrollPane(tempList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); FScrollPane scrDecks = new FScrollPane(tempList, true, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrDecks, "w 55%!, h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap"); tempPanel.add(scrDecks, "w 55%!, h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap");
playerPanels.add(tempPanel); playerPanels.add(tempPanel);

View File

@@ -154,7 +154,7 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
tempPlanarDeckList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); tempPlanarDeckList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
FScrollPane scrPlanes = new FScrollPane(tempPlanarDeckList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); FScrollPane scrPlanes = new FScrollPane(tempPlanarDeckList, true, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrPlanes, "h 90%, w 20%!, gap 0px 10px 0px 10px, growy, pushy, wrap"); tempPanel.add(scrPlanes, "h 90%, w 20%!, gap 0px 10px 0px 10px, growy, pushy, wrap");
planarDeckLists.add(tempPlanarDeckList); planarDeckLists.add(tempPlanarDeckList);

View File

@@ -205,7 +205,7 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
tempPanel.add(new FLabel.Builder().text("Select Avatar:").build(), "gap 0px 0px 10px 10px, flowy"); tempPanel.add(new FLabel.Builder().text("Select Avatar:").build(), "gap 0px 0px 10px 10px, flowy");
FScrollPane scrAvatar = new FScrollPane(tempList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); FScrollPane scrAvatar = new FScrollPane(tempList, true, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrAvatar, "h 90%, w 33%, gap 0px 10px 0px 10px, growy, pushy, wrap"); tempPanel.add(scrAvatar, "h 90%, w 33%, gap 0px 10px 0px 10px, growy, pushy, wrap");
tempDetail = new CardDetailPanel(null); tempDetail = new CardDetailPanel(null);

View File

@@ -76,7 +76,7 @@ public class GameLogPanel extends JPanel {
* characteristics for the list of {@code JTextArea} log entries. * characteristics for the list of {@code JTextArea} log entries.
*/ */
private void addNewScrollPane() { private void addNewScrollPane() {
scrollPane = new FScrollPane(); scrollPane = new FScrollPane(false);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.getViewport().add(scrollablePanel); scrollPane.getViewport().add(scrollablePanel);

View File

@@ -64,7 +64,7 @@ public class QuestWinLoseCardViewer extends FPanel {
this.jList = new FList<PaperCard>(new ChooserListModel()); this.jList = new FList<PaperCard>(new ChooserListModel());
this.detail = new CardDetailPanel(null); this.detail = new CardDetailPanel(null);
this.picture = new CardPicturePanel(); this.picture = new CardPicturePanel();
this.scroller = new FScrollPane(this.jList); this.scroller = new FScrollPane(this.jList, false);
this.setCornerDiameter(20); this.setCornerDiameter(20);
this.setBorderToggle(false); this.setBorderToggle(false);

View File

@@ -176,7 +176,7 @@ public class VAssignDamage {
final String wrap = "wrap " + Integer.toString(cols); final String wrap = "wrap " + Integer.toString(cols);
pnlDefenders.setLayout(new MigLayout("insets 0, gap 0, ax center, " + wrap)); pnlDefenders.setLayout(new MigLayout("insets 0, gap 0, ax center, " + wrap));
final FScrollPane scrDefenders = new FScrollPane(pnlDefenders); final FScrollPane scrDefenders = new FScrollPane(pnlDefenders, false);
// Top row of cards... // Top row of cards...
for (final Card c : defenderCards) { for (final Card c : defenderCards) {

View File

@@ -50,7 +50,7 @@ public class ViewWinLose {
final JPanel pnlLeft = new JPanel(); final JPanel pnlLeft = new JPanel();
final JPanel pnlRight = new JPanel(); final JPanel pnlRight = new JPanel();
final FScrollPane scrCustom = new FScrollPane(); final FScrollPane scrCustom = new FScrollPane(false);
pnlCustom = new SkinnedPanel(); pnlCustom = new SkinnedPanel();
btnContinue = new FButton(); btnContinue = new FButton();
@@ -152,7 +152,7 @@ public class ViewWinLose {
pnlLeft.add(pnlButtons, "w 100%!"); pnlLeft.add(pnlButtons, "w 100%!");
final JPanel pnlLog = new JPanel(new MigLayout("insets 0, wrap, ax center")); final JPanel pnlLog = new JPanel(new MigLayout("insets 0, wrap, ax center"));
final FScrollPane scrLog = new FScrollPane(txtLog); final FScrollPane scrLog = new FScrollPane(txtLog, false);
pnlLog.setOpaque(false); pnlLog.setOpaque(false);
pnlLog.add( pnlLog.add(

View File

@@ -51,7 +51,7 @@ public enum VAntes implements IVDoc<CAntes> {
private final DragTab tab = new DragTab("Ante"); private final DragTab tab = new DragTab("Ante");
private final JPanel pnl = new JPanel(); private final JPanel pnl = new JPanel();
private final FScrollPane scroller = new FScrollPane(pnl); private final FScrollPane scroller = new FScrollPane(pnl, false);
private final SortedSet<AntePanel> allAntes = new TreeSet<AntePanel>(); private final SortedSet<AntePanel> allAntes = new TreeSet<AntePanel>();
private Iterable<Player> players; private Iterable<Player> players;

View File

@@ -46,7 +46,7 @@ public class VCommand implements IVDoc<CCommand> {
private Player player = null; private Player player = null;
// Top-level containers // Top-level containers
private final FScrollPane scroller = new FScrollPane(); private final FScrollPane scroller = new FScrollPane(false);
private final PlayArea tabletop; private final PlayArea tabletop;
//========= Constructor //========= Constructor

View File

@@ -61,7 +61,7 @@ public class VField implements IVDoc<CField> {
private Player player = null; private Player player = null;
// Top-level containers // Top-level containers
private final FScrollPane scroller = new FScrollPane(); private final FScrollPane scroller = new FScrollPane(false);
private final PlayArea tabletop; private final PlayArea tabletop;
private final SkinnedPanel avatarArea = new SkinnedPanel(); private final SkinnedPanel avatarArea = new SkinnedPanel();

View File

@@ -42,7 +42,7 @@ public class VHand implements IVDoc<CHand> {
// Top-level containers // Top-level containers
private final FScrollPane scroller = new FScrollPane(); private final FScrollPane scroller = new FScrollPane(false);
private final HandArea hand = new HandArea(scroller); private final HandArea hand = new HandArea(scroller);
//========= Constructor //========= Constructor

View File

@@ -60,7 +60,7 @@ public enum VPrompt implements IVDoc<CPrompt> {
private final JButton btnOK = new FButton("OK"); private final JButton btnOK = new FButton("OK");
private final JButton btnCancel = new FButton("Cancel"); private final JButton btnCancel = new FButton("Cancel");
private final FHtmlViewer tarMessage = new FHtmlViewer(); private final FHtmlViewer tarMessage = new FHtmlViewer();
private final FScrollPane messageScroller = new FScrollPane(tarMessage, private final FScrollPane messageScroller = new FScrollPane(tarMessage, false,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
private final JLabel lblGames; private final JLabel lblGames;

View File

@@ -25,26 +25,31 @@ public class FScrollPane extends SkinnedScrollPane {
private static final SkinColor arrowColor = FSkin.getColor(FSkin.Colors.CLR_TEXT); private static final SkinColor arrowColor = FSkin.getColor(FSkin.Colors.CLR_TEXT);
private final ArrowButton[] arrowButtons; private final ArrowButton[] arrowButtons;
public FScrollPane() { public FScrollPane(boolean showBorder0) {
this(null); this(null, showBorder0);
} }
public FScrollPane(final Component c0) { public FScrollPane(final Component c0, boolean showBorder0) {
this(c0, false, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); this(c0, showBorder0, false, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
} }
public FScrollPane(final Component c0, boolean useArrowButtons0) { public FScrollPane(final Component c0, boolean showBorder0, boolean useArrowButtons0) {
this(c0, useArrowButtons0, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); this(c0, showBorder0, useArrowButtons0, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
} }
public FScrollPane(final Component c0, final int vertical0, final int horizontal0) { public FScrollPane(final Component c0, boolean showBorder0, final int vertical0, final int horizontal0) {
this(c0, false, vertical0, horizontal0); this(c0, showBorder0, false, vertical0, horizontal0);
} }
public FScrollPane(final Component c0, boolean useArrowButtons0, final int vertical0, final int horizontal0) { public FScrollPane(final Component c0, boolean showBorder0, boolean useArrowButtons0, final int vertical0, final int horizontal0) {
super(c0, vertical0, horizontal0); super(c0, vertical0, horizontal0);
getVerticalScrollBar().setUnitIncrement(16); getVerticalScrollBar().setUnitIncrement(16);
getHorizontalScrollBar().setUnitIncrement(16); getHorizontalScrollBar().setUnitIncrement(16);
getViewport().setOpaque(false); getViewport().setOpaque(false);
setOpaque(false); setOpaque(false);
if (showBorder0) {
setBorder(new FSkin.LineSkinBorder(FSkin.getColor(FSkin.Colors.CLR_BORDERS)));
}
else {
setBorder((Border)null); setBorder((Border)null);
}
if (useArrowButtons0) { if (useArrowButtons0) {
//ensure scrollbar aren't shown //ensure scrollbar aren't shown
getHorizontalScrollBar().setPreferredSize(new Dimension(0, 0)); getHorizontalScrollBar().setPreferredSize(new Dimension(0, 0));

View File

@@ -43,7 +43,7 @@ public class FScrollPanel extends FScrollPane {
this(layout, useArrowButtons0, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); this(layout, useArrowButtons0, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
} }
public FScrollPanel(final LayoutManager layout, boolean useArrowButtons0, final int vertical0, final int horizontal0) { public FScrollPanel(final LayoutManager layout, boolean useArrowButtons0, final int vertical0, final int horizontal0) {
super(new JPanel(layout), useArrowButtons0, vertical0, horizontal0); super(new JPanel(layout), false, useArrowButtons0, vertical0, horizontal0);
innerPanel = (JPanel)getViewport().getView(); innerPanel = (JPanel)getViewport().getView();
innerPanel.setOpaque(false); innerPanel.setOpaque(false);
} }

View File

@@ -140,7 +140,7 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
this.model = new ItemManagerModel<T>(this, genericType0); this.model = new ItemManagerModel<T>(this, genericType0);
this.table = new ItemListView<T>(this, this.model); this.table = new ItemListView<T>(this, this.model);
this.table.setAllowMultipleSelections(false); this.table.setAllowMultipleSelections(false);
this.viewScroller = new FScrollPane(this.table.getComponent()); this.viewScroller = new FScrollPane(this.table.getComponent(), false);
this.viewScroller.setBorder(new FSkin.LineSkinBorder(FSkin.getColor(FSkin.Colors.CLR_TEXT))); this.viewScroller.setBorder(new FSkin.LineSkinBorder(FSkin.getColor(FSkin.Colors.CLR_TEXT)));
this.cbViews.addItem(this.table); this.cbViews.addItem(this.table);
} }

View File

@@ -61,7 +61,7 @@ public class CardViewer extends JPanel {
this.detail = new CardDetailPanel(null); this.detail = new CardDetailPanel(null);
this.picture = new CardPicturePanel(); this.picture = new CardPicturePanel();
this.add(new FScrollPane(this.jList)); this.add(new FScrollPane(this.jList, true));
this.add(this.picture); this.add(this.picture);
this.add(this.detail); this.add(this.detail);
this.setLayout(new java.awt.GridLayout(1, 3, 6, 0)); this.setLayout(new java.awt.GridLayout(1, 3, 6, 0));

View File

@@ -73,7 +73,7 @@ public class ViewStall extends JPanel {
this.tpnFluff = new SkinnedTextPane(); this.tpnFluff = new SkinnedTextPane();
this.pnlInventory = new JPanel(); this.pnlInventory = new JPanel();
this.scrInventory = new FScrollPane(this.pnlInventory); this.scrInventory = new FScrollPane(this.pnlInventory, false);
this.parentView = v0; this.parentView = v0;
this.lstItemPanels = new ArrayList<ViewItem>(); this.lstItemPanels = new ArrayList<ViewItem>();

View File

@@ -208,7 +208,7 @@ public enum FView {
files.setWrapStyleWord(true); files.setWrapStyleWord(true);
files.setLineWrap(true); files.setLineWrap(true);
files.setEditable(false); files.setEditable(false);
FScrollPane scroller = new FScrollPane(files); FScrollPane scroller = new FScrollPane(files, true);
p.add(scroller, "w 600:100%:100%, h 100:100%:100%, gaptop 10"); p.add(scroller, "w 600:100%:100%, h 100:100%:100%, gaptop 10");
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {