Skip to content

Commit 0afe030

Browse files
authored
Merge pull request #5890 from kwvanderlinde/bugfix/5814-table-cell-borders
Add table lines to Edit Token dialog's speech table
2 parents ce97f3b + 3d28efe commit 0afe030

File tree

7 files changed

+70
-59
lines changed

7 files changed

+70
-59
lines changed

src/main/java/net/rptools/maptool/client/MapTool.java

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515
package net.rptools.maptool.client;
1616

17-
import com.jidesoft.plaf.LookAndFeelFactory;
1817
import com.jidesoft.plaf.UIDefaultsLookup;
1918
import com.jidesoft.plaf.basic.ThemePainter;
2019
import io.sentry.EventProcessor;
@@ -1266,62 +1265,63 @@ public static MapToolFrame getFrame() {
12661265
return clientFrame;
12671266
}
12681267

1269-
private static void configureJide() {
1270-
LookAndFeelFactory.UIDefaultsCustomizer uiDefaultsCustomizer =
1271-
defaults -> {
1272-
ThemePainter painter = (ThemePainter) UIDefaultsLookup.get("Theme.painter");
1273-
defaults.put("OptionPaneUI", "com.jidesoft.plaf.basic.BasicJideOptionPaneUI");
1274-
1275-
// show banner or not. default is true
1276-
defaults.put("OptionPane.showBanner", Boolean.FALSE);
1277-
defaults.put("OptionPane.bannerIcon", RessourceManager.getSmallIcon(Icons.MAPTOOL));
1278-
defaults.put("OptionPane.bannerFontSize", 13);
1279-
defaults.put("OptionPane.bannerFontStyle", Font.BOLD);
1280-
defaults.put("OptionPane.bannerMaxCharsPerLine", 60);
1281-
// you should adjust this if banner background is not the default gradient paint
1282-
defaults.put(
1283-
"OptionPane.bannerForeground",
1284-
painter != null ? painter.getOptionPaneBannerForeground() : null);
1285-
defaults.put("OptionPane.bannerBorder", null); // use default border
1286-
1287-
// set both bannerBackgroundDk and bannerBackgroundLt to null if you don't want
1288-
// gradient
1289-
defaults.put(
1290-
"OptionPane.bannerBackgroundDk",
1291-
painter != null ? painter.getOptionPaneBannerDk() : null);
1292-
defaults.put(
1293-
"OptionPane.bannerBackgroundLt",
1294-
painter != null ? painter.getOptionPaneBannerLt() : null);
1295-
// default is true
1296-
defaults.put("OptionPane.bannerBackgroundDirection", Boolean.TRUE);
1297-
1298-
// optionally, you can set a Paint object for BannerPanel. If so, the three
1299-
// UIDefaults
1300-
// related to banner background above will be ignored.
1301-
defaults.put("OptionPane.bannerBackgroundPaint", null);
1302-
1303-
defaults.put("OptionPane.buttonAreaBorder", BorderFactory.createEmptyBorder(6, 6, 6, 6));
1304-
defaults.put("OptionPane.buttonOrientation", SwingConstants.RIGHT);
1305-
1306-
defaults.put(
1307-
"DockableFrame.inactiveTitleBackground",
1308-
UIManager.getColor("InternalFrame.inactiveTitleBackground"));
1309-
defaults.put(
1310-
"DockableFrame.inactiveTitleForeground",
1311-
UIManager.getColor("InternalFrame.inactiveTitleForeground"));
1312-
defaults.put(
1313-
"DockableFrame.activeTitleBackground",
1314-
UIManager.getColor("InternalFrame.activeTitleBackground"));
1315-
defaults.put(
1316-
"DockableFrame.activeTitleForeground",
1317-
UIManager.getColor("InternalFrame.activeTitleForeground"));
1318-
defaults.put("DockableFrame.background", UIManager.getColor("Panel.background"));
1319-
defaults.put(
1320-
"DockableFrame.border",
1321-
BorderFactory.createLineBorder(UIManager.getColor("Panel.background")));
1322-
defaults.put("DockableFrameTitlePane.showIcon", true);
1323-
};
1324-
uiDefaultsCustomizer.customize(UIManager.getDefaults());
1268+
private static void configureLaf() {
1269+
final var defaults = UIManager.getDefaults();
1270+
1271+
// region JIDE LAF
1272+
ThemePainter painter = (ThemePainter) UIDefaultsLookup.get("Theme.painter");
1273+
defaults.put("OptionPaneUI", "com.jidesoft.plaf.basic.BasicJideOptionPaneUI");
1274+
1275+
// show banner or not. default is true
1276+
defaults.put("OptionPane.showBanner", Boolean.FALSE);
1277+
defaults.put("OptionPane.bannerIcon", RessourceManager.getSmallIcon(Icons.MAPTOOL));
1278+
defaults.put("OptionPane.bannerFontSize", 13);
1279+
defaults.put("OptionPane.bannerFontStyle", Font.BOLD);
1280+
defaults.put("OptionPane.bannerMaxCharsPerLine", 60);
1281+
// you should adjust this if banner background is not the default gradient paint
1282+
defaults.put(
1283+
"OptionPane.bannerForeground",
1284+
painter != null ? painter.getOptionPaneBannerForeground() : null);
1285+
defaults.put("OptionPane.bannerBorder", null); // use default border
1286+
1287+
// set both bannerBackgroundDk and bannerBackgroundLt to null if you don't want
1288+
// gradient
1289+
defaults.put(
1290+
"OptionPane.bannerBackgroundDk", painter != null ? painter.getOptionPaneBannerDk() : null);
1291+
defaults.put(
1292+
"OptionPane.bannerBackgroundLt", painter != null ? painter.getOptionPaneBannerLt() : null);
1293+
// default is true
1294+
defaults.put("OptionPane.bannerBackgroundDirection", Boolean.TRUE);
1295+
1296+
// optionally, you can set a Paint object for BannerPanel. If so, the three
1297+
// UIDefaults
1298+
// related to banner background above will be ignored.
1299+
defaults.put("OptionPane.bannerBackgroundPaint", null);
1300+
1301+
defaults.put("OptionPane.buttonAreaBorder", BorderFactory.createEmptyBorder(6, 6, 6, 6));
1302+
defaults.put("OptionPane.buttonOrientation", SwingConstants.RIGHT);
1303+
1304+
defaults.put(
1305+
"DockableFrame.inactiveTitleBackground",
1306+
UIManager.getColor("InternalFrame.inactiveTitleBackground"));
1307+
defaults.put(
1308+
"DockableFrame.inactiveTitleForeground",
1309+
UIManager.getColor("InternalFrame.inactiveTitleForeground"));
1310+
defaults.put(
1311+
"DockableFrame.activeTitleBackground",
1312+
UIManager.getColor("InternalFrame.activeTitleBackground"));
1313+
defaults.put(
1314+
"DockableFrame.activeTitleForeground",
1315+
UIManager.getColor("InternalFrame.activeTitleForeground"));
1316+
defaults.put("DockableFrame.background", UIManager.getColor("Panel.background"));
1317+
defaults.put(
1318+
"DockableFrame.border",
1319+
BorderFactory.createLineBorder(UIManager.getColor("Panel.background")));
1320+
defaults.put("DockableFrameTitlePane.showIcon", true);
1321+
// endregion
1322+
1323+
defaults.put("Table.showHorizontalLines", Boolean.TRUE);
1324+
defaults.put("Table.showVerticalLines", Boolean.TRUE);
13251325
}
13261326

13271327
private static void postInitialize() {
@@ -1731,7 +1731,7 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
17311731
com.jidesoft.utils.Lm.verifyLicense(
17321732
"Trevor Croft", "rptools", "5MfIVe:WXJBDrToeLWPhMv3kI2s3VFo");
17331733

1734-
configureJide();
1734+
configureLaf();
17351735
} catch (Exception e) {
17361736
MapTool.showError("msg.error.lafSetup", e);
17371737
System.exit(1);

src/main/java/net/rptools/maptool/client/ui/addon/AddOnLibrariesDialogView.form

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
<children>
6464
<component id="7b8c5" class="javax.swing.JTable" binding="addOnLibraryTable">
6565
<constraints/>
66-
<properties/>
66+
<properties>
67+
<showHorizontalLines value="false"/>
68+
<showVerticalLines value="false"/>
69+
</properties>
6770
</component>
6871
</children>
6972
</scrollpane>

src/main/java/net/rptools/maptool/client/ui/addresource/AddResourceDialogView.form

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@
201201
<properties>
202202
<autoCreateRowSorter value="true"/>
203203
<name value="libraryTable"/>
204+
<showHorizontalLines value="false"/>
205+
<showVerticalLines value="false"/>
204206
</properties>
205207
</component>
206208
</children>

src/main/java/net/rptools/maptool/client/ui/connecttoserverdialog/ConnectToServerDialogView.form

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@
9999
<constraints/>
100100
<properties>
101101
<name value="aliasTable"/>
102+
<showHorizontalLines value="false"/>
103+
<showVerticalLines value="false"/>
102104
</properties>
103105
</component>
104106
</children>

src/main/java/net/rptools/maptool/client/ui/lookuptable/EditLookupTablePanelView.form

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<constraints/>
2222
<properties>
2323
<preferredScrollableViewportSize width="450" height="150"/>
24+
<rowSelectionAllowed value="false"/>
2425
</properties>
2526
</component>
2627
</children>

src/main/java/net/rptools/maptool/client/ui/token/dialog/edit/TokenPropertiesDialog.form

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
<constraints/>
9898
<properties>
9999
<name value="speechTable"/>
100+
<rowSelectionAllowed value="false"/>
100101
</properties>
101102
</component>
102103
</children>

src/main/java/net/rptools/maptool/client/ui/transferprogressdialog/TransferProgressDialogView.form

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
<constraints/>
2828
<properties>
2929
<name value="transferTable"/>
30+
<showHorizontalLines value="false"/>
31+
<showVerticalLines value="false"/>
3032
</properties>
3133
</component>
3234
</children>

0 commit comments

Comments
 (0)