Skip to content

Commit ca1161e

Browse files
add info counter and align counters
1 parent adf0d6a commit ca1161e

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class RunnerPanel implements FocusListener {
5555
JLabel failureCounterValueLabel
5656
JLabel disabledCounterValueLabel
5757
JLabel warningsCounterValueLabel
58+
JLabel infoCounterValueLabel
5859
JProgressBar progressBar;
5960
TestOverviewTableModel testOverviewTableModel
6061
JTable testOverviewTable
@@ -120,6 +121,7 @@ class RunnerPanel implements FocusListener {
120121
failureCounterValueLabel.text = '''«run.counter.failure»'''
121122
disabledCounterValueLabel.text = '''«run.counter.disabled»'''
122123
warningsCounterValueLabel.text = '''«run.counter.warning»'''
124+
infoCounterValueLabel.text = '''«run.infoCount»'''
123125
if (run.totalNumberOfTests == 0) {
124126
progressBar.value = 100
125127
} else {
@@ -235,7 +237,7 @@ class RunnerPanel implements FocusListener {
235237
}
236238
}
237239

238-
private def makeLabelledComponent (JLabel label, JComponent comp) {
240+
private def makeLabelledCounterComponent (JLabel label, JComponent comp) {
239241
val groupPanel = new JPanel
240242
groupPanel.layout = new GridBagLayout
241243
var GridBagConstraints c = new GridBagConstraints
@@ -257,10 +259,13 @@ class RunnerPanel implements FocusListener {
257259
c.gridheight = 1
258260
c.insets = new Insets(5, 5, 5, 10) // top, left, bottom, right
259261
c.anchor = GridBagConstraints::WEST
260-
c.fill = GridBagConstraints::NONE
261-
c.weightx = 0
262+
c.fill = GridBagConstraints::HORIZONTAL
263+
c.weightx = 1
262264
c.weighty = 0
263265
groupPanel.add(comp, c)
266+
val dim = new Dimension(154, 24)
267+
groupPanel.minimumSize = dim
268+
groupPanel.preferredSize = dim
264269
return groupPanel
265270
}
266271

@@ -290,27 +295,32 @@ class RunnerPanel implements FocusListener {
290295
val testCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_TESTS_LABEL") + ":",
291296
UtplsqlResources.getIcon("UTPLSQL_ICON"), JLabel::LEADING)
292297
testCounterValueLabel = new JLabel
293-
counterPanel.add(makeLabelledComponent(testCounterLabel, testCounterValueLabel))
298+
counterPanel.add(makeLabelledCounterComponent(testCounterLabel, testCounterValueLabel))
294299
// - Failure counter
295300
val failureCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_FAILURES_LABEL") + ":",
296301
UtplsqlResources.getIcon("FAILURE_ICON"), JLabel::LEADING)
297302
failureCounterValueLabel = new JLabel
298-
counterPanel.add(makeLabelledComponent(failureCounterLabel,failureCounterValueLabel))
303+
counterPanel.add(makeLabelledCounterComponent(failureCounterLabel,failureCounterValueLabel))
299304
// - Error counter
300305
val errorCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_ERRORS_LABEL") + ":",
301306
UtplsqlResources.getIcon("ERROR_ICON"), JLabel::LEADING)
302307
errorCounterValueLabel = new JLabel
303-
counterPanel.add(makeLabelledComponent(errorCounterLabel, errorCounterValueLabel))
308+
counterPanel.add(makeLabelledCounterComponent(errorCounterLabel, errorCounterValueLabel))
304309
// - Disabled counter
305310
val disabledCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_DISABLED_LABEL") + ":",
306311
UtplsqlResources.getIcon("DISABLED_ICON"), JLabel::LEADING)
307312
disabledCounterValueLabel = new JLabel
308-
counterPanel.add(makeLabelledComponent(disabledCounterLabel, disabledCounterValueLabel))
313+
counterPanel.add(makeLabelledCounterComponent(disabledCounterLabel, disabledCounterValueLabel))
309314
// - Warnings counter
310315
val warningsCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_WARNINGS_LABEL") + ":",
311316
UtplsqlResources.getIcon("WARNING_ICON"), JLabel::LEADING)
312317
warningsCounterValueLabel = new JLabel
313-
counterPanel.add(makeLabelledComponent(warningsCounterLabel, warningsCounterValueLabel))
318+
counterPanel.add(makeLabelledCounterComponent(warningsCounterLabel, warningsCounterValueLabel))
319+
// - Info counter
320+
val infoCounterLabel = new JLabel(UtplsqlResources.getString("RUNNER_INFO_LABEL") + ":",
321+
UtplsqlResources.getIcon("INFO_ICON"), JLabel::LEADING)
322+
infoCounterValueLabel = new JLabel
323+
counterPanel.add(makeLabelledCounterComponent(infoCounterLabel, infoCounterValueLabel))
314324
// - add everything to basePanel
315325
c.gridx = 0
316326
c.gridy = 1

0 commit comments

Comments
 (0)