Skip to content

Commit b6dd21f

Browse files
committed
String extraction
1 parent 34ac29f commit b6dd21f

File tree

18 files changed

+85
-73
lines changed

18 files changed

+85
-73
lines changed

weasis-acquire/weasis-acquire-explorer/src/main/java/org/weasis/acquire/explorer/gui/central/meta/panel/AnatomicRegionView.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public AnatomicRegionView(AnatomicRegion region, boolean selectSeries) {
8585
}
8686

8787
void jbInit() {
88-
setLayout(new MigLayout("wrap 2", "[right][grow]", "[]10[]10[]20[]"));
88+
setLayout(new MigLayout("wrap 2", "[right][grow]", "[]10[]10[]20[]")); // NON-NLS
8989

9090
setBorder(GuiUtils.getEmptyBorder(10, 15, 10, 15));
9191

@@ -122,18 +122,18 @@ void jbInit() {
122122
ratioGroup.add(radioButtonSeries);
123123
ratioGroup.add(radioButtonImage);
124124

125-
add(new JLabel("Category" + StringUtil.COLON), "right");
126-
add(comboBox1, "growx");
125+
add(new JLabel("Category" + StringUtil.COLON), "right"); // NON-NLS
126+
add(comboBox1, "growx"); // NON-NLS
127127

128-
add(new JLabel("Region" + StringUtil.COLON), "right");
129-
add(comboBox2, "growx 500");
128+
add(new JLabel("Region" + StringUtil.COLON), "right"); // NON-NLS
129+
add(comboBox2, "growx 500"); // NON-NLS
130130

131131
List<Object> list = Stream.of(AnatomicModifier.values()).collect(Collectors.toList());
132132
modifierGroup.setModel(list, false, false);
133-
modifiersDropdown.setToolTipText("Select modifiers");
134-
add(modifiersDropdown, "cell 1 2, span");
133+
modifiersDropdown.setToolTipText("Select modifiers"); // NON-NLS
134+
add(modifiersDropdown, "cell 1 2, span"); // NON-NLS
135135

136-
add(lblApplyTo, "span, split 3, right, gaptop 20");
136+
add(lblApplyTo, "span, split 3, right, gaptop 20"); // NON-NLS
137137
add(radioButtonSeries);
138138
add(radioButtonImage);
139139
}

weasis-acquire/weasis-acquire-explorer/src/main/java/org/weasis/acquire/explorer/gui/dialog/AcquirePublishDialog.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,24 @@ public void windowClosing(WindowEvent we) {
142142
}
143143

144144
private JPanel initContent() {
145-
JPanel contentPane = new JPanel(new MigLayout("fill, insets 10", "[grow]", "[][][grow][]"));
145+
JPanel contentPane =
146+
new JPanel(new MigLayout("fill, insets 10", "[grow]", "[][][grow][]")); // NON-NLS
146147

147148
JLabel questionLabel = new JLabel(Messages.getString("AcquirePublishDialog.select_pub"));
148149
questionLabel.setFont(FontItem.DEFAULT_SEMIBOLD.getFont());
149150

150-
contentPane.add(questionLabel, "wrap");
151+
contentPane.add(questionLabel, "wrap"); // NON-NLS
151152
publishTree = new PublishTree();
152153
publishTree.addTreeCheckingListener(
153154
evt -> {
154155
resolutionCombo.setEnabled(!getOversizedSelected(publishTree).isEmpty());
155156
});
156-
contentPane.add(publishTree, "grow, wrap");
157+
contentPane.add(publishTree, "grow, wrap"); // NON-NLS
157158

158159
contentPane.add(
159160
new JLabel(
160161
Messages.getString("AcquirePublishDialog.resolution") + StringUtil.COLON_AND_SPACE),
161-
"split 2, span");
162+
"split 2, span"); // NON-NLS
162163
resolutionCombo = new JComboBox<>(Resolution.values());
163164
Preferences prefs =
164165
BundlePreferences.getDefaultPreferences(AppProperties.getBundleContext(this.getClass()));
@@ -168,15 +169,15 @@ private JPanel initContent() {
168169
Resolution.getInstance(p.get(P_LAST_RESOLUTION, Resolution.ORIGINAL.name())));
169170
}
170171
resolutionCombo.setEnabled(false);
171-
contentPane.add(resolutionCombo, "wrap");
172+
contentPane.add(resolutionCombo, "wrap"); // NON-NLS
172173

173174
JLabel lblDestination =
174175
new JLabel(
175176
Messages.getString("AcquirePublishDialog.lblDestination.text") + StringUtil.COLON);
176177
AbstractDicomNode.addTooltipToComboList(comboNode);
177178
loadDicomNodes();
178-
contentPane.add(lblDestination, "split 2, span");
179-
contentPane.add(comboNode, " wrap");
179+
contentPane.add(lblDestination, "split 2, span"); // NON-NLS
180+
contentPane.add(comboNode, " wrap"); // NON-NLS
180181

181182
publishButton = new JButton(Messages.getString("AcquirePublishDialog.publish"));
182183
publishButton.addActionListener(e -> publishAction());
@@ -188,9 +189,9 @@ private JPanel initContent() {
188189
progressBar = new JProgressBar();
189190
progressBar.setStringPainted(true);
190191
progressBar.setVisible(false);
191-
contentPane.add(progressBar, "split 3, span, growx, gaptop 20");
192+
contentPane.add(progressBar, "split 3, span, growx, gaptop 20"); // NON-NLS
192193
contentPane.add(publishButton);
193-
contentPane.add(cancelButton, "wrap");
194+
contentPane.add(cancelButton, "wrap"); // NON-NLS
194195
return contentPane;
195196
}
196197

weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisWin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ public void popupMenuWillBecomeVisible() {
10411041
menuFile.add(exportMenu);
10421042

10431043
DynamicMenu launcherMenu =
1044-
new DynamicMenu("Launcher") {
1044+
new DynamicMenu(Messages.getString("launcher")) {
10451045

10461046
@Override
10471047
public void popupMenuWillBecomeVisible() {

weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ open.logging.folder=Open the logging folder
3131

3232
LicencesDialog.title=Plugin licenses
3333
LicencesDialog.no.licence=No license found
34+
launcher=Launcher

weasis-core/src/main/java/org/weasis/core/api/media/data/FileCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public FileCache(MediaReader reader) {
3131
}
3232

3333
public boolean isLocalFile() {
34-
return reader.getUri().getScheme().startsWith("file");
34+
return reader.getUri().getScheme().startsWith("file"); // NON-NLS
3535
}
3636

3737
public boolean isElementInMemory() {

weasis-core/src/main/java/org/weasis/core/api/service/BundleTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static void registerToolBar(Insertable instance, SeriesViewerUI ui) {
136136
List<Toolbar> toolBars = ui.getToolBars();
137137
if (instance instanceof Toolbar bar && !toolBars.contains(instance)) {
138138
toolBars.add(bar);
139-
if (ui.clazz.getPackageName().contains("dicom")) {
139+
if (ui.clazz.getPackageName().contains("dicom")) { // NON-NLS
140140
notifyDicomModel(ObservableEvent.BasicAction.UPDATE_TOOLBARS, ui);
141141
} else {
142142
notifyDefaultDataModel(ObservableEvent.BasicAction.UPDATE_TOOLBARS, ui);

weasis-core/src/main/java/org/weasis/core/ui/launcher/ConfigurationDialog.java

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class ConfigurationDialog extends JDialog {
3939

4040
public ConfigurationDialog(Window parent, Launcher launcher, Launcher.Type type) {
4141
super(parent, Messages.getString("launcher.type"), ModalityType.APPLICATION_MODAL);
42-
setLayout(new MigLayout("insets 10lp 15lp 10lp 15lp", "[][grow]", "[][]"));
42+
setLayout(new MigLayout("insets 10lp 15lp 10lp 15lp", "[][grow]", "[][]")); // NON-NLS
4343

4444
ButtonGroup group = new ButtonGroup();
4545
group.add(uriRadioButton);
@@ -49,43 +49,48 @@ public ConfigurationDialog(Window parent, Launcher launcher, Launcher.Type type)
4949
this.launcher = launcher;
5050
initialize(launcher);
5151

52-
add(uriRadioButton, "cell 0 0");
53-
add(appRadioButton, "cell 1 0");
52+
add(uriRadioButton, "cell 0 0"); // NON-NLS
53+
add(appRadioButton, "cell 1 0"); // NON-NLS
5454

5555
cardPanel = new JPanel(new CardLayout());
5656
cardPanel.setBorder(BorderFactory.createTitledBorder(Messages.getString("configuration")));
5757

5858
JPanel uriPanel = new JPanel(new MigLayout("", "[][grow]", "[]")); // NON-NLS
59-
uriPanel.add(new JLabel(Messages.getString("uri") + StringUtil.COLON), "cell 0 0");
60-
uriPanel.add(uriField, "cell 1 0, growx");
59+
uriPanel.add(new JLabel(Messages.getString("uri") + StringUtil.COLON), "cell 0 0"); // NON-NLS
60+
uriPanel.add(uriField, "cell 1 0, growx"); // NON-NLS
6161

6262
JPanel appPanel = new JPanel(new MigLayout("", "[][grow]", "[][][][][]")); // NON-NLS
63-
appPanel.add(new JLabel(Messages.getString("binary.path") + StringUtil.COLON), "cell 0 0");
64-
appPanel.add(binaryPathField, "cell 1 0, growx");
63+
appPanel.add(
64+
new JLabel(Messages.getString("binary.path") + StringUtil.COLON), "cell 0 0"); // NON-NLS
65+
appPanel.add(binaryPathField, "cell 1 0, growx"); // NON-NLS
6566

66-
appPanel.add(new JLabel(Messages.getString("working.dir") + StringUtil.COLON), "cell 0 1");
67-
appPanel.add(workingDirectoryField, "cell 1 1, growx");
67+
appPanel.add(
68+
new JLabel(Messages.getString("working.dir") + StringUtil.COLON), "cell 0 1"); // NON-NLS
69+
appPanel.add(workingDirectoryField, "cell 1 1, growx"); // NON-NLS
6870

69-
appPanel.add(new JLabel(Messages.getString("parameters") + StringUtil.COLON), "cell 0 2");
70-
appPanel.add(new JScrollPane(parametersArea), "cell 1 2, growx");
71+
appPanel.add(
72+
new JLabel(Messages.getString("parameters") + StringUtil.COLON), "cell 0 2"); // NON-NLS
73+
appPanel.add(new JScrollPane(parametersArea), "cell 1 2, growx"); // NON-NLS
7174

72-
appPanel.add(new JLabel(Messages.getString("env.variables") + StringUtil.COLON), "cell 0 3");
73-
appPanel.add(new JScrollPane(environmentVariablesArea), "cell 1 3, growx");
75+
appPanel.add(
76+
new JLabel(Messages.getString("env.variables") + StringUtil.COLON), "cell 0 3"); // NON-NLS
77+
appPanel.add(new JScrollPane(environmentVariablesArea), "cell 1 3, growx"); // NON-NLS
7478

75-
appPanel.add(new JLabel(Messages.getString("compatibility") + StringUtil.COLON), "cell 0 4");
76-
appPanel.add(compatibilityField, "cell 1 4, growx");
79+
appPanel.add(
80+
new JLabel(Messages.getString("compatibility") + StringUtil.COLON), "cell 0 4"); // NON-NLS
81+
appPanel.add(compatibilityField, "cell 1 4, growx"); // NON-NLS
7782

7883
cardPanel.add(uriPanel, uriRadioButton.getText());
7984
cardPanel.add(appPanel, appRadioButton.getText());
8085

81-
add(cardPanel, "cell 0 1 2 1, grow");
86+
add(cardPanel, "cell 0 1 2 1, grow"); // NON-NLS
8287

8388
uriRadioButton.addActionListener(_ -> showCard());
8489
appRadioButton.addActionListener(_ -> showCard());
8590

8691
JButton saveButton = new JButton(Messages.getString("save"));
8792
saveButton.addActionListener(_ -> saveConfiguration());
88-
add(saveButton, "cell 1 3, split 2, align right, gapright 15, gaptop 15");
93+
add(saveButton, "cell 1 3, split 2, align right, gapright 15, gaptop 15"); // NON-NLS
8994
JButton cancelButton = new JButton(Messages.getString("cancel"));
9095
cancelButton.addActionListener(_ -> dispose());
9196
add(cancelButton);
@@ -151,7 +156,7 @@ private ApplicationConfiguration setApplicationConfiguration(Configuration confi
151156
appConfig.setWorkingDirectory(workingDirectoryField.getText());
152157
appConfig.setParameters(
153158
new ArrayList<>(
154-
Arrays.stream(parametersArea.getText().split("\\n"))
159+
Arrays.stream(parametersArea.getText().split("\\n")) // NON-NLS
155160
.filter(StringUtil::hasText)
156161
.toList()));
157162
appConfig.setEnvironmentVariables(

weasis-core/src/main/java/org/weasis/core/ui/launcher/Launcher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ public void launch(ImageViewerEventManager<?> eventManager) {
409409
return;
410410
}
411411
boolean isMac = compatibility == Compatibility.MAC;
412-
List<String> command = new ArrayList<>(Arrays.asList(binaryPath.trim().split("\\s+")));
412+
List<String> command =
413+
new ArrayList<>(Arrays.asList(binaryPath.trim().split("\\s+"))); // NON-NLS
413414
if (!isMac && parameters != null && !parameters.isEmpty()) {
414415
for (String param : parameters) {
415416
command.add(resolvePlaceholders(param, eventManager));
@@ -584,7 +585,7 @@ static void saveLaunchers(Type type) {
584585
Set<SeriesViewerUI> uiSet =
585586
viewerPlugins.stream().map(ViewerPlugin::getSeriesViewerUI).collect(Collectors.toSet());
586587
for (SeriesViewerUI ui : uiSet) {
587-
if (ui.clazz.getPackageName().contains("dicom")) {
588+
if (ui.clazz.getPackageName().contains("dicom")) { // NON-NLS
588589
BundleTools.notifyDicomModel(ObservableEvent.BasicAction.UPDATE_TOOLBARS, ui);
589590
} else {
590591
BundleTools.notifyDefaultDataModel(ObservableEvent.BasicAction.UPDATE_TOOLBARS, ui);

weasis-core/src/main/java/org/weasis/core/ui/launcher/LauncherDialog.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public class LauncherDialog extends JDialog {
3232
public LauncherDialog(
3333
Window parent, Launcher.Type type, Launcher launcher, JComboBox<Launcher> nodeComboBox) {
3434
super(parent, type.toString(), ModalityType.APPLICATION_MODAL);
35-
setLayout(new MigLayout("insets 10lp 15lp 10lp 15lp, wrap 2", "[][grow]", "[][][][]"));
35+
setLayout(
36+
new MigLayout("insets 10lp 15lp 10lp 15lp, wrap 2", "[][grow]", "[][][][]")); // NON-NLS
3637
this.type = Objects.requireNonNull(type);
3738
this.nodesComboBox = nodeComboBox;
3839
if (launcher == null) {
@@ -46,23 +47,23 @@ public LauncherDialog(
4647
buttonCheckBox.setSelected(launcher.isButton());
4748
}
4849

49-
add(new JLabel(Messages.getString("name") + StringUtil.COLON), "align right");
50-
add(nameField, "growx");
50+
add(new JLabel(Messages.getString("name") + StringUtil.COLON), "align right"); // NON-NLS
51+
add(nameField, "growx"); // NON-NLS
5152

52-
add(new JLabel(Messages.getString("icon.path") + StringUtil.COLON), "align right");
53-
add(iconNameField, "growx");
53+
add(new JLabel(Messages.getString("icon.path") + StringUtil.COLON), "align right"); // NON-NLS
54+
add(iconNameField, "growx"); // NON-NLS
5455

55-
add(enableCheckBox, "span, split 3");
56-
add(buttonCheckBox, "growx");
56+
add(enableCheckBox, "span, split 3"); // NON-NLS
57+
add(buttonCheckBox, "growx"); // NON-NLS
5758

5859
JButton configurationButton = new JButton(Messages.getString("configure"));
5960
configurationButton.addActionListener(
6061
_ -> new ConfigurationDialog(LauncherDialog.this, this.launcher, type).setVisible(true));
61-
add(configurationButton, "align right");
62+
add(configurationButton, "align right"); // NON-NLS
6263

6364
JButton saveButton = new JButton(Messages.getString("save"));
6465
saveButton.addActionListener(_ -> saveLauncher());
65-
add(saveButton, "cell 1 4, split 2, align right, gapright 15, gaptop 15");
66+
add(saveButton, "cell 1 4, split 2, align right, gapright 15, gaptop 15"); // NON-NLS
6667
JButton cancelButton = new JButton(Messages.getString("cancel"));
6768
cancelButton.addActionListener(_ -> dispose());
6869
add(cancelButton);

weasis-core/src/main/java/org/weasis/core/ui/pref/ThemeSetting.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ private static float parseScaleFactor(String s) {
193193
if (s == null) return -1;
194194

195195
float units = 1;
196-
if (s.endsWith("x")) s = s.substring(0, s.length() - 1);
197-
else if (s.endsWith("dpi")) {
196+
if (s.endsWith("x")) s = s.substring(0, s.length() - 1); // NON-NLS
197+
else if (s.endsWith("dpi")) { // NON-NLS
198198
units = 96;
199199
s = s.substring(0, s.length() - 3);
200200
} else if (s.endsWith("%")) {

0 commit comments

Comments
 (0)