diff --git a/build.gradle b/build.gradle index c5d094e20e..4bccca6c1b 100644 --- a/build.gradle +++ b/build.gradle @@ -15,21 +15,16 @@ buildscript { // Access Git info from build script plugins { id "application" + id "base" + id "java" id "org.ajoberstar.grgit" version "5.0.0" id "com.diffplug.spotless" version "6.18.0" id 'org.openjfx.javafxplugin' version '0.0.13' id 'org.beryx.runtime' version '1.13.0' id "com.google.protobuf" version "0.8.19" + id 'io.github.file5.guidesigner' version '1.0.2' } -// Apply the java plugin to add support for Java -apply plugin: 'base' -apply plugin: 'application' -apply plugin: 'java' -apply plugin: 'eclipse' -apply plugin: 'com.diffplug.spotless' -apply plugin: 'com.google.protobuf' - // Definitions defaultTasks 'clean', 'build' sourceCompatibility = 20 @@ -161,6 +156,39 @@ run { } } +tasks.register('deleteUiClasses') { + doFirst { + // add all classes generated from intellij forms xml here to force rebuild of them. + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/swing/colorpicker/ColorPanelView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/tool/boardtool/AdjustBoardControlPanelView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/tool/gridtool/AdjustGridControlPanelView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/tool/texttool/EditLabelDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/addresource/AddResourcesDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/campaignproperties/CampaignPropertiesDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/campaignproperties/TokenPropertiesManagementPanelView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/connectioninfodialog/ConnectionInfoDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/connecttoserverdialog/ConnectToServerDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/exportdialog/ExportDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/io/CampaignItemListView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/io/UpdateRepoDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/lookuptable/EditLookupTablePanelView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/lookuptable/LookupTablePaneView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/macrobuttons/dialog/MacroButtonDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/mappropertiesdialog/MapPropertiesDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/preferencesdialog/PreferencesDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/startserverdialog/StartServerDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/token/dialog/create/NewTokenDialogView.class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/token/dialog/edit/TokenPropertiesDialog..class") + delete("${buildDir}/classes/java/main/net/rptools/maptool/client/ui/transferprogressdialog/TransferProgressDialogView.class") + } +} + +compileJava { + dependsOn(deleteUiClasses) +} + // Badass Runtime Plugin Options runtime { options = ['--strip-debug', '--strip-native-commands', '--compress', '2', '--no-header-files', '--no-man-pages'] diff --git a/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPanelView.java b/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPanelView.java index 047fb1186c..c9ffa4874c 100644 --- a/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPanelView.java +++ b/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPanelView.java @@ -14,200 +14,13 @@ */ package net.rptools.maptool.client.swing.colorpicker; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; -import com.intellij.uiDesigner.core.Spacer; import java.awt.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javax.swing.*; -import net.rptools.maptool.client.swing.ColorWell; public class ColorPanelView { private JPanel mainPanel; - /* spotless:off */ - - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - mainPanel = new JPanel(); - mainPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), 0, -1)); - panel1.setName("colorPanel"); - mainPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell1 = new ColorWell(); - Font colorWell1Font = UIManager.getFont("Panel.font"); - if (colorWell1Font != null) colorWell1.setFont(colorWell1Font); - colorWell1.setName("foregroundColor"); - panel1.add(colorWell1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(30, 30), null, 0, false)); - final ColorWell colorWell2 = new ColorWell(); - Font colorWell2Font = UIManager.getFont("Panel.font"); - if (colorWell2Font != null) colorWell2.setFont(colorWell2Font); - colorWell2.setName("backgroundColor"); - panel1.add(colorWell2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(30, 30), null, 0, false)); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(4, 4, new Insets(0, 0, 0, 0), 0, 0)); - panel2.setName("recentColors"); - mainPanel.add(panel2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell3 = new ColorWell(); - Font colorWell3Font = UIManager.getFont("Panel.font"); - if (colorWell3Font != null) colorWell3.setFont(colorWell3Font); - colorWell3.setName("recentColor4"); - panel2.add(colorWell3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell4 = new ColorWell(); - Font colorWell4Font = UIManager.getFont("Panel.font"); - if (colorWell4Font != null) colorWell4.setFont(colorWell4Font); - colorWell4.setName("recentColor0"); - panel2.add(colorWell4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell5 = new ColorWell(); - Font colorWell5Font = UIManager.getFont("Panel.font"); - if (colorWell5Font != null) colorWell5.setFont(colorWell5Font); - colorWell5.setName("recentColor1"); - panel2.add(colorWell5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell6 = new ColorWell(); - Font colorWell6Font = UIManager.getFont("Panel.font"); - if (colorWell6Font != null) colorWell6.setFont(colorWell6Font); - colorWell6.setName("recentColor5"); - panel2.add(colorWell6, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell7 = new ColorWell(); - Font colorWell7Font = UIManager.getFont("Panel.font"); - if (colorWell7Font != null) colorWell7.setFont(colorWell7Font); - colorWell7.setName("recentColor2"); - panel2.add(colorWell7, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell8 = new ColorWell(); - Font colorWell8Font = UIManager.getFont("Panel.font"); - if (colorWell8Font != null) colorWell8.setFont(colorWell8Font); - colorWell8.setName("recentColor3"); - panel2.add(colorWell8, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell9 = new ColorWell(); - Font colorWell9Font = UIManager.getFont("Panel.font"); - if (colorWell9Font != null) colorWell9.setFont(colorWell9Font); - colorWell9.setName("recentColor7"); - panel2.add(colorWell9, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell10 = new ColorWell(); - Font colorWell10Font = UIManager.getFont("Panel.font"); - if (colorWell10Font != null) colorWell10.setFont(colorWell10Font); - colorWell10.setName("recentColor6"); - panel2.add(colorWell10, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell11 = new ColorWell(); - Font colorWell11Font = UIManager.getFont("Panel.font"); - if (colorWell11Font != null) colorWell11.setFont(colorWell11Font); - colorWell11.setName("recentColor8"); - panel2.add(colorWell11, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell12 = new ColorWell(); - Font colorWell12Font = UIManager.getFont("Panel.font"); - if (colorWell12Font != null) colorWell12.setFont(colorWell12Font); - colorWell12.setName("recentColor9"); - panel2.add(colorWell12, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell13 = new ColorWell(); - Font colorWell13Font = UIManager.getFont("Panel.font"); - if (colorWell13Font != null) colorWell13.setFont(colorWell13Font); - colorWell13.setName("recentColor15"); - panel2.add(colorWell13, new GridConstraints(3, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell14 = new ColorWell(); - Font colorWell14Font = UIManager.getFont("Panel.font"); - if (colorWell14Font != null) colorWell14.setFont(colorWell14Font); - colorWell14.setName("recentColor10"); - panel2.add(colorWell14, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell15 = new ColorWell(); - Font colorWell15Font = UIManager.getFont("Panel.font"); - if (colorWell15Font != null) colorWell15.setFont(colorWell15Font); - colorWell15.setName("recentColor11"); - panel2.add(colorWell15, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell16 = new ColorWell(); - Font colorWell16Font = UIManager.getFont("Panel.font"); - if (colorWell16Font != null) colorWell16.setFont(colorWell16Font); - colorWell16.setName("recentColor12"); - panel2.add(colorWell16, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell17 = new ColorWell(); - Font colorWell17Font = UIManager.getFont("Panel.font"); - if (colorWell17Font != null) colorWell17.setFont(colorWell17Font); - colorWell17.setName("recentColor13"); - panel2.add(colorWell17, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell18 = new ColorWell(); - Font colorWell18Font = UIManager.getFont("Panel.font"); - if (colorWell18Font != null) colorWell18.setFont(colorWell18Font); - colorWell18.setName("recentColor14"); - panel2.add(colorWell18, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel3 = new JPanel(); - panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), 0, -1)); - mainPanel.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JToggleButton toggleButton1 = new JToggleButton(); - toggleButton1.setAlignmentY(0.0f); - toggleButton1.setName("toggleSnapToGrid"); - toggleButton1.setText(""); - toggleButton1.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "ColorPicker.tooltip.gridSnap")); - panel3.add(toggleButton1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JToggleButton toggleButton2 = new JToggleButton(); - toggleButton2.setName("toggleSquareCap"); - toggleButton2.setText(""); - toggleButton2.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "ColorPicker.tooltip.lineType")); - panel3.add(toggleButton2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JToggleButton toggleButton3 = new JToggleButton(); - toggleButton3.setName("toggleErase"); - toggleButton3.setText(""); - toggleButton3.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "ColorPicker.tooltip.eraser")); - panel3.add(toggleButton3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), 0, -1)); - mainPanel.add(panel4, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label1 = new JLabel(); - label1.setName("penWidthLabel"); - label1.setText(""); - label1.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "ColorPicker.tooltip.penWidth")); - panel4.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setName("opacityLabel"); - label2.setText(""); - label2.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "ColorPicker.tooltip.opacity")); - panel4.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JSpinner spinner1 = new JSpinner(); - spinner1.setName("opacity"); - panel4.add(spinner1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JSpinner spinner2 = new JSpinner(); - spinner2.setName("penWidth"); - panel4.add(spinner2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - panel4.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return mainPanel; - } - - /* spotless:on */ + public JComponent getRootComponent() { + return mainPanel; + } } diff --git a/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPicker.java b/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPicker.java index f6ebabc92a..719ce5fc96 100644 --- a/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPicker.java +++ b/src/main/java/net/rptools/maptool/client/swing/colorpicker/ColorPicker.java @@ -72,7 +72,7 @@ public ColorPicker(JFrame owner) { paintChooser = new PaintChooser(); paintChooser.setPreferredSize(new Dimension(450, 400)); - AbeillePanel panel = new AbeillePanel(new ColorPanelView().$$$getRootComponent$$$()); + AbeillePanel panel = new AbeillePanel(new ColorPanelView().getRootComponent()); ColorWellListener listener = new ColorWellListener(1); diff --git a/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplit.java b/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplit.java index 1b93dfbb82..b76416bed8 100644 --- a/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplit.java +++ b/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplit.java @@ -27,7 +27,7 @@ public class HtmlEditorSplit extends JPanel { public HtmlEditorSplit() { setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); add( - gui.$$$getRootComponent$$$(), + gui.getRootComponent(), new GridConstraints( 0, 0, diff --git a/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.java b/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.java index c80e39d4b1..e476f59fdb 100644 --- a/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.java +++ b/src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.java @@ -14,13 +14,8 @@ */ package net.rptools.maptool.client.swing.htmleditorsplit; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; -import com.intellij.uiDesigner.core.Spacer; import java.awt.*; import java.awt.event.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javafx.application.Platform; import javafx.embed.swing.JFXPanel; import javafx.scene.Scene; @@ -60,94 +55,10 @@ public class HtmlEditorSplitGui { private JFXPanel jfxPanel; private JComboBox textTypeComboBox; - /* spotless:off */ - - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - rootPanel = new JPanel(); - rootPanel.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1)); - tabPanel = new JTabbedPane(); - tabPanel.setName(""); - tabPanel.setTabPlacement(3); - rootPanel.add(tabPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false)); - textTab = new JPanel(); - textTab.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 4, 0), -1, -1)); - textTab.setName(""); - tabPanel.addTab(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "EditTokenDialog.tab.hero.text"), textTab); - sectionPanel = new CollapsibleSectionPanel(); - sectionPanel.setLayout(new BorderLayout(0, 0)); - sectionPanel.setName(""); - textTab.add(sectionPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - textScrollPane = new RTextScrollPane(); - textScrollPane.setFoldIndicatorEnabled(false); - textScrollPane.setIconRowHeaderEnabled(false); - textScrollPane.setLineNumbersEnabled(false); - sectionPanel.add(textScrollPane, BorderLayout.CENTER); - sourceTextArea = new RSyntaxTextArea(); - sourceTextArea.setCodeFoldingEnabled(true); - sourceTextArea.setLineWrap(true); - sourceTextArea.setMarkOccurrences(true); - sourceTextArea.setName(""); - sourceTextArea.setSelectionEnd(0); - sourceTextArea.setSelectionStart(0); - sourceTextArea.setSyntaxEditingStyle("text/html"); - sourceTextArea.setText(""); - textScrollPane.setViewportView(sourceTextArea); - htmlTab = new JPanel(); - htmlTab.setLayout(new GridLayoutManager(1, 1, new Insets(2, 2, 6, 2), -1, -1)); - htmlTab.setName(""); - tabPanel.addTab(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "EditTokenDialog.tab.hero.html"), htmlTab); - jfxPanel = new JFXPanel(); - htmlTab.add(jfxPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label1 = new JLabel(); - label1.setText("Text type"); - rootPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - textTypeComboBox = new JComboBox(); - final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel(); - textTypeComboBox.setModel(defaultComboBoxModel1); - rootPanel.add(textTypeComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - rootPanel.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return rootPanel; - } + public JComponent getRootComponent() { + return rootPanel; + } - /* spotless:on */ private HTMLEditor htmlEditor; private SearchListener searchListener = diff --git a/src/main/java/net/rptools/maptool/client/tool/boardtool/AdjustBoardControlPanelView.java b/src/main/java/net/rptools/maptool/client/tool/boardtool/AdjustBoardControlPanelView.java index 973dcd9a4d..724d9e7a5b 100644 --- a/src/main/java/net/rptools/maptool/client/tool/boardtool/AdjustBoardControlPanelView.java +++ b/src/main/java/net/rptools/maptool/client/tool/boardtool/AdjustBoardControlPanelView.java @@ -14,167 +14,13 @@ */ package net.rptools.maptool.client.tool.boardtool; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; -import com.intellij.uiDesigner.core.Spacer; import java.awt.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javax.swing.*; public class AdjustBoardControlPanelView { private JPanel mainPanel; - /* spotless:off */ - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - mainPanel = new JPanel(); - mainPanel.setLayout(new GridLayoutManager(8, 2, new Insets(5, 5, 5, 5), -1, -1)); - final JLabel label1 = new JLabel(); - label1.setName("snapTitle"); - this.$$$loadLabelText$$$(label1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AdjustBoardDialog.snapto")); - mainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setHorizontalAlignment(0); - this.$$$loadLabelText$$$(label2, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AdjustBoardDialog.title")); - mainPanel.add(label2, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JRadioButton radioButton1 = new JRadioButton(); - radioButton1.setActionCommand("None"); - radioButton1.setName("snapNone"); - this.$$$loadButtonText$$$(radioButton1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AddResourcesDialog.label.none")); - radioButton1.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AdjustBoardDialog.none.tooltip")); - mainPanel.add(radioButton1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JRadioButton radioButton2 = new JRadioButton(); - radioButton2.setActionCommand("None"); - radioButton2.setName("snapGrid"); - this.$$$loadButtonText$$$(radioButton2, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Label.grid")); - radioButton2.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AdjustBoardDialog.grid.tooltip")); - mainPanel.add(radioButton2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JRadioButton radioButton3 = new JRadioButton(); - radioButton3.setActionCommand("None"); - radioButton3.setName("snapTile"); - radioButton3.setSelected(true); - this.$$$loadButtonText$$$(radioButton3, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Label.tile")); - radioButton3.setToolTipText(this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "AdjustBoardDialog.tile.tooltip")); - mainPanel.add(radioButton3, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label3 = new JLabel(); - this.$$$loadLabelText$$$(label3, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.offset.x")); - mainPanel.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JTextField textField1 = new JTextField(); - textField1.setColumns(6); - textField1.setName("offsetX"); - textField1.setText(""); - mainPanel.add(textField1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label4 = new JLabel(); - this.$$$loadLabelText$$$(label4, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.offset.y")); - mainPanel.add(label4, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JTextField textField2 = new JTextField(); - textField2.setColumns(6); - textField2.setName("offsetY"); - textField2.setText(""); - mainPanel.add(textField2, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JButton button1 = new JButton(); - button1.setActionCommand("Close"); - button1.setName("closeButton"); - this.$$$loadButtonText$$$(button1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Button.close")); - mainPanel.add(button1, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - mainPanel.add(spacer1, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - ButtonGroup buttonGroup; - buttonGroup = new ButtonGroup(); - buttonGroup.add(radioButton1); - buttonGroup.add(radioButton2); - buttonGroup.add(radioButton3); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - private void $$$loadLabelText$$$(JLabel component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setDisplayedMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - private void $$$loadButtonText$$$(AbstractButton component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return mainPanel; - } - /* spotless:on */ + public JComponent getRootComponent() { + return mainPanel; + } } diff --git a/src/main/java/net/rptools/maptool/client/tool/boardtool/BoardTool.java b/src/main/java/net/rptools/maptool/client/tool/boardtool/BoardTool.java index 9c6f57fc6d..02845892ad 100644 --- a/src/main/java/net/rptools/maptool/client/tool/boardtool/BoardTool.java +++ b/src/main/java/net/rptools/maptool/client/tool/boardtool/BoardTool.java @@ -80,7 +80,7 @@ public class BoardTool extends DefaultTool { /** Initialize the panel and set up the actions. */ public BoardTool() { // Create the control panel - controlPanel = new AbeillePanel(new AdjustBoardControlPanelView().$$$getRootComponent$$$()); + controlPanel = new AbeillePanel(new AdjustBoardControlPanelView().getRootComponent()); boardPositionXTextField = (JTextField) controlPanel.getComponent("offsetX"); boardPositionXTextField.addKeyListener(new UpdateBoardListener()); diff --git a/src/main/java/net/rptools/maptool/client/tool/gridtool/AdjustGridControlPanelView.java b/src/main/java/net/rptools/maptool/client/tool/gridtool/AdjustGridControlPanelView.java index 239bec18c3..68bd0a1199 100644 --- a/src/main/java/net/rptools/maptool/client/tool/gridtool/AdjustGridControlPanelView.java +++ b/src/main/java/net/rptools/maptool/client/tool/gridtool/AdjustGridControlPanelView.java @@ -14,169 +14,13 @@ */ package net.rptools.maptool.client.tool.gridtool; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; -import com.intellij.uiDesigner.core.Spacer; import java.awt.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javax.swing.*; -import net.rptools.maptool.client.swing.ColorWell; public class AdjustGridControlPanelView { private JPanel mainPanel; - /* spotless:off */ - - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - mainPanel = new JPanel(); - mainPanel.setLayout(new GridLayoutManager(8, 3, new Insets(5, 5, 5, 5), -1, -1)); - final JLabel label1 = new JLabel(); - this.$$$loadLabelText$$$(label1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.size")); - mainPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JSpinner spinner1 = new JSpinner(); - spinner1.setName("gridSize"); - mainPanel.add(spinner1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setHorizontalAlignment(4); - label2.setName("gridSecondDimensionLabel"); - this.$$$loadLabelText$$$(label2, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.size.second")); - mainPanel.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JTextField textField1 = new JTextField(); - textField1.setColumns(6); - textField1.setName("gridSecondDimension"); - textField1.setText(""); - mainPanel.add(textField1, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label3 = new JLabel(); - this.$$$loadLabelText$$$(label3, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.offset.x")); - mainPanel.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JTextField textField2 = new JTextField(); - textField2.setColumns(6); - textField2.setName("offsetX"); - textField2.setText(""); - mainPanel.add(textField2, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label4 = new JLabel(); - this.$$$loadLabelText$$$(label4, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.offset.y")); - mainPanel.add(label4, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label5 = new JLabel(); - this.$$$loadLabelText$$$(label5, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "GridControlPanel.color")); - mainPanel.add(label5, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell1 = new ColorWell(); - Font colorWell1Font = UIManager.getFont("Panel.font"); - if (colorWell1Font != null) colorWell1.setFont(colorWell1Font); - colorWell1.setName("colorWell"); - mainPanel.add(colorWell1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JSlider slider1 = new JSlider(); - slider1.setMajorTickSpacing(20); - slider1.setName("zoomSlider"); - mainPanel.add(slider1, new GridConstraints(5, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JButton button1 = new JButton(); - button1.setActionCommand("Close"); - button1.setName("closeButton"); - this.$$$loadButtonText$$$(button1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Button.close")); - mainPanel.add(button1, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - mainPanel.add(spacer1, new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - final Spacer spacer2 = new Spacer(); - mainPanel.add(spacer2, new GridConstraints(4, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - final JTextField textField3 = new JTextField(); - textField3.setColumns(6); - textField3.setName("offsetY"); - textField3.setText(""); - mainPanel.add(textField3, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - private void $$$loadLabelText$$$(JLabel component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setDisplayedMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - private void $$$loadButtonText$$$(AbstractButton component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return mainPanel; - } - - /* spotless:on */ + public JComponent getRootComponent() { + return mainPanel; + } } diff --git a/src/main/java/net/rptools/maptool/client/tool/gridtool/GridTool.java b/src/main/java/net/rptools/maptool/client/tool/gridtool/GridTool.java index 737fd69589..fbe0b2fecb 100644 --- a/src/main/java/net/rptools/maptool/client/tool/gridtool/GridTool.java +++ b/src/main/java/net/rptools/maptool/client/tool/gridtool/GridTool.java @@ -72,7 +72,7 @@ private enum Size { public GridTool() { // Create the control panel - controlPanel = new AbeillePanel(new AdjustGridControlPanelView().$$$getRootComponent$$$()); + controlPanel = new AbeillePanel(new AdjustGridControlPanelView().getRootComponent()); gridSizeSpinner = (JSpinner) controlPanel.getComponent("gridSize"); gridSizeSpinner.setModel(new SpinnerNumberModel()); diff --git a/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialog.java b/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialog.java index a3f3579a1e..fe8eab0b4b 100644 --- a/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialog.java +++ b/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialog.java @@ -32,7 +32,7 @@ public class LayerSelectionDialog extends JPanel { private final Zone.Layer[] layerList; public LayerSelectionDialog(Zone.Layer[] layerList, LayerSelectionListener listener) { - panel = new AbeillePanel(new LayerSelectionDialogView().$$$getRootComponent$$$()); + panel = new AbeillePanel(new LayerSelectionDialogView().getRootComponent()); this.listener = listener; this.layerList = layerList; setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); diff --git a/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialogView.java b/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialogView.java index e5730eb2d6..53d9db5c25 100644 --- a/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialogView.java +++ b/src/main/java/net/rptools/maptool/client/tool/layerselectiondialog/LayerSelectionDialogView.java @@ -14,90 +14,13 @@ */ package net.rptools.maptool.client.tool.layerselectiondialog; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; import java.awt.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javax.swing.*; public class LayerSelectionDialogView { private JPanel mainPanel; - /* spotless:off */ - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - mainPanel = new JPanel(); - mainPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1)); - final JList list1 = new JList(); - list1.setName("layerList"); - mainPanel.add(list1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label1 = new JLabel(); - this.$$$loadLabelText$$$(label1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Label.layer")); - mainPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - private void $$$loadLabelText$$$(JLabel component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setDisplayedMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return mainPanel; - } - /* spotless:on */ + public JComponent getRootComponent() { + return mainPanel; + } } diff --git a/src/main/java/net/rptools/maptool/client/tool/texttool/EditLabelDialogView.java b/src/main/java/net/rptools/maptool/client/tool/texttool/EditLabelDialogView.java index 9d8551ef03..490184addd 100644 --- a/src/main/java/net/rptools/maptool/client/tool/texttool/EditLabelDialogView.java +++ b/src/main/java/net/rptools/maptool/client/tool/texttool/EditLabelDialogView.java @@ -14,147 +14,13 @@ */ package net.rptools.maptool.client.tool.texttool; -import com.intellij.uiDesigner.core.GridConstraints; -import com.intellij.uiDesigner.core.GridLayoutManager; import java.awt.*; -import java.lang.reflect.Method; -import java.util.ResourceBundle; import javax.swing.*; -import net.rptools.maptool.client.swing.ColorWell; public class EditLabelDialogView { private JPanel mainPanel; - /* spotless:off */ - - { -// GUI initializer generated by IntelliJ IDEA GUI Designer -// >>> IMPORTANT!! <<< -// DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - mainPanel = new JPanel(); - mainPanel.setLayout(new GridLayoutManager(4, 2, new Insets(5, 5, 5, 5), -1, -1)); - final JTextField textField1 = new JTextField(); - textField1.setName("@label"); - textField1.setText(""); - mainPanel.add(textField1, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label1 = new JLabel(); - this.$$$loadLabelText$$$(label1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Label.showbackground")); - mainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JCheckBox checkBox1 = new JCheckBox(); - checkBox1.setName("@showBackground"); - checkBox1.setText(""); - mainPanel.add(checkBox1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); - mainPanel.add(panel1, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JButton button1 = new JButton(); - button1.setActionCommand("OK"); - button1.setName("okButton"); - this.$$$loadButtonText$$$(button1, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Button.ok")); - panel1.add(button1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JButton button2 = new JButton(); - button2.setActionCommand("Cancel"); - button2.setName("cancelButton"); - this.$$$loadButtonText$$$(button2, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Button.cancel")); - panel1.add(button2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - this.$$$loadLabelText$$$(label2, this.$$$getMessageFromBundle$$$("net/rptools/maptool/language/i18n", "Label.foreground")); - mainPanel.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final ColorWell colorWell1 = new ColorWell(); - Font colorWell1Font = UIManager.getFont("Panel.font"); - if (colorWell1Font != null) colorWell1.setFont(colorWell1Font); - colorWell1.setName("foregroundColor"); - mainPanel.add(colorWell1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - } - - private static Method $$$cachedGetBundleMethod$$$ = null; - - private String $$$getMessageFromBundle$$$(String path, String key) { - ResourceBundle bundle; - try { - Class thisClass = this.getClass(); - if ($$$cachedGetBundleMethod$$$ == null) { - Class dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); - $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); - } - bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); - } catch (Exception e) { - bundle = ResourceBundle.getBundle(path); - } - return bundle.getString(key); - } - - /** - * @noinspection ALL - */ - private void $$$loadLabelText$$$(JLabel component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setDisplayedMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - private void $$$loadButtonText$$$(AbstractButton component, String text) { - StringBuffer result = new StringBuffer(); - boolean haveMnemonic = false; - char mnemonic = '\0'; - int mnemonicIndex = -1; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - i++; - if (i == text.length()) break; - if (!haveMnemonic && text.charAt(i) != '&') { - haveMnemonic = true; - mnemonic = text.charAt(i); - mnemonicIndex = result.length(); - } - } - result.append(text.charAt(i)); - } - component.setText(result.toString()); - if (haveMnemonic) { - component.setMnemonic(mnemonic); - component.setDisplayedMnemonicIndex(mnemonicIndex); - } - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return mainPanel; - } - - /* spotless:on */ + public JComponent getRootComponent() { + return mainPanel; + } } diff --git a/src/main/java/net/rptools/maptool/client/tool/texttool/TextTool.java b/src/main/java/net/rptools/maptool/client/tool/texttool/TextTool.java index bbd05a6ba0..76f15a7468 100644 --- a/src/main/java/net/rptools/maptool/client/tool/texttool/TextTool.java +++ b/src/main/java/net/rptools/maptool/client/tool/texttool/TextTool.java @@ -218,7 +218,7 @@ public class EditLabelPanel extends AbeillePanel