Skip to content

Commit 33ded7b

Browse files
individual size, resize properties per component, reduce window size
1 parent e5b996a commit 33ded7b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

sqldev/src/main/java/org/utplsql/sqldev/CodeCoverageReporterWindow.xtend

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ class CodeCoverageReporterWindow extends JFrame implements ActionListener, Focus
8383
paneParams = new JPanel(new GridBagLayout())
8484
pathsTextArea.editable = false
8585
pathsTextArea.enabled = false
86-
addParam(UtplsqlResources.getString("WINDOW_PATHS_LABEL"), '''«FOR path : reporter.pathList SEPARATOR ", "»«path»«ENDFOR»''', pathsTextArea)
87-
addParam(UtplsqlResources.getString("WINDOW_SCHEMAS_LABEL"), "", schemasTextField);
88-
addParam(UtplsqlResources.getString("WINDOW_INCLUDE_OBJECS_LABEL"), '''«FOR i : reporter.includeObjectList SEPARATOR ", "»«i»«ENDFOR»''', includeObjectsTextArea);
89-
addParam(UtplsqlResources.getString("WINDOW_EXCLUDE_OBJECS_LABEL"), "", excludeObjectsTextArea);
86+
addParam(UtplsqlResources.getString("WINDOW_PATHS_LABEL"), '''«FOR path : reporter.pathList SEPARATOR ", "»«path»«ENDFOR»''', pathsTextArea, 50, 2)
87+
addParam(UtplsqlResources.getString("WINDOW_SCHEMAS_LABEL"), "", schemasTextField, 0, 0);
88+
addParam(UtplsqlResources.getString("WINDOW_INCLUDE_OBJECS_LABEL"), '''«FOR i : reporter.includeObjectList SEPARATOR ", "»«i»«ENDFOR»''', includeObjectsTextArea, 66, 4);
89+
addParam(UtplsqlResources.getString("WINDOW_EXCLUDE_OBJECS_LABEL"), "", excludeObjectsTextArea, 34, 1);
9090
val scrollPane = new JScrollPane(paneParams)
9191
scrollPane.verticalScrollBarPolicy = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED
9292
scrollPane.horizontalScrollBarPolicy = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
@@ -130,11 +130,11 @@ class CodeCoverageReporterWindow extends JFrame implements ActionListener, Focus
130130
c.weightx = 0;
131131
c.weighty = 0;
132132
pane.add(panelButtons, c);
133-
pane.setPreferredSize(new Dimension(600, 320));
133+
pane.setPreferredSize(new Dimension(500, 320));
134134
SwingUtilities.getRootPane(runButton).defaultButton = runButton
135135
}
136136

137-
private def addParam(String label, String text, Component component) {
137+
private def addParam(String label, String text, Component component, int height, double weighty) {
138138
paramPos++
139139
val c = new GridBagConstraints();
140140
val paramLabel = new JLabel(label)
@@ -153,17 +153,16 @@ class CodeCoverageReporterWindow extends JFrame implements ActionListener, Focus
153153
c.fill = GridBagConstraints.BOTH
154154
c.insets = new Insets(10, 10, 0, 10); // top, left, bottom, right
155155
c.weightx = 1
156+
c.weighty = weighty
156157
if (component instanceof JTextField) {
157158
component.text = text
158-
c.weighty = 0
159159
paneParams.add(component, c)
160160
} else if (component instanceof JTextArea) {
161161
component.text = text
162162
component.lineWrap = true
163163
component.wrapStyleWord = true
164164
var scrollPane = new JScrollPane(component);
165-
scrollPane.viewport.preferredSize = new Dimension(200, 50)
166-
c.weighty = 1
165+
scrollPane.viewport.preferredSize = new Dimension(200, height)
167166
paneParams.add(scrollPane, c)
168167
}
169168
component.addFocusListener(this)

0 commit comments

Comments
 (0)