Skip to content

Commit

Permalink
Some small layout things
Browse files Browse the repository at this point in the history
  • Loading branch information
ppdewolf committed Mar 29, 2018
1 parent 9c21fc3 commit 4154455
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 53 deletions.
Binary file modified TauArgus.jar
Binary file not shown.
51 changes: 21 additions & 30 deletions src/tauargus/gui/PanelCellDetails.form
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[273, 345]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
Expand All @@ -21,11 +16,21 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="labelAuditInterval" alignment="1" max="32767" attributes="0"/>
<Component id="labelProtectionInterval" alignment="1" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="textFieldProtectionLower" min="-2" pref="113" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="textFieldProtectionUpper" min="-2" pref="113" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="textFieldRealizedLower" min="-2" pref="113" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="textFieldRealizedUpper" min="-2" pref="113" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="labelTopN" alignment="0" max="32767" attributes="0"/>
Expand All @@ -35,7 +40,6 @@
<Component id="labelStatus" alignment="0" max="-2" attributes="0"/>
<Component id="labelShadow" alignment="0" max="-2" attributes="0"/>
<Component id="labelCost" alignment="0" max="-2" attributes="0"/>
<Component id="checkBoxHoldingLevel" alignment="0" max="32767" attributes="0"/>
<Component id="labelRequest" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
Expand All @@ -51,17 +55,11 @@
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="textFieldRealizedLower" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="textFieldRealizedUpper" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="textFieldProtectionLower" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="textFieldProtectionUpper" max="32767" attributes="0"/>
<Component id="checkBoxHoldingLevel" min="-2" pref="80" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -99,9 +97,9 @@
<Component id="textFieldContributions" alignment="3" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="labelTopNValue" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="labelTopN" alignment="2" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelTopN" min="-2" max="-2" attributes="0"/>
<Component id="labelTopNValue" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkBoxHoldingLevel" min="-2" max="-2" attributes="0"/>
Expand All @@ -110,7 +108,7 @@
<Component id="labelRequest" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textFieldRequest" alignment="3" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="labelProtectionInterval" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
Expand All @@ -124,7 +122,7 @@
<Component id="textFieldRealizedLower" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textFieldRealizedUpper" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -194,20 +192,13 @@
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.CompoundBorderInfo">
<CompoundBorder>
<Border PropertyName="outside" info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder>
<Color PropertyName="color" blue="c0" green="c0" red="c0" type="rgb"/>
</LineBorder>
</Border>
<Connection PropertyName="outside" component="textFieldCost" name="getBorder" type="method"/>
<Border PropertyName="inside" info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder bottom="3" left="3" right="3" top="3"/>
</Border>
</CompoundBorder>
</Border>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[6, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="textFieldRequest">
Expand Down
49 changes: 26 additions & 23 deletions src/tauargus/gui/PanelCellDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ private void update() {
textFieldContributions.setText(integerFormatter.format(cell.freq));
}
sb.append("</html>");
labelTopNValue.setText(sb.toString());
if (!cell.status.isEmpty()){
labelTopNValue.setText(sb.toString());
} else {
labelTopNValue.setText("<html><p align=\"right\">-</p></html>");
}

visible = cell.status.isPrimaryUnsafe();
labelProtectionInterval.setVisible(visible);
Expand Down Expand Up @@ -160,8 +164,6 @@ private void initComponents() {
labelContributions = new javax.swing.JLabel();
labelCost = new javax.swing.JLabel();

setPreferredSize(new java.awt.Dimension(273, 345));

labelValue.setText("Value");

textFieldValue.setEditable(false);
Expand Down Expand Up @@ -191,8 +193,7 @@ private void initComponents() {
labelTopNValue.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
labelTopNValue.setVerticalAlignment(javax.swing.SwingConstants.TOP);
labelTopNValue.setAlignmentX(0.5F);
labelTopNValue.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(192, 192, 192)), javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3)));
labelTopNValue.setPreferredSize(new java.awt.Dimension(6, 20));
labelTopNValue.setBorder(javax.swing.BorderFactory.createCompoundBorder(textFieldCost.getBorder(), javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3)));

textFieldRequest.setEditable(false);
textFieldRequest.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
Expand Down Expand Up @@ -232,12 +233,20 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(labelAuditInterval, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelProtectionInterval, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(labelAuditInterval, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelProtectionInterval, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(textFieldProtectionLower, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(textFieldProtectionUpper, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(textFieldRealizedLower, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(textFieldRealizedUpper, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(labelTopN, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelContributions)
Expand All @@ -246,7 +255,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(labelStatus)
.addComponent(labelShadow)
.addComponent(labelCost)
.addComponent(checkBoxHoldingLevel)
.addComponent(labelRequest, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Expand All @@ -258,14 +266,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(textFieldRequest, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(textFieldContributions, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(textFieldValue, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(textFieldRealizedLower)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(textFieldRealizedUpper))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(textFieldProtectionLower)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(textFieldProtectionUpper)))
.addGroup(layout.createSequentialGroup()
.addComponent(checkBoxHoldingLevel, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
Expand Down Expand Up @@ -296,9 +299,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(labelContributions)
.addComponent(textFieldContributions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(labelTopNValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labelTopN))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(labelTopN)
.addComponent(labelTopNValue))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(checkBoxHoldingLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
Expand All @@ -317,7 +320,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(textFieldRealizedLower, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(textFieldRealizedUpper, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents

Expand Down

0 comments on commit 4154455

Please sign in to comment.