Skip to content

Commit

Permalink
Equipment lists always have scrollbars as needed
Browse files Browse the repository at this point in the history
Also standardize related scroll pane vars and update forms
  • Loading branch information
lbmaian committed Dec 17, 2023
1 parent 1bb1c81 commit 2d77059
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 39 deletions.
6 changes: 3 additions & 3 deletions saw/src/main/java/saw/gui/frmVee.form
Original file line number Diff line number Diff line change
Expand Up @@ -4354,10 +4354,10 @@

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane23">
<Container class="javax.swing.JScrollPane" name="scrSelectedEquip">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
<Property name="horizontalScrollBarPolicy" type="int" value="30"/>
<Property name="verticalScrollBarPolicy" type="int" value="20"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
Expand Down
13 changes: 6 additions & 7 deletions saw/src/main/java/saw/gui/frmVee.java
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ private void initComponents() {
chkFCSApollo = new javax.swing.JCheckBox();
chkCASE = new javax.swing.JCheckBox();
JPanel pnlSelected = new JPanel();
JScrollPane jScrollPane23 = new JScrollPane();
JScrollPane scrSelectedEquip = new JScrollPane();
lstSelectedEquipment = new javax.swing.JList();
JPanel pnlEquipInfo = new JPanel();
JLabel jLabel38 = new JLabel();
Expand Down Expand Up @@ -3167,11 +3167,10 @@ public void mouseClicked( MouseEvent e ) {
pnlSelected.setMinimumSize(new Dimension(212, 286));
pnlSelected.setLayout(new javax.swing.BoxLayout(pnlSelected, javax.swing.BoxLayout.LINE_AXIS));

jScrollPane23.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane23.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
scrSelectedEquip.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrSelectedEquip.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

lstSelectedEquipment.setModel( new javax.swing.DefaultListModel()
);
lstSelectedEquipment.setModel( new javax.swing.DefaultListModel() );
lstSelectedEquipment.setMaximumSize(new Dimension(180, 225));
lstSelectedEquipment.setMinimumSize(new Dimension(180, 225));
lstSelectedEquipment.setPreferredSize(null);
Expand Down Expand Up @@ -3204,9 +3203,9 @@ public void mousePressed( MouseEvent e ) {
};
lstSelectedEquipment.addMouseListener( mlSelect );
lstSelectedEquipment.setCellRenderer( new saw.gui.EquipmentSelectedRenderer( this ) );
jScrollPane23.setViewportView(lstSelectedEquipment);
scrSelectedEquip.setViewportView(lstSelectedEquipment);

pnlSelected.add(jScrollPane23);
pnlSelected.add(scrSelectedEquip);

pnlEquipInfo.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Information"));
pnlEquipInfo.setLayout(new java.awt.GridBagLayout());
Expand Down
6 changes: 3 additions & 3 deletions saw/src/main/java/saw/gui/frmVeeWide.form
Original file line number Diff line number Diff line change
Expand Up @@ -4241,10 +4241,10 @@

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane23">
<Container class="javax.swing.JScrollPane" name="scrSelectedEquip">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
<Property name="horizontalScrollBarPolicy" type="int" value="30"/>
<Property name="verticalScrollBarPolicy" type="int" value="20"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
Expand Down
2 changes: 1 addition & 1 deletion saw/src/main/java/saw/gui/frmVeeWide.java
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,7 @@ public void mousePressed( MouseEvent e ) {
};
lstSelectedEquipment.addMouseListener( mlSelect );
lstSelectedEquipment.setCellRenderer( new saw.gui.EquipmentSelectedRenderer( this ) );
scrSelectedEquip.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrSelectedEquip.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrSelectedEquip.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
scrSelectedEquip.setViewportView(lstSelectedEquipment);
pnlSelected.add(scrSelectedEquip);
Expand Down
10 changes: 5 additions & 5 deletions ssw/src/main/java/ssw/gui/frmMain.form
Original file line number Diff line number Diff line change
Expand Up @@ -4979,10 +4979,10 @@

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane23">
<Container class="javax.swing.JScrollPane" name="scrSelectedEquip">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
<Property name="horizontalScrollBarPolicy" type="int" value="30"/>
<Property name="verticalScrollBarPolicy" type="int" value="20"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
Expand Down Expand Up @@ -6495,9 +6495,9 @@
<Property name="axis" type="int" value="3"/>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane18">
<Container class="javax.swing.JScrollPane" name="scrEquipToPlace">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="horizontalScrollBarPolicy" type="int" value="30"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
Expand Down
25 changes: 12 additions & 13 deletions ssw/src/main/java/ssw/gui/frmMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -4913,7 +4913,7 @@ private void initComponents() {
chkFCSApollo = new javax.swing.JCheckBox();
chkClanCASE = new javax.swing.JCheckBox();
pnlSelected = new javax.swing.JPanel();
jScrollPane23 = new javax.swing.JScrollPane();
scrSelectedEquip = new javax.swing.JScrollPane();
lstSelectedEquipment = new javax.swing.JList();
pnlControls = new javax.swing.JPanel();
btnRemoveEquip = new javax.swing.JButton();
Expand Down Expand Up @@ -5009,7 +5009,7 @@ private void initComponents() {
lstRLCrits = new javax.swing.JList();
chkRLCASE2 = new javax.swing.JCheckBox();
pnlEquipmentToPlace = new javax.swing.JPanel();
jScrollPane18 = new javax.swing.JScrollPane();
scrEquipToPlace = new javax.swing.JScrollPane();
lstCritsToPlace = new javax.swing.JList();
btnRemoveItemCrits = new javax.swing.JButton();
onlLoadoutControls = new javax.swing.JPanel();
Expand Down Expand Up @@ -7632,11 +7632,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
pnlSelected.setMinimumSize(new java.awt.Dimension(212, 286));
pnlSelected.setLayout(new javax.swing.BoxLayout(pnlSelected, javax.swing.BoxLayout.LINE_AXIS));

jScrollPane23.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane23.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
scrSelectedEquip.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrSelectedEquip.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

lstSelectedEquipment.setModel( new javax.swing.DefaultListModel()
);
lstSelectedEquipment.setModel( new javax.swing.DefaultListModel() );
lstSelectedEquipment.setMaximumSize(new java.awt.Dimension(180, 225));
lstSelectedEquipment.setMinimumSize(new java.awt.Dimension(180, 225));
lstSelectedEquipment.setPreferredSize(null);
Expand Down Expand Up @@ -7673,9 +7672,9 @@ public void mousePressed( MouseEvent e ) {
};
lstSelectedEquipment.addMouseListener( mlSelect );
lstSelectedEquipment.setCellRenderer( new ssw.gui.EquipmentSelectedRenderer( this ) );
jScrollPane23.setViewportView(lstSelectedEquipment);
scrSelectedEquip.setViewportView(lstSelectedEquipment);

pnlSelected.add(jScrollPane23);
pnlSelected.add(scrSelectedEquip);

pnlEquipment.add(pnlSelected, new org.netbeans.lib.awtextra.AbsoluteConstraints(492, 20, 230, 300));

Expand Down Expand Up @@ -8847,7 +8846,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
pnlEquipmentToPlace.setMinimumSize(new java.awt.Dimension(146, 330));
pnlEquipmentToPlace.setLayout(new javax.swing.BoxLayout(pnlEquipmentToPlace, javax.swing.BoxLayout.PAGE_AXIS));

jScrollPane18.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrEquipToPlace.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);

lstCritsToPlace.setFont( PrintConsts.BaseCritFont );
lstCritsToPlace.setModel(new javax.swing.AbstractListModel() {
Expand Down Expand Up @@ -8917,9 +8916,9 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
lstCritsToPlaceValueChanged(evt);
}
});
jScrollPane18.setViewportView(lstCritsToPlace);
scrEquipToPlace.setViewportView(lstCritsToPlace);

pnlEquipmentToPlace.add(jScrollPane18);
pnlEquipmentToPlace.add(scrEquipToPlace);

btnRemoveItemCrits.setText("Remove Item");
btnRemoveItemCrits.setEnabled(false);
Expand Down Expand Up @@ -14702,8 +14701,6 @@ private void setViewToolbar(boolean Visible)
private javax.swing.JScrollPane jScrollPane14;
private javax.swing.JScrollPane jScrollPane16;
private javax.swing.JScrollPane jScrollPane17;
private javax.swing.JScrollPane jScrollPane18;
private javax.swing.JScrollPane jScrollPane23;
private javax.swing.JSeparator jSeparator13;
private javax.swing.JSeparator jSeparator14;
private javax.swing.JSeparator jSeparator15;
Expand Down Expand Up @@ -14955,8 +14952,10 @@ private void setViewToolbar(boolean Visible)
private javax.swing.JPanel pnlWeaponsManufacturers;
private javax.swing.JScrollPane scpQuirkTable;
private javax.swing.JScrollPane scpWeaponManufacturers;
private javax.swing.JScrollPane scrEquipToPlace;
private javax.swing.JScrollPane scrLACrits;
private javax.swing.JScrollPane scrRACrits;
private javax.swing.JScrollPane scrSelectedEquip;
private javax.swing.JSpinner spnBoosterMP;
private javax.swing.JSpinner spnCTArmor;
private javax.swing.JSpinner spnCTRArmor;
Expand Down
4 changes: 2 additions & 2 deletions ssw/src/main/java/ssw/gui/frmMainWide.form
Original file line number Diff line number Diff line change
Expand Up @@ -6437,9 +6437,9 @@
<Property name="axis" type="int" value="3"/>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane18">
<Container class="javax.swing.JScrollPane" name="scrEquipToPlace">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="horizontalScrollBarPolicy" type="int" value="30"/>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
Expand Down
10 changes: 5 additions & 5 deletions ssw/src/main/java/ssw/gui/frmMainWide.java
Original file line number Diff line number Diff line change
Expand Up @@ -4943,7 +4943,7 @@ private void initComponents() {
chkRACASE2 = new javax.swing.JCheckBox();
chkRAAES = new javax.swing.JCheckBox();
pnlEquipmentToPlace = new javax.swing.JPanel();
jScrollPane18 = new javax.swing.JScrollPane();
scrEquipToPlace = new javax.swing.JScrollPane();
lstCritsToPlace = new javax.swing.JList();
btnRemoveItemCrits = new javax.swing.JButton();
btnAutoAllocate = new javax.swing.JButton();
Expand Down Expand Up @@ -8717,7 +8717,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
pnlEquipmentToPlace.setMinimumSize(new java.awt.Dimension(146, 330));
pnlEquipmentToPlace.setLayout(new javax.swing.BoxLayout(pnlEquipmentToPlace, javax.swing.BoxLayout.PAGE_AXIS));

jScrollPane18.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrEquipToPlace.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);

lstCritsToPlace.setFont( PrintConsts.BaseCritFont );
lstCritsToPlace.setModel(new javax.swing.AbstractListModel() {
Expand Down Expand Up @@ -8792,9 +8792,9 @@ public void keyPressed(java.awt.event.KeyEvent evt) {
lstCritsToPlaceKeyPressed(evt);
}
});
jScrollPane18.setViewportView(lstCritsToPlace);
scrEquipToPlace.setViewportView(lstCritsToPlace);

pnlEquipmentToPlace.add(jScrollPane18);
pnlEquipmentToPlace.add(scrEquipToPlace);

btnRemoveItemCrits.setText("Remove Item");
btnRemoveItemCrits.setEnabled(false);
Expand Down Expand Up @@ -14533,7 +14533,6 @@ private void setViewToolbar(boolean Visible)
private javax.swing.JScrollPane jScrollPane14;
private javax.swing.JScrollPane jScrollPane16;
private javax.swing.JScrollPane jScrollPane17;
private javax.swing.JScrollPane jScrollPane18;
private javax.swing.JSeparator jSeparator13;
private javax.swing.JSeparator jSeparator14;
private javax.swing.JSeparator jSeparator15;
Expand Down Expand Up @@ -14780,6 +14779,7 @@ private void setViewToolbar(boolean Visible)
private javax.swing.JPanel pnlWeaponsManufacturers;
private javax.swing.JScrollPane scpQuirkTable;
private javax.swing.JScrollPane scpWeaponManufacturers;
private javax.swing.JScrollPane scrEquipToPlace;
private javax.swing.JScrollPane scrLACrits;
private javax.swing.JScrollPane scrRACrits;
private javax.swing.JSpinner spnBoosterMP;
Expand Down

0 comments on commit 2d77059

Please sign in to comment.