Update persistence options dialog.

git-svn-id: file:///home/svn/framework3/trunk@11522 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Weeks 2011-01-08 18:27:21 +00:00
parent 7e86b433b1
commit 91151f1d1d
4 changed files with 59 additions and 39 deletions

Binary file not shown.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.1" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
<Properties>
@ -38,20 +38,22 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="portField" pref="338" max="32767" attributes="1"/>
<Component id="ipField" alignment="0" pref="338" max="32767" attributes="1"/>
<Component id="intervalField" alignment="0" pref="338" max="32767" attributes="0"/>
<Component id="portField" pref="424" max="32767" attributes="1"/>
<Component id="ipField" alignment="0" pref="424" max="32767" attributes="1"/>
<Component id="intervalField" alignment="0" pref="424" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="handlerBox" alignment="0" max="32767" attributes="1"/>
<Component id="autostartBox" alignment="0" max="32767" attributes="1"/>
<Component id="serviceRestartBox" alignment="0" max="32767" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="loginRestartBox" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="177" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="anyLoginRestartBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
@ -71,8 +73,9 @@
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="autostartBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="serviceRestartBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="loginRestartBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="anyLoginRestartBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="handlerBox" min="-2" max="-2" attributes="0"/>
@ -157,15 +160,12 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="autostartBox">
<Component class="javax.swing.JCheckBox" name="serviceRestartBox">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" resourceKey="autostartBox.text"/>
<Property name="name" type="java.lang.String" value="autostartBox" noResource="true"/>
<Property name="text" type="java.lang.String" resourceKey="serviceRestartBox.text"/>
<Property name="name" type="java.lang.String" value="serviceRestartBox" noResource="true"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="autostartBoxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="handlerBox">
<Properties>
@ -195,5 +195,14 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="loginRestartBoxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="anyLoginRestartBox">
<Properties>
<Property name="text" type="java.lang.String" resourceKey="anyLoginRestartBox.text"/>
<Property name="name" type="java.lang.String" value="anyLoginRestartBox" noResource="true"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="anyLoginRestartBoxActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>

View File

@ -29,11 +29,12 @@ public class PersistenceOptionsDialog extends OptionsDialog {
okButton = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
cancelButton = new javax.swing.JButton();
autostartBox = new javax.swing.JCheckBox();
serviceRestartBox = new javax.swing.JCheckBox();
handlerBox = new javax.swing.JCheckBox();
intervalField = new javax.swing.JTextField();
intervalLabel = new javax.swing.JLabel();
loginRestartBox = new javax.swing.JCheckBox();
anyLoginRestartBox = new javax.swing.JCheckBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
@ -72,14 +73,9 @@ public class PersistenceOptionsDialog extends OptionsDialog {
}
});
autostartBox.setSelected(true);
autostartBox.setText(resourceMap.getString("autostartBox.text")); // NOI18N
autostartBox.setName("autostartBox"); // NOI18N
autostartBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
autostartBoxActionPerformed(evt);
}
});
serviceRestartBox.setSelected(true);
serviceRestartBox.setText(resourceMap.getString("serviceRestartBox.text")); // NOI18N
serviceRestartBox.setName("serviceRestartBox"); // NOI18N
handlerBox.setText(resourceMap.getString("handlerBox.text")); // NOI18N
handlerBox.setName("handlerBox"); // NOI18N
@ -99,6 +95,14 @@ public class PersistenceOptionsDialog extends OptionsDialog {
}
});
anyLoginRestartBox.setText(resourceMap.getString("anyLoginRestartBox.text")); // NOI18N
anyLoginRestartBox.setName("anyLoginRestartBox"); // NOI18N
anyLoginRestartBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
anyLoginRestartBoxActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
@ -117,17 +121,19 @@ public class PersistenceOptionsDialog extends OptionsDialog {
.addComponent(portLabel, 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.TRAILING)
.addComponent(portField, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
.addComponent(ipField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
.addComponent(intervalField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE))
.addComponent(portField, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
.addComponent(ipField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
.addComponent(intervalField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE))
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(handlerBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(autostartBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(serviceRestartBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(loginRestartBox)
.addContainerGap(177, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(anyLoginRestartBox)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(cancelButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@ -141,8 +147,9 @@ public class PersistenceOptionsDialog extends OptionsDialog {
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(autostartBox)
.addComponent(loginRestartBox))
.addComponent(serviceRestartBox)
.addComponent(loginRestartBox)
.addComponent(anyLoginRestartBox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handlerBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@ -171,7 +178,9 @@ public class PersistenceOptionsDialog extends OptionsDialog {
StringBuilder cmd = new StringBuilder("persistence ");
if(handlerBox.isSelected())
cmd.append(" -A ");
if(autostartBox.isSelected())
if(serviceRestartBox.isSelected())
cmd.append(" -S ");
if(anyLoginRestartBox.isSelected())
cmd.append(" -X ");
if(loginRestartBox.isSelected())
cmd.append(" -U ");
@ -187,18 +196,18 @@ public class PersistenceOptionsDialog extends OptionsDialog {
this.setVisible(false);
}//GEN-LAST:event_cancelButtonActionPerformed
private void autostartBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autostartBoxActionPerformed
if(autostartBox.isSelected())
loginRestartBox.setSelected(false);
}//GEN-LAST:event_autostartBoxActionPerformed
private void loginRestartBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginRestartBoxActionPerformed
if(loginRestartBox.isSelected())
autostartBox.setSelected(false);
anyLoginRestartBox.setSelected(false);
}//GEN-LAST:event_loginRestartBoxActionPerformed
private void anyLoginRestartBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_anyLoginRestartBoxActionPerformed
if(anyLoginRestartBox.isSelected())
loginRestartBox.setSelected(false);
}//GEN-LAST:event_anyLoginRestartBoxActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox autostartBox;
private javax.swing.JCheckBox anyLoginRestartBox;
private javax.swing.JButton cancelButton;
private javax.swing.JCheckBox handlerBox;
private javax.swing.JTextField intervalField;
@ -210,6 +219,7 @@ public class PersistenceOptionsDialog extends OptionsDialog {
private javax.swing.JButton okButton;
private javax.swing.JTextField portField;
private javax.swing.JLabel portLabel;
private javax.swing.JCheckBox serviceRestartBox;
// End of variables declaration//GEN-END:variables
}

View File

@ -6,8 +6,9 @@ jCheckBox2.text=Start on boot?
portField.text=4444
portLabel.text=Port for connect-back
ipLabel.text=IP for connect-back
autostartBox.text=Restart each boot
handlerBox.text=Start handler now
intervalField.text=10
intervalLabel.text=Interval for connect-back
loginRestartBox.text=Restart at current user login
loginRestartBox.text=Restart on current user login
anyLoginRestartBox.text=Restart on any login
serviceRestartBox.text=Restart on boot as service