Skip to content

Commit e50b016

Browse files
committed
Fixes the display of COM Objects
1 parent 9898eca commit e50b016

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

sdk/consumer-test-tool/src/main/java/esa/mo/nmf/ctt/utils/COMObjectWindow.form

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Properties>
55
<Property name="title" type="java.lang.String" value="COM Object"/>
66
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
7-
<Dimension value="[650, 550]"/>
7+
<Dimension value="null"/>
88
</Property>
99
<Property name="resizable" type="boolean" value="false"/>
1010
</Properties>
@@ -28,6 +28,11 @@
2828
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
2929
<SubComponents>
3030
<Container class="javax.swing.JPanel" name="topPanel">
31+
<Properties>
32+
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
33+
<Dimension value="null"/>
34+
</Property>
35+
</Properties>
3136
<Constraints>
3237
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
3338
<BorderConstraints direction="First"/>
@@ -155,7 +160,7 @@
155160
</Property>
156161
<Property name="name" type="java.lang.String" value="" noResource="true"/>
157162
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
158-
<Dimension value="[575, 200]"/>
163+
<Dimension value="null"/>
159164
</Property>
160165
</Properties>
161166
<Constraints>
@@ -507,12 +512,9 @@
507512
</Container>
508513
<Container class="javax.swing.JPanel" name="bottomPanel">
509514
<Properties>
510-
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
511-
<Dimension value="[30, 32767]"/>
512-
</Property>
513515
<Property name="name" type="java.lang.String" value="" noResource="true"/>
514516
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
515-
<Dimension value="[575, 40]"/>
517+
<Dimension value="null"/>
516518
</Property>
517519
</Properties>
518520
<Constraints>

sdk/consumer-test-tool/src/main/java/esa/mo/nmf/ctt/utils/COMObjectWindow.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public final class COMObjectWindow extends javax.swing.JDialog {
5757
* @param archiveService
5858
* @throws java.io.IOException
5959
*/
60-
public COMObjectWindow(final ArchivePersistenceObject comObject, final boolean editable,
61-
final ArchiveStub archiveService) throws IOException {
60+
public COMObjectWindow(final ArchivePersistenceObject comObject,
61+
final boolean editable, final ArchiveStub archiveService) throws IOException {
6262
initComponents();
6363

6464
if (comObject == null) {
@@ -166,15 +166,12 @@ public COMObjectWindow(final ArchivePersistenceObject comObject, final boolean e
166166
}
167167
}
168168

169-
if (editable) {
170-
this.button.setText("Submit");
171-
} else {
172-
this.button.setText("Close");
173-
}
169+
this.button.setText(editable ? "Submit" : "Close");
174170

175171
componentsPanel.revalidate();
176172
componentsPanel.repaint();
177-
this.setPreferredSize(new Dimension(800,670));
173+
this.setPreferredSize(new Dimension(700, 600));
174+
this.pack();
178175
this.setVisible(true);
179176
}
180177

@@ -236,9 +233,11 @@ private void initComponents() {
236233
button = new javax.swing.JToggleButton();
237234

238235
setTitle("COM Object");
239-
setMinimumSize(new java.awt.Dimension(650, 550));
236+
setMinimumSize(null);
240237
setResizable(false);
241238

239+
topPanel.setPreferredSize(null);
240+
242241
objIdentification.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
243242
objIdentification.setText("Domain:");
244243
objIdentification.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@@ -319,7 +318,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
319318

320319
componentsPanel.setMinimumSize(new java.awt.Dimension(0, 0));
321320
componentsPanel.setName(""); // NOI18N
322-
componentsPanel.setPreferredSize(new java.awt.Dimension(575, 200));
321+
componentsPanel.setPreferredSize(null);
323322

324323
objectBodyButton.setText("View Object Body");
325324
objectBodyButton.addActionListener(new java.awt.event.ActionListener() {
@@ -547,9 +546,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
547546

548547
getContentPane().add(componentsPanel, java.awt.BorderLayout.CENTER);
549548

550-
bottomPanel.setMaximumSize(new java.awt.Dimension(30, 32767));
551549
bottomPanel.setName(""); // NOI18N
552-
bottomPanel.setPreferredSize(new java.awt.Dimension(575, 40));
550+
bottomPanel.setPreferredSize(null);
553551

554552
button.setText("Submit");
555553
button.addActionListener(new java.awt.event.ActionListener() {

0 commit comments

Comments
 (0)