UOCL-315: Adding Tax ID UI element
This commit is contained in:
@@ -52,16 +52,18 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="passwordLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="taxIdLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="taxIdTextField" min="-2" pref="180" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" min="-2" pref="180" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace pref="50" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -75,10 +77,15 @@
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="passwordLabel" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="taxIdTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="taxIdLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLblCardID" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jcard" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
@@ -99,7 +106,7 @@
|
||||
<Component id="m_jImage" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="110" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -246,8 +253,11 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.laf.combobox.WebComboBox" name="webCBSecurity">
|
||||
<Component class="javax.swing.JComboBox" name="webCBSecurity">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="3">
|
||||
<StringItem index="0" value="Generate new key"/>
|
||||
@@ -261,9 +271,6 @@
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.peoplesecurity" replaceFormat="AppLocal.getIntString("tooltip.peoplesecurity")"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 45]"/>
|
||||
</Property>
|
||||
@@ -272,7 +279,7 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="webCBSecurityActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Component class="javax.swing.JLabel" name="passwordLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
@@ -285,5 +292,23 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="taxIdTextField">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="taxIdLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Tax ID"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -52,9 +52,12 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
|
||||
private final ComboBoxValModel m_ReasonModel;
|
||||
|
||||
/** Creates new form PeopleEditor
|
||||
/**
|
||||
* Creates new form PeopleEditor
|
||||
*
|
||||
* @param dlAdmin
|
||||
* @param dirty */
|
||||
* @param dirty
|
||||
*/
|
||||
public PeopleView(DataLogicAdmin dlAdmin, DirtyManager dirty) {
|
||||
|
||||
initComponents();
|
||||
@@ -214,7 +217,6 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
m_jRole.setModel(m_RoleModel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -222,11 +224,13 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
/**
|
||||
* This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
@@ -241,8 +245,10 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
m_jcard = new javax.swing.JTextField();
|
||||
jLblCardID = new javax.swing.JLabel();
|
||||
webCBSecurity = new com.alee.laf.combobox.WebComboBox();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
webCBSecurity = new javax.swing.JComboBox();
|
||||
passwordLabel = new javax.swing.JLabel();
|
||||
taxIdTextField = new javax.swing.JTextField();
|
||||
taxIdLabel = new javax.swing.JLabel();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setPreferredSize(new java.awt.Dimension(500, 500));
|
||||
@@ -299,10 +305,10 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
jLblCardID.setText(AppLocal.getIntString("label.card")); // NOI18N
|
||||
jLblCardID.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
webCBSecurity.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
webCBSecurity.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Generate new key", "Delete exisitng key", "Use iButton ID" }));
|
||||
webCBSecurity.setSelectedIndex(0);
|
||||
webCBSecurity.setToolTipText(AppLocal.getIntString("tooltip.peoplesecurity")); // NOI18N
|
||||
webCBSecurity.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
webCBSecurity.setPreferredSize(new java.awt.Dimension(140, 45));
|
||||
webCBSecurity.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -310,9 +316,15 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
}
|
||||
});
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel6.setText(AppLocal.getIntString("label.Password")); // NOI18N
|
||||
jLabel6.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
passwordLabel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
passwordLabel.setText(AppLocal.getIntString("label.Password")); // NOI18N
|
||||
passwordLabel.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
taxIdTextField.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
taxIdTextField.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
taxIdLabel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
taxIdLabel.setText("Tax ID");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@@ -338,16 +350,18 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jcard, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(webCBSecurity, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(webCBSecurity, 0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(passwordLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(taxIdLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(taxIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap())
|
||||
.addContainerGap(50, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -358,9 +372,13 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(passwordLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(taxIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(taxIdLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLblCardID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jcard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -377,7 +395,7 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4, 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(110, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@@ -393,14 +411,12 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
|
||||
private void webCBSecurityActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_webCBSecurityActionPerformed
|
||||
|
||||
|
||||
if (webCBSecurity.getSelectedIndex() == 0) {
|
||||
if (JOptionPane.showConfirmDialog(this,
|
||||
AppLocal.getIntString("message.cardnew"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
|
||||
{
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
|
||||
m_jcard.setText("C" + StringUtils.getCardNumber());
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
@@ -411,8 +427,7 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
AppLocal.getIntString("message.cardremove"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
|
||||
{
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
|
||||
m_jcard.setText(null);
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
@@ -447,21 +462,22 @@ public class PeopleView extends JPanel implements EditorRecord {
|
||||
}
|
||||
}// GEN-LAST:event_jLabel1MouseClicked
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLblCardID;
|
||||
private com.unicenta.data.gui.JImageEditor m_jImage;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JComboBox m_jRole;
|
||||
private javax.swing.JCheckBox m_jVisible;
|
||||
private javax.swing.JTextField m_jcard;
|
||||
private com.alee.laf.combobox.WebComboBox webCBSecurity;
|
||||
private javax.swing.JLabel passwordLabel;
|
||||
private javax.swing.JLabel taxIdLabel;
|
||||
private javax.swing.JTextField taxIdTextField;
|
||||
private javax.swing.JComboBox webCBSecurity;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user