Skip to content

Commit

Permalink
code cleanup for #2638
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Nov 24, 2024
1 parent 65d4d9e commit b790898
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Component id="addPageNbrsCb" min="-2" max="-2" attributes="0"/>
<Component id="cmbAddPageNumbers" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="addTocCb" min="-2" max="-2" attributes="0"/>
<Component id="cmbAddToc" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
Expand All @@ -54,8 +54,8 @@
<Component id="lblFileSizeMax" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblPages" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="addTocCb" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="addPageNbrsCb" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cmbAddToc" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cmbAddPageNumbers" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="460" max="32767" attributes="0"/>
Expand Down Expand Up @@ -139,24 +139,21 @@
<Property name="text" type="java.lang.String" value="Seiten:"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="addTocCb">
<Component class="javax.swing.JCheckBox" name="cmbAddToc">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Inhaltsverzeichnis"/>
<Property name="toolTipText" type="java.lang.String" value="Inhaltsverzeichnis wird hinzugef&#xfc;gt"/>
<Property name="actionCommand" type="java.lang.String" value=""/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="addPageNbrsCb">
<Component class="javax.swing.JCheckBox" name="cmbAddPageNumbers">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Seitenzahlen"/>
<Property name="toolTipText" type="java.lang.String" value="Seitenzahlen werden hinzugef&#xfc;gt"/>
<Property name="actionCommand" type="java.lang.String" value=""/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addPageNbrsCbActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ public ExportAsPdfOrderingStep() {

// UserSettings laden
UserSettings uset = UserSettings.getInstance();
this.addTocCb.setSelected(uset.getSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_TOC, true));
this.addPageNbrsCb.setSelected(uset.getSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_PAGENUMBERS, true));
this.cmbAddToc.setSelected(uset.getSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_TOC, true));
this.cmbAddPageNumbers.setSelected(uset.getSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_PAGENUMBERS, true));

// ComponentListener für pnlConversionList
this.pnlConversionList.addContainerListener(new java.awt.event.ContainerListener() {
Expand All @@ -716,13 +716,13 @@ public void nextEvent() {
}

this.data.put("export.sortedpdffiles", sortedPdfs);
this.data.put("export.createToc", this.addTocCb.isSelected());
this.data.put("export.createPageNumbers", this.addPageNbrsCb.isSelected());
this.data.put("export.createToc", this.cmbAddToc.isSelected());
this.data.put("export.createPageNumbers", this.cmbAddPageNumbers.isSelected());

// UserSettings speichern
UserSettings uset = UserSettings.getInstance();
uset.setSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_TOC, this.addTocCb.isSelected());
uset.setSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_PAGENUMBERS, this.addPageNbrsCb.isSelected());
uset.setSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_TOC, this.cmbAddToc.isSelected());
uset.setSettingAsBoolean(UserSettings.CONF_CASES_EXPORT_PAGENUMBERS, this.cmbAddPageNumbers.isSelected());

}

Expand Down Expand Up @@ -758,8 +758,8 @@ private void initComponents() {
lblFileSizeMax = new javax.swing.JLabel();
lblPages = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
addTocCb = new javax.swing.JCheckBox();
addPageNbrsCb = new javax.swing.JCheckBox();
cmbAddToc = new javax.swing.JCheckBox();
cmbAddPageNumbers = new javax.swing.JCheckBox();

setName("Dokumente sortieren"); // NOI18N

Expand All @@ -786,20 +786,15 @@ private void initComponents() {
jLabel2.setFont(jLabel2.getFont().deriveFont(jLabel2.getFont().getStyle() | java.awt.Font.BOLD));
jLabel2.setText("Seiten:");

addTocCb.setSelected(true);
addTocCb.setText("Inhaltsverzeichnis");
addTocCb.setToolTipText("Inhaltsverzeichnis wird hinzugefügt");
addTocCb.setActionCommand("");

addPageNbrsCb.setSelected(true);
addPageNbrsCb.setText("Seitenzahlen");
addPageNbrsCb.setToolTipText("Seitenzahlen werden hinzugefügt");
addPageNbrsCb.setActionCommand("");
addPageNbrsCb.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addPageNbrsCbActionPerformed(evt);
}
});
cmbAddToc.setSelected(true);
cmbAddToc.setText("Inhaltsverzeichnis");
cmbAddToc.setToolTipText("Inhaltsverzeichnis wird hinzugefügt");
cmbAddToc.setActionCommand("");

cmbAddPageNumbers.setSelected(true);
cmbAddPageNumbers.setText("Seitenzahlen");
cmbAddPageNumbers.setToolTipText("Seitenzahlen werden hinzugefügt");
cmbAddPageNumbers.setActionCommand("");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
Expand All @@ -812,9 +807,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(jScrollPane1)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(addPageNbrsCb)
.addComponent(cmbAddPageNumbers)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(addTocCb)
.addComponent(cmbAddToc)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
Expand All @@ -836,21 +831,17 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(lblFileSizeMax)
.addComponent(lblPages)
.addComponent(jLabel2)
.addComponent(addTocCb)
.addComponent(addPageNbrsCb))
.addComponent(cmbAddToc)
.addComponent(cmbAddPageNumbers))
.addGap(47, 47, 47)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 460, Short.MAX_VALUE)
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents

private void addPageNbrsCbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addPageNbrsCbActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_addPageNbrsCbActionPerformed

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox addPageNbrsCb;
private javax.swing.JCheckBox addTocCb;
private javax.swing.JCheckBox cmbAddPageNumbers;
private javax.swing.JCheckBox cmbAddToc;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
Expand Down

0 comments on commit b790898

Please sign in to comment.