5.0 Source Code
Committing 5.0 Source Code
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.data.loader.*;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.BeanFactoryDataSingle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class DataLogicAdmin extends BeanFactoryDataSingle {
|
||||
|
||||
private Session s;
|
||||
private TableDefinition m_tpeople;
|
||||
private TableDefinition m_troles;
|
||||
private TableDefinition m_tresources;
|
||||
|
||||
|
||||
/** Creates a new instance of DataLogicAdmin */
|
||||
public DataLogicAdmin() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
*/
|
||||
@Override
|
||||
public void init(Session s){
|
||||
this.s = s;
|
||||
|
||||
m_tpeople = new TableDefinition(s,
|
||||
"people"
|
||||
, new String[] {"ID", "NAME", "APPPASSWORD", "ROLE", "VISIBLE", "CARD", "IMAGE"}
|
||||
, new String[] {"ID", AppLocal.getIntString("label.peoplename"), AppLocal.getIntString("label.Password"), AppLocal.getIntString("label.role"), AppLocal.getIntString("label.peoplevisible"), AppLocal.getIntString("label.card"), AppLocal.getIntString("label.peopleimage")}
|
||||
, new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.BOOLEAN, Datas.STRING, Datas.IMAGE}
|
||||
, new Formats[] {Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.BOOLEAN, Formats.STRING, Formats.NULL}
|
||||
, new int[] {0}
|
||||
);
|
||||
|
||||
m_troles = new TableDefinition(s,
|
||||
"roles"
|
||||
, new String[] {"ID", "NAME", "PERMISSIONS"}
|
||||
, new String[] {"ID", AppLocal.getIntString("label.name"), "PERMISSIONS"}
|
||||
, new Datas[] {Datas.STRING, Datas.STRING, Datas.BYTES}
|
||||
, new Formats[] {Formats.STRING, Formats.STRING, Formats.NULL}
|
||||
, new int[] {0}
|
||||
);
|
||||
|
||||
m_tresources = new TableDefinition(s,
|
||||
"resources"
|
||||
, new String[] {
|
||||
"ID", "NAME", "RESTYPE", "CONTENT"}
|
||||
, new String[] {
|
||||
"ID",
|
||||
AppLocal.getIntString("label.name"),
|
||||
AppLocal.getIntString("label.type"),
|
||||
"CONTENT"}
|
||||
, new Datas[] {
|
||||
Datas.STRING, Datas.STRING, Datas.INT, Datas.BYTES}
|
||||
, new Formats[] {
|
||||
Formats.STRING, Formats.STRING, Formats.INT, Formats.NULL}
|
||||
, new int[] {0}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final SentenceList getRolesList() {
|
||||
return new StaticSentence(s
|
||||
, "SELECT ID, NAME FROM roles ORDER BY NAME"
|
||||
, null
|
||||
, new SerializerReadClass(RoleInfo.class));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final TableDefinition getTablePeople() {
|
||||
return m_tpeople;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final TableDefinition getTableRoles() {
|
||||
return m_troles;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final TableDefinition getTableResources() {
|
||||
return m_tresources;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final SentenceList getPeopleList() {
|
||||
return new StaticSentence(s
|
||||
, "SELECT ID, NAME FROM people ORDER BY NAME"
|
||||
, null
|
||||
, new SerializerReadClass(PeopleInfo.class));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="form.usertitle" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[650, 300]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-15,0,0,2,-10"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[450, 231]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLblName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.prodname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JList" name="jListPeople">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jListPeopleMouseClicked"/>
|
||||
<EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="jListPeopleValueChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/reload.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.reset" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Clear Filter"/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="Reset "/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.executefilter" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Execute Filter"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Properties>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorKeys" name="m_jKeys">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_m_jKeys"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel8">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jcmdCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jcmdOK">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,417 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.QBFCompareEnum;
|
||||
import com.unicenta.data.user.EditorCreator;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPeopleFinder extends javax.swing.JDialog implements EditorCreator {
|
||||
|
||||
private PeopleInfo selectedPeople;
|
||||
private ListProvider lpr;
|
||||
|
||||
/** Creates new form JPeopleFinder */
|
||||
private JPeopleFinder(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new form JPeopleFinder
|
||||
*/
|
||||
private JPeopleFinder(java.awt.Dialog parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param dlPeople
|
||||
* @return
|
||||
*/
|
||||
public static JPeopleFinder getPeopleFinder(Component parent, DataLogicAdmin dlPeople) {
|
||||
Window window = getWindow(parent);
|
||||
|
||||
JPeopleFinder myMsg;
|
||||
if (window instanceof Frame) {
|
||||
myMsg = new JPeopleFinder((Frame) window, true);
|
||||
} else {
|
||||
myMsg = new JPeopleFinder((Dialog) window, true);
|
||||
}
|
||||
myMsg.init(dlPeople);
|
||||
myMsg.applyComponentOrientation(parent.getComponentOrientation());
|
||||
return myMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public PeopleInfo getSelectedPeople() {
|
||||
return selectedPeople;
|
||||
}
|
||||
|
||||
private void init(DataLogicAdmin dlPeople) {
|
||||
|
||||
initComponents();
|
||||
|
||||
jScrollPane1.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
m_jtxtName.addEditorKeys(m_jKeys);
|
||||
m_jtxtName.reset();
|
||||
lpr = new ListProviderCreator(dlPeople.getPeopleList(), this);
|
||||
jListPeople.setCellRenderer(new PeopleRenderer());
|
||||
|
||||
getRootPane().setDefaultButton(jcmdOK);
|
||||
|
||||
selectedPeople = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param people
|
||||
*/
|
||||
public void search(PeopleInfo people) {
|
||||
|
||||
if (people == null
|
||||
|| people.getName() == null
|
||||
|| people.getName().equals("")) {
|
||||
m_jtxtName.reset();
|
||||
cleanSearch();
|
||||
} else {
|
||||
m_jtxtName.setText(people.getName());
|
||||
executeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanSearch() {
|
||||
jListPeople.setModel(new MyListData(new ArrayList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method actions the User data search
|
||||
*/
|
||||
public void executeSearch() {
|
||||
try {
|
||||
jListPeople.setModel(new MyListData(lpr.loadData()));
|
||||
if (jListPeople.getModel().getSize() > 0) {
|
||||
jListPeople.setSelectedIndex(0);
|
||||
}
|
||||
} catch (BasicException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return creates object for search method
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
|
||||
Object[] afilter = new Object[12];
|
||||
|
||||
if (m_jtxtName.getText() == null
|
||||
|| m_jtxtName.getText().equals("")) {
|
||||
afilter[0] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[1] = null;
|
||||
} else {
|
||||
afilter[0] = QBFCompareEnum.COMP_RE;
|
||||
afilter[1] = "%" + m_jtxtName.getText() + "%";
|
||||
}
|
||||
|
||||
return afilter;
|
||||
}
|
||||
|
||||
private static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window) parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyListData extends javax.swing.AbstractListModel {
|
||||
|
||||
private final java.util.List m_data;
|
||||
|
||||
public MyListData(java.util.List data) {
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
return m_data.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return m_data.size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
jPanel7 = new javax.swing.JPanel();
|
||||
jLblName = new javax.swing.JLabel();
|
||||
m_jtxtName = new com.unicenta.editor.JEditorString();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jListPeople = new javax.swing.JList();
|
||||
jPanel6 = new javax.swing.JPanel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jKeys = new com.unicenta.editor.JEditorKeys();
|
||||
jPanel8 = new javax.swing.JPanel();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jcmdCancel = new javax.swing.JButton();
|
||||
jcmdOK = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("form.usertitle")); // NOI18N
|
||||
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
setPreferredSize(new java.awt.Dimension(650, 300));
|
||||
|
||||
jPanel3.setPreferredSize(new java.awt.Dimension(450, 231));
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel5.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
|
||||
jLblName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblName.setText(AppLocal.getIntString("label.prodname")); // NOI18N
|
||||
jLblName.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtName.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
||||
jPanel7.setLayout(jPanel7Layout);
|
||||
jPanel7Layout.setHorizontalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel7Layout.setVerticalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
);
|
||||
|
||||
m_jtxtName.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
jPanel4.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jListPeople.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jListPeople.setFocusable(false);
|
||||
jListPeople.setRequestFocusEnabled(false);
|
||||
jListPeople.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jListPeopleMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
jListPeople.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
||||
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
|
||||
jListPeopleValueChanged(evt);
|
||||
}
|
||||
});
|
||||
jScrollPane1.setViewportView(jListPeople);
|
||||
|
||||
jPanel4.add(jScrollPane1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jButton1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/reload.png"))); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jButton1.setText(bundle.getString("button.reset")); // NOI18N
|
||||
jButton1.setToolTipText("Clear Filter");
|
||||
jButton1.setActionCommand("Reset ");
|
||||
jButton1.setFocusable(false);
|
||||
jButton1.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jButton1);
|
||||
jButton1.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jButton3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jButton3.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
|
||||
jButton3.setToolTipText("Execute Filter");
|
||||
jButton3.setFocusPainted(false);
|
||||
jButton3.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jButton3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton3ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jButton3);
|
||||
jButton3.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jPanel4.add(jPanel6, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);
|
||||
|
||||
jPanel8.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
jcmdCancel.setText(AppLocal.getIntString("button.Cancel")); // NOI18N
|
||||
jcmdCancel.setFocusPainted(false);
|
||||
jcmdCancel.setFocusable(false);
|
||||
jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdCancel.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdCancel.setRequestFocusEnabled(false);
|
||||
jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdCancel);
|
||||
|
||||
jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jcmdOK.setText(AppLocal.getIntString("button.OK")); // NOI18N
|
||||
jcmdOK.setEnabled(false);
|
||||
jcmdOK.setFocusPainted(false);
|
||||
jcmdOK.setFocusable(false);
|
||||
jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdOK.setMaximumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setMinimumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdOK.setRequestFocusEnabled(false);
|
||||
jcmdOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdOK);
|
||||
|
||||
jPanel8.add(jPanel1, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel2.add(jPanel8, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
setSize(new java.awt.Dimension(758, 497));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
private void jcmdOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdOKActionPerformed
|
||||
|
||||
selectedPeople = (PeopleInfo) jListPeople.getSelectedValue();
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdOKActionPerformed
|
||||
|
||||
private void jcmdCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdCancelActionPerformed
|
||||
|
||||
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
|
||||
|
||||
executeSearch();
|
||||
|
||||
}//GEN-LAST:event_jButton3ActionPerformed
|
||||
|
||||
private void jListPeopleValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListPeopleValueChanged
|
||||
|
||||
jcmdOK.setEnabled(jListPeople.getSelectedValue() != null);
|
||||
|
||||
}//GEN-LAST:event_jListPeopleValueChanged
|
||||
|
||||
private void jListPeopleMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jListPeopleMouseClicked
|
||||
|
||||
if (evt.getClickCount() == 2) {
|
||||
selectedPeople = (PeopleInfo) jListPeople.getSelectedValue();
|
||||
dispose();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jListPeopleMouseClicked
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
|
||||
m_jtxtName.reset();
|
||||
|
||||
cleanSearch();
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JButton jButton3;
|
||||
private javax.swing.JLabel jLblName;
|
||||
private javax.swing.JList jListPeople;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JPanel jPanel7;
|
||||
private javax.swing.JPanel jPanel8;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton jcmdCancel;
|
||||
private javax.swing.JButton jcmdOK;
|
||||
private com.unicenta.editor.JEditorKeys m_jKeys;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Copyright (c) 1999,2000 Dallas Semiconductor Corporation, All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
|
||||
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of Dallas Semiconductor
|
||||
* shall not be used except as stated in the Dallas Semiconductor
|
||||
* Branding Policy.
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import com.dalsemi.onewire.OneWireAccessProvider;
|
||||
import com.dalsemi.onewire.adapter.DSPortAdapter;
|
||||
import com.dalsemi.onewire.adapter.OneWireIOException;
|
||||
import com.dalsemi.onewire.container.OneWireContainer;
|
||||
import com.dalsemi.onewire.utils.*;
|
||||
import com.dalsemi.onewire.application.monitor.*;
|
||||
|
||||
|
||||
/**
|
||||
* Minimal demo to monitor a simple network.
|
||||
*
|
||||
* @version 0.00, 25 September 2000
|
||||
* @author DS,BA,SH
|
||||
*/
|
||||
public class OWWatch
|
||||
implements DeviceMonitorEventListener
|
||||
{
|
||||
|
||||
/**
|
||||
* Method main
|
||||
*
|
||||
*
|
||||
* @param args
|
||||
*
|
||||
*/
|
||||
public static void main (String args [])
|
||||
{
|
||||
OneWireContainer owd;
|
||||
int delay;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// get the default adapter
|
||||
DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter();
|
||||
|
||||
System.out.println();
|
||||
System.out.println("Adapter: " + adapter.getAdapterName()
|
||||
+ " Port: " + adapter.getPortName());
|
||||
System.out.println();
|
||||
|
||||
// clear any previous search restrictions
|
||||
adapter.setSearchAllDevices();
|
||||
adapter.targetAllFamilies();
|
||||
adapter.setSpeed(adapter.SPEED_REGULAR);
|
||||
|
||||
// create the watcher with this adapter
|
||||
OWWatch nw = new OWWatch(adapter);
|
||||
|
||||
// sleep for the specified time
|
||||
if (args.length >= 1)
|
||||
delay = Integer.decode(args [0]).intValue();
|
||||
else
|
||||
delay = 20000;
|
||||
|
||||
System.out.println("Monitor run for: " + delay + "ms");
|
||||
Thread.sleep(delay);
|
||||
|
||||
// Kill any threads we have running.
|
||||
nw.killWatch();
|
||||
|
||||
// free port used by adapter
|
||||
adapter.freePort();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println(e);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//--------
|
||||
//-------- Variables
|
||||
//--------
|
||||
|
||||
/** Network Monitor instance */
|
||||
private DeviceMonitor dm;
|
||||
|
||||
//--------
|
||||
//-------- Constructor
|
||||
//--------
|
||||
|
||||
/**
|
||||
* Create a 1-Wire Network Watcher
|
||||
*
|
||||
* @param adapter for 1-Wire Network to monitor
|
||||
*/
|
||||
public OWWatch (DSPortAdapter adapter)
|
||||
{
|
||||
// create a network monitor
|
||||
dm = new DeviceMonitor(adapter);
|
||||
|
||||
// add this to the event listers
|
||||
try
|
||||
{
|
||||
dm.addDeviceMonitorEventListener(this);
|
||||
}
|
||||
catch (Exception e){}
|
||||
|
||||
// start the monitor
|
||||
Thread t = new Thread(dm);
|
||||
t.start();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void killWatch()
|
||||
{
|
||||
// Kill the OneWireMonitor thread.
|
||||
dm.killMonitor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Arrival event as a NetworkMonitorEventListener
|
||||
*
|
||||
* @param owme DeviceMonitorEvent add
|
||||
*/
|
||||
public void deviceArrival (DeviceMonitorEvent devt)
|
||||
{
|
||||
for(int i=0; i<devt.getDeviceCount(); i++)
|
||||
System.out.println("ADD: " + devt.getAddressAsStringAt(i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Depart event as a NetworkMonitorEventListener
|
||||
*
|
||||
* @param owme DeviceMonitorEvent depart
|
||||
*/
|
||||
public void deviceDeparture (DeviceMonitorEvent devt)
|
||||
{
|
||||
for(int i=0; i<devt.getDeviceCount(); i++)
|
||||
System.out.println("REMOVE: " + devt.getAddressAsStringAt(i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Depart event as a NetworkMonitorEventListener
|
||||
*
|
||||
* @param owme DeviceMonitorException depart
|
||||
*/
|
||||
public void networkException (DeviceMonitorException dexc)
|
||||
{
|
||||
System.out.println("ERROR: " + dexc.toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
import com.unicenta.data.loader.SerializableRead;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* Created on 27 de febrero de 2007, 23:27
|
||||
*
|
||||
*/
|
||||
public class PeopleInfo implements SerializableRead, IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 9110127845966L;
|
||||
private String m_sID;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected String m_sName;
|
||||
|
||||
/** Creates a new instance of PeopleInfo */
|
||||
public PeopleInfo() {
|
||||
m_sID = null;
|
||||
m_sName = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dr
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void readValues(DataRead dr) throws BasicException {
|
||||
m_sID = dr.getString(1);
|
||||
m_sName = dr.getString(2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getID() {
|
||||
return m_sID;
|
||||
}
|
||||
public void setID(String sID) {
|
||||
m_sID = sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sValue
|
||||
*/
|
||||
public void setName(String sValue) {
|
||||
m_sName = sValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class PeoplePanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tpeople;
|
||||
private PeopleView jeditor;
|
||||
|
||||
/** Creates a new instance of JPanelPeople */
|
||||
public PeoplePanel() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicAdmin dlAdmin = (DataLogicAdmin) app.getBean("com.unicenta.pos.admin.DataLogicAdmin");
|
||||
tpeople = dlAdmin.getTablePeople();
|
||||
jeditor = new PeopleView(dlAdmin, dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tpeople);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tpeople);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tpeople.getVectorerBasic(new int[]{1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tpeople.getComparatorCreator(new int[] {1, 3});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tpeople.getRenderStringBasic(new int[]{1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
|
||||
jeditor.activate(); // primero el editor
|
||||
super.activate(); // y luego cargamos los datos
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Users");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import java.awt.Component;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class PeopleRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private final Icon icopeople;
|
||||
|
||||
/** Creates a new instance of PeopleRenderer */
|
||||
public PeopleRenderer() {
|
||||
|
||||
icopeople = new ImageIcon(getClass().getClassLoader().getResource("com/unicenta/images/user_sml.png"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
|
||||
setText(value.toString());
|
||||
setIcon(icopeople);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[500, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="m_jVisible" min="-2" pref="207" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jRole" min="-2" pref="180" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jImage" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblCardID" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jcard" min="-2" pref="180" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="webCBSecurity" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<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"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" 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"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</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="jButton1" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" 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"/>
|
||||
<Component id="webCBSecurity" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jRole" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="m_jVisible" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<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"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/info.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.peoplenamem" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel1MouseClicked"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jName">
|
||||
<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.JCheckBox" name="m_jVisible">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" 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="jLabel3">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.peoplevisible" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.peopleimage" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.data.gui.JImageEditor" name="m_jImage">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 250]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/password.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.peoplepassword" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="m_jRole">
|
||||
<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="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.rolem" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jcard">
|
||||
<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="jLblCardID">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.card" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.laf.combobox.WebComboBox" name="webCBSecurity">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="3">
|
||||
<StringItem index="0" value="Generate new key"/>
|
||||
<StringItem index="1" value="Delete exisitng key"/>
|
||||
<StringItem index="2" value="Use iButton ID"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="selectedIndex" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="0" type="code"/>
|
||||
</Property>
|
||||
<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>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="webCBSecurityActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.Password" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,467 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ComboBoxValModel;
|
||||
import com.unicenta.data.loader.SentenceList;
|
||||
import com.unicenta.data.user.*;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.Hashcypher;
|
||||
import com.unicenta.pos.util.StringUtils;
|
||||
import com.unicenta.pos.util.uOWWatch;
|
||||
import java.awt.Component;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.Clipboard;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.UUID;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class PeopleView extends JPanel implements EditorRecord {
|
||||
|
||||
private Object m_oId;
|
||||
private String m_sPassword;
|
||||
|
||||
private final DirtyManager m_Dirty;
|
||||
|
||||
private final SentenceList m_sentrole;
|
||||
private ComboBoxValModel m_RoleModel;
|
||||
|
||||
private final ComboBoxValModel m_ReasonModel;
|
||||
|
||||
/** Creates new form PeopleEditor
|
||||
* @param dlAdmin
|
||||
* @param dirty */
|
||||
public PeopleView(DataLogicAdmin dlAdmin, DirtyManager dirty) {
|
||||
|
||||
initComponents();
|
||||
|
||||
// El modelo de roles
|
||||
m_sentrole = dlAdmin.getRolesList();
|
||||
m_RoleModel = new ComboBoxValModel();
|
||||
|
||||
m_Dirty = dirty;
|
||||
m_jName.getDocument().addDocumentListener(dirty);
|
||||
m_jRole.addActionListener(dirty);
|
||||
m_jVisible.addActionListener(dirty);
|
||||
m_jImage.addPropertyChangeListener("image", dirty);
|
||||
m_jcard.getDocument().addDocumentListener(dirty);
|
||||
|
||||
m_ReasonModel = new ComboBoxValModel();
|
||||
m_ReasonModel.add(AppLocal.getIntString("cboption.generate"));
|
||||
m_ReasonModel.add(AppLocal.getIntString("cboption.clear"));
|
||||
m_ReasonModel.add(AppLocal.getIntString("cboption.iButton"));
|
||||
|
||||
webCBSecurity.setModel(m_ReasonModel);
|
||||
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_sPassword = null;
|
||||
m_RoleModel.setSelectedKey(null);
|
||||
m_jVisible.setSelected(false);
|
||||
m_jcard.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
m_jName.setEnabled(false);
|
||||
m_jRole.setEnabled(false);
|
||||
m_jVisible.setEnabled(false);
|
||||
m_jcard.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
jButton1.setEnabled(false);
|
||||
webCBSecurity.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_sPassword = null;
|
||||
m_RoleModel.setSelectedKey(null);
|
||||
m_jVisible.setSelected(true);
|
||||
m_jcard.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
m_jName.setEnabled(true);
|
||||
m_jRole.setEnabled(true);
|
||||
m_jVisible.setEnabled(true);
|
||||
m_jcard.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
jButton1.setEnabled(true);
|
||||
webCBSecurity.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
Object[] people = (Object[]) value;
|
||||
m_oId = people[0];
|
||||
m_jName.setText(Formats.STRING.formatValue(people[1]));
|
||||
m_sPassword = Formats.STRING.formatValue(people[2]);
|
||||
m_RoleModel.setSelectedKey(people[3]);
|
||||
m_jVisible.setSelected(((Boolean) people[4]).booleanValue());
|
||||
m_jcard.setText(Formats.STRING.formatValue(people[5]));
|
||||
m_jImage.setImage((BufferedImage) people[6]);
|
||||
|
||||
m_jName.setEnabled(false);
|
||||
m_jRole.setEnabled(false);
|
||||
m_jVisible.setEnabled(false);
|
||||
m_jcard.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
jButton1.setEnabled(false);
|
||||
webCBSecurity.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
Object[] people = (Object[]) value;
|
||||
m_oId = people[0];
|
||||
m_jName.setText(Formats.STRING.formatValue(people[1]));
|
||||
m_sPassword = Formats.STRING.formatValue(people[2]);
|
||||
m_RoleModel.setSelectedKey(people[3]);
|
||||
m_jVisible.setSelected(((Boolean) people[4]).booleanValue());
|
||||
m_jcard.setText(Formats.STRING.formatValue(people[5]));
|
||||
m_jImage.setImage((BufferedImage) people[6]);
|
||||
|
||||
if (m_jcard.getText().length() == 16) {
|
||||
jLblCardID.setText(AppLocal.getIntString("label.ibutton"));
|
||||
} else {
|
||||
jLblCardID.setText(AppLocal.getIntString("label.card"));
|
||||
}
|
||||
System.out.println(m_jcard.getText().length());
|
||||
|
||||
m_jName.setEnabled(true);
|
||||
m_jRole.setEnabled(true);
|
||||
m_jVisible.setEnabled(true);
|
||||
m_jcard.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
jButton1.setEnabled(true);
|
||||
webCBSecurity.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] people = new Object[7];
|
||||
people[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
|
||||
people[1] = Formats.STRING.parseValue(m_jName.getText());
|
||||
people[2] = Formats.STRING.parseValue(m_sPassword);
|
||||
people[3] = m_RoleModel.getSelectedKey();
|
||||
people[4] = m_jVisible.isSelected();
|
||||
people[5] = Formats.STRING.parseValue(m_jcard.getText());
|
||||
people[6] = m_jImage.getImage();
|
||||
return people;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void activate() throws BasicException {
|
||||
|
||||
m_RoleModel = new ComboBoxValModel(m_sentrole.list());
|
||||
m_jRole.setModel(m_RoleModel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
m_jVisible = new javax.swing.JCheckBox();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
m_jImage = new com.unicenta.data.gui.JImageEditor();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
m_jRole = new javax.swing.JComboBox();
|
||||
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();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setPreferredSize(new java.awt.Dimension(500, 500));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/info.png"))); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.peoplenamem")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jLabel1MouseClicked(evt);
|
||||
}
|
||||
});
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jVisible.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jVisible.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(AppLocal.getIntString("label.peoplevisible")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel4.setText(AppLocal.getIntString("label.peopleimage")); // NOI18N
|
||||
jLabel4.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jImage.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jImage.setPreferredSize(new java.awt.Dimension(300, 250));
|
||||
|
||||
jButton1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/password.png"))); // NOI18N
|
||||
jButton1.setText(AppLocal.getIntString("button.peoplepassword")); // NOI18N
|
||||
jButton1.setToolTipText("");
|
||||
jButton1.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
m_jRole.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jRole.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.rolem")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jcard.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jcard.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLblCardID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblCardID.setText(AppLocal.getIntString("label.card")); // NOI18N
|
||||
jLblCardID.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
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) {
|
||||
webCBSecurityActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
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));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(m_jVisible, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jRole, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLblCardID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.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))
|
||||
.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))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.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(jButton1, 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(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)
|
||||
.addComponent(webCBSecurity, 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.BASELINE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jRole, 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.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jVisible, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(15, 15, 15)
|
||||
.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))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
|
||||
String sNewPassword = Hashcypher.changePassword(this);
|
||||
if (sNewPassword != null) {
|
||||
m_sPassword = sNewPassword;
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
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)
|
||||
{
|
||||
m_jcard.setText("C" + StringUtils.getCardNumber());
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
if(webCBSecurity.getSelectedIndex() == 1){
|
||||
if (JOptionPane.showConfirmDialog(this,
|
||||
AppLocal.getIntString("message.cardremove"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
|
||||
{
|
||||
m_jcard.setText(null);
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
if(webCBSecurity.getSelectedIndex() == 2){
|
||||
if (JOptionPane.showConfirmDialog(this,
|
||||
AppLocal.getIntString("message.ibuttonassign"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.OK_CANCEL_OPTION,
|
||||
JOptionPane.INFORMATION_MESSAGE) == JOptionPane.OK_OPTION)
|
||||
|
||||
{
|
||||
m_jcard.setText( uOWWatch.getibuttonid() );
|
||||
jLblCardID.setText(AppLocal.getIntString("label.ibutton"));
|
||||
m_Dirty.setDirty(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_webCBSecurityActionPerformed
|
||||
|
||||
private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked
|
||||
if (evt.getClickCount() == 2) {
|
||||
String uuidString = m_oId.toString();
|
||||
StringSelection stringSelection = new StringSelection(uuidString);
|
||||
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
clpbrd.setContents(stringSelection, null);
|
||||
|
||||
JOptionPane.showMessageDialog(null,
|
||||
AppLocal.getIntString("message.uuidcopy"));
|
||||
}
|
||||
}//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;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.pos.panels.ComboItemLocal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* Created on February 12, 2007, 11:50 PM
|
||||
*
|
||||
*/
|
||||
public class ResourceType extends ComboItemLocal {
|
||||
|
||||
public static final ResourceType TEXT = new ResourceType(0, "resource.text");
|
||||
public static final ResourceType IMAGE = new ResourceType(1, "resource.image");
|
||||
public static final ResourceType BINARY = new ResourceType(2, "resource.binary");
|
||||
|
||||
private ResourceType(Integer iKey, String sKeyValue) {
|
||||
super(iKey, sKeyValue);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.DataLogicSystem;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class ResourcesPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tresources;
|
||||
private ResourcesView jeditor;
|
||||
|
||||
/** Creates a new instance of JPanelResources */
|
||||
public ResourcesPanel() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected void init() {
|
||||
DataLogicAdmin dlAdmin = (DataLogicAdmin) app.getBean("com.unicenta.pos.admin.DataLogicAdmin");
|
||||
tresources = dlAdmin.getTableResources();
|
||||
jeditor = new ResourcesView(dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
if (super.deactivate()) {
|
||||
DataLogicSystem dlSystem = (DataLogicSystem) app.getBean("com.unicenta.pos.forms.DataLogicSystem");
|
||||
dlSystem.resetResourcesCache();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tresources);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tresources);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tresources.getVectorerBasic(new int[] {1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tresources.getComparatorCreator(new int[] {1, 2});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tresources.getRenderStringBasic(new int[] {1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Resources");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.ButtonGroup" name="m_jGroupType">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel3" alignment="0" pref="549" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" pref="90" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jName" min="-2" pref="180" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jType" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="m_jBtnReadScript" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jType" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jBtnReadScript" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" pref="328" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="m_jContainer">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription">
|
||||
<CardConstraints cardName="text"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="m_jText">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription">
|
||||
<CardConstraints cardName="null"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
</Container>
|
||||
<Component class="com.unicenta.data.gui.JImageEditor" name="m_jImage">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription">
|
||||
<CardConstraints cardName="image"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.resname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</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.JTextField" name="m_jName">
|
||||
<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.JComboBox" name="m_jType">
|
||||
<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="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jTypeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="m_jBtnReadScript">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.readscript" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jBtnReadScriptActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,377 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ComboBoxValModel;
|
||||
import com.unicenta.data.loader.ImageUtils;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.Base64Encoder;
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Component;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public final class ResourcesView extends JPanel implements EditorRecord {
|
||||
|
||||
private Object m_oId;
|
||||
private ComboBoxValModel m_ResourceModel;
|
||||
|
||||
/** Creates new form ResourcesEditor
|
||||
* @param dirty */
|
||||
public ResourcesView(DirtyManager dirty) {
|
||||
initComponents();
|
||||
|
||||
m_ResourceModel = new ComboBoxValModel();
|
||||
m_ResourceModel.add(ResourceType.TEXT);
|
||||
m_ResourceModel.add(ResourceType.IMAGE);
|
||||
m_ResourceModel.add(ResourceType.BINARY);
|
||||
m_jType.setModel(m_ResourceModel);
|
||||
|
||||
m_jName.getDocument().addDocumentListener(dirty);
|
||||
m_jType.addActionListener(dirty);
|
||||
m_jText.getDocument().addDocumentListener(dirty);
|
||||
m_jImage.addPropertyChangeListener("image", dirty);
|
||||
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_ResourceModel.setSelectedItem(null);
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
m_jName.setEnabled(false);
|
||||
m_jType.setEnabled(false);
|
||||
m_jText.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
m_jBtnReadScript.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_ResourceModel.setSelectedItem(ResourceType.TEXT);
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
m_jName.setEnabled(true);
|
||||
m_jType.setEnabled(true);
|
||||
m_jText.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
m_jBtnReadScript.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
Object[] resource = (Object[]) value;
|
||||
m_oId = resource[0];
|
||||
m_jName.setText((String) resource[1]);
|
||||
m_ResourceModel.setSelectedKey(resource[2]);
|
||||
|
||||
ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
|
||||
if (restype == ResourceType.TEXT) {
|
||||
m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jImage.setImage(null);
|
||||
} else if (restype == ResourceType.IMAGE) {
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
|
||||
} else if (restype == ResourceType.BINARY) {
|
||||
m_jText.setText(resource[3] == null
|
||||
? null
|
||||
: Base64Encoder.encodeChunked((byte[]) resource[3]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jImage.setImage(null);
|
||||
} else {
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
}
|
||||
m_jName.setEnabled(false);
|
||||
m_jType.setEnabled(false);
|
||||
m_jText.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
m_jBtnReadScript.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
Object[] resource = (Object[]) value;
|
||||
m_oId = resource[0];
|
||||
m_jName.setText((String) resource[1]);
|
||||
m_ResourceModel.setSelectedKey(resource[2]);
|
||||
|
||||
ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
|
||||
if (restype == ResourceType.TEXT) {
|
||||
m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jImage.setImage(null);
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
} else if (restype == ResourceType.IMAGE) {
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
|
||||
m_jBtnReadScript.setVisible(false);
|
||||
} else if (restype == ResourceType.BINARY) {
|
||||
m_jText.setText(resource[2] == null
|
||||
? null
|
||||
: Base64Encoder.encodeChunked((byte[]) resource[3]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jImage.setImage(null);
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
} else {
|
||||
m_jText.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
}
|
||||
m_jName.setEnabled(true);
|
||||
m_jType.setEnabled(true);
|
||||
m_jText.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
m_jBtnReadScript.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] resource = new Object[4];
|
||||
|
||||
resource[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
|
||||
resource[1] = m_jName.getText();
|
||||
|
||||
ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
|
||||
resource[2] = restype.getKey();
|
||||
if (restype == ResourceType.TEXT) {
|
||||
resource[3] = Formats.BYTEA.parseValue(m_jText.getText());
|
||||
} else if (restype == ResourceType.IMAGE) {
|
||||
resource[3] = ImageUtils.writeImage(m_jImage.getImage());
|
||||
} else if (restype == ResourceType.BINARY) {
|
||||
resource[3] = Base64Encoder.decode(m_jText.getText());
|
||||
} else {
|
||||
resource[3] = null;
|
||||
}
|
||||
|
||||
return resource;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
private void showView(String view) {
|
||||
CardLayout cl = (CardLayout)(m_jContainer.getLayout());
|
||||
cl.show(m_jContainer, view);
|
||||
}
|
||||
|
||||
public static String readFileAsString(String fileName) {
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
chooser.showOpenDialog(null);
|
||||
File f = chooser.getSelectedFile();
|
||||
String filename = f.getAbsolutePath();
|
||||
|
||||
String data = "";
|
||||
try {
|
||||
data = new String(Files.readAllBytes(Paths.get(filename)));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
m_jGroupType = new javax.swing.ButtonGroup();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
m_jContainer = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
m_jText = new javax.swing.JTextArea();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
m_jImage = new com.unicenta.data.gui.JImageEditor();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
m_jType = new javax.swing.JComboBox();
|
||||
m_jBtnReadScript = new javax.swing.JButton();
|
||||
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
m_jContainer.setLayout(new java.awt.CardLayout());
|
||||
|
||||
m_jText.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jScrollPane1.setViewportView(m_jText);
|
||||
|
||||
m_jContainer.add(jScrollPane1, "text");
|
||||
m_jContainer.add(jPanel1, "null");
|
||||
m_jContainer.add(m_jImage, "image");
|
||||
|
||||
jPanel3.add(m_jContainer, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.resname")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jType.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jType.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
m_jType.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jTypeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
m_jBtnReadScript.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
m_jBtnReadScript.setText(bundle.getString("button.readscript")); // NOI18N
|
||||
m_jBtnReadScript.setPreferredSize(new java.awt.Dimension(80, 30));
|
||||
m_jBtnReadScript.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jBtnReadScriptActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 549, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(m_jBtnReadScript, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jBtnReadScript, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void m_jTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jTypeActionPerformed
|
||||
|
||||
ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
|
||||
if (restype == ResourceType.TEXT) {
|
||||
showView("text");
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
} else if (restype == ResourceType.IMAGE) {
|
||||
showView("image");
|
||||
m_jBtnReadScript.setVisible(false);
|
||||
} else if (restype == ResourceType.BINARY) {
|
||||
showView("text");
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
} else {
|
||||
showView("null");
|
||||
m_jBtnReadScript.setVisible(true);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_m_jTypeActionPerformed
|
||||
|
||||
private void m_jBtnReadScriptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnReadScriptActionPerformed
|
||||
String filename="";
|
||||
String data = readFileAsString(filename);
|
||||
if (data != null) {
|
||||
m_jText.setText(data);
|
||||
}
|
||||
}//GEN-LAST:event_m_jBtnReadScriptActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton m_jBtnReadScript;
|
||||
private javax.swing.JPanel m_jContainer;
|
||||
private javax.swing.ButtonGroup m_jGroupType;
|
||||
private com.unicenta.data.gui.JImageEditor m_jImage;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JTextArea m_jText;
|
||||
private javax.swing.JComboBox m_jType;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* Created on 27 de febrero de 2007, 23:46
|
||||
*
|
||||
*/
|
||||
public class RoleExtInfo extends RoleInfo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected byte[] m_aPermissions;
|
||||
|
||||
/** Creates a new instance of RoleExtInfo */
|
||||
public RoleExtInfo() {
|
||||
super();
|
||||
m_aPermissions = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dr
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void readValues(DataRead dr) throws BasicException {
|
||||
m_sName = dr.getString(1);
|
||||
m_aPermissions = dr.getBytes(2);
|
||||
}
|
||||
|
||||
// implements Vectorer, ComparatorCreator
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String[] getHeaders() {
|
||||
return new String[] {"Name"};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String[] toStringArray() {
|
||||
return new String[] {m_sName};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Comparable[] toComparableArray() {
|
||||
return new Comparable[] {m_sName};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
import com.unicenta.data.loader.SerializableRead;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* Created on 27 de febrero de 2007, 23:27
|
||||
*
|
||||
*/
|
||||
public class RoleInfo implements SerializableRead, IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 9110127845966L;
|
||||
private String m_sID;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected String m_sName;
|
||||
|
||||
/** Creates a new instance of RoleInfo */
|
||||
public RoleInfo() {
|
||||
m_sID = null;
|
||||
m_sName = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dr
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void readValues(DataRead dr) throws BasicException {
|
||||
m_sID = dr.getString(1);
|
||||
m_sName = dr.getString(2);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sID
|
||||
*/
|
||||
public void setID(String sID) {
|
||||
m_sID = sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getID() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sValue
|
||||
*/
|
||||
public void setName(String sValue) {
|
||||
m_sName = sValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class RolesPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition troles;
|
||||
private TableDefinition trolesmenu;
|
||||
private RolesView jeditor;
|
||||
|
||||
|
||||
/** Creates a new instance of RolesPanel */
|
||||
public RolesPanel() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicAdmin dlAdmin = (DataLogicAdmin) app.getBean("com.unicenta.pos.admin.DataLogicAdmin");
|
||||
troles = dlAdmin.getTableRoles();
|
||||
jeditor = new RolesView(dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(troles);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(troles);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return troles.getVectorerBasic(new int[] {1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return troles.getComparatorCreator(new int[] {1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(troles.getRenderStringBasic(new int[] {1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Roles");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.admin;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import java.awt.Component;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public final class RolesView extends javax.swing.JPanel implements EditorRecord {
|
||||
|
||||
private Object m_oId;
|
||||
|
||||
/** Creates new form RolesEditor
|
||||
* @param dirty */
|
||||
public RolesView(DirtyManager dirty) {
|
||||
initComponents();
|
||||
|
||||
m_jName.getDocument().addDocumentListener(dirty);
|
||||
m_jText.getDocument().addDocumentListener(dirty);
|
||||
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_jText.setText(null);
|
||||
m_jName.setEnabled(false);
|
||||
m_jText.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
m_oId = null;
|
||||
m_jName.setText(null);
|
||||
m_jText.setText(null);
|
||||
m_jName.setEnabled(true);
|
||||
m_jText.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
|
||||
Object[] role = (Object[]) value;
|
||||
m_oId = role[0];
|
||||
m_jName.setText(Formats.STRING.formatValue(role[1]));
|
||||
m_jText.setText(Formats.BYTEA.formatValue(role[2]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jName.setEnabled(false);
|
||||
m_jText.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
|
||||
Object[] role = (Object[]) value;
|
||||
m_oId = role[0];
|
||||
m_jName.setText(Formats.STRING.formatValue(role[1]));
|
||||
m_jText.setText(Formats.BYTEA.formatValue(role[2]));
|
||||
m_jText.setCaretPosition(0);
|
||||
m_jName.setEnabled(true);
|
||||
m_jText.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
|
||||
Object[] role = new Object[3];
|
||||
role[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
|
||||
role[1] = m_jName.getText();
|
||||
role[2] = Formats.BYTEA.parseValue(m_jText.getText());
|
||||
return role;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
m_jText = new javax.swing.JTextArea();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
|
||||
m_jText.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jScrollPane1.setViewportView(m_jText);
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.namem")); // NOI18N
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 312, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JTextArea m_jText;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.catalog;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface CatalogSelector {
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void loadCatalog() throws BasicException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void showCatalogPanel(String id);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setComponentEnabled(boolean value);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void addActionListener(ActionListener l);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void removeActionListener(ActionListener l);
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.catalog;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.SerializerRead;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta Dec 17
|
||||
* Used in Categories to display all this Categories Products
|
||||
*/
|
||||
|
||||
public class CategoryStock {
|
||||
|
||||
String productId;
|
||||
String productName;
|
||||
String productCode;
|
||||
String categoryId;
|
||||
|
||||
/**
|
||||
* Main method to return all customer's transactions
|
||||
*/
|
||||
public CategoryStock() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param productId
|
||||
* @param productName
|
||||
* @param cId
|
||||
*/
|
||||
public CategoryStock(String productId, String productName, String productCode, String pId) {
|
||||
this.productId = productId;
|
||||
this.productName = productName;
|
||||
this.productCode = productCode;
|
||||
this.categoryId = pId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return product string
|
||||
*/
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
public void setProductId(String productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return product name string
|
||||
*/
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return product barcode string
|
||||
*/
|
||||
public String getProductCode() {
|
||||
return productCode;
|
||||
}
|
||||
public void setProductCode(String productCode) {
|
||||
this.productCode = productCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return category name string
|
||||
*/
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryId(String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return products for this category
|
||||
*/
|
||||
public static SerializerRead getSerializerRead() {
|
||||
return new SerializerRead() {
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
String productId = dr.getString(1);
|
||||
String productName = dr.getString(2);
|
||||
String productCode = dr.getString(3);
|
||||
String categoryId = dr.getString(4);
|
||||
return new CategoryStock(productId, productName, productCode, categoryId);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-66,0,0,2,25"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="m_jCategories">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[275, 600]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[265, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Before"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="m_jRootCategories">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="11" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 100]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[275, 130]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription">
|
||||
<CardConstraints cardName="rootcategories"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="m_jscrollcat">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[265, 130]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JList" name="m_jListCategories">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="selectionMode" type="int" value="0"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="m_jListCategoriesValueChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="0" left="5" right="5" top="0"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
|
||||
<Property name="columns" type="int" value="1"/>
|
||||
<Property name="rows" type="int" value="0"/>
|
||||
<Property name="verticalGap" type="int" value="5"/>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="m_jSubCategories">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription">
|
||||
<CardConstraints cardName="subcategories"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="West"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="m_lblIndicator">
|
||||
<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="jLabel1"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="0" left="5" right="5" top="0"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
|
||||
<Property name="columns" type="int" value="1"/>
|
||||
<Property name="rows" type="int" value="0"/>
|
||||
<Property name="verticalGap" type="int" value="5"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="m_btnBack1">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/2uparrow.png"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_btnBack1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="m_jProducts">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,622 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.catalog;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.JMessageDialog;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.DataLogicSales;
|
||||
import com.unicenta.pos.sales.TaxesLogic;
|
||||
import com.unicenta.pos.ticket.CategoryInfo;
|
||||
import com.unicenta.pos.ticket.ProductInfoExt;
|
||||
import com.unicenta.pos.ticket.TaxInfo;
|
||||
import com.unicenta.pos.util.ThumbNailBuilder;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.EventListenerList;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JCatalog extends JPanel implements ListSelectionListener, CatalogSelector {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected EventListenerList listeners = new EventListenerList();
|
||||
private DataLogicSales m_dlSales;
|
||||
private TaxesLogic taxeslogic;
|
||||
|
||||
private boolean pricevisible;
|
||||
private boolean taxesincluded;
|
||||
|
||||
// Set of Products panels
|
||||
private final Map<String, ProductInfoExt> m_productsset = new HashMap<>();
|
||||
|
||||
// Set of Categoriespanels
|
||||
private final Set<String> m_categoriesset = new HashSet<>();
|
||||
|
||||
private ThumbNailBuilder tnbbutton;
|
||||
private ThumbNailBuilder tnbcat;
|
||||
private ThumbNailBuilder tnbsubcat;
|
||||
|
||||
private CategoryInfo showingcategory = null;
|
||||
|
||||
/** Creates new form JCatalog
|
||||
* @param dlSales */
|
||||
public JCatalog(DataLogicSales dlSales) {
|
||||
this(dlSales, false, false, 90, 60);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dlSales
|
||||
* @param pricevisible
|
||||
* @param taxesincluded
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public JCatalog(DataLogicSales dlSales, boolean pricevisible,
|
||||
boolean taxesincluded, int width, int height) {
|
||||
|
||||
m_dlSales = dlSales;
|
||||
this.pricevisible = pricevisible;
|
||||
this.taxesincluded = taxesincluded;
|
||||
|
||||
initComponents();
|
||||
|
||||
m_jListCategories.addListSelectionListener(this);
|
||||
|
||||
m_jscrollcat.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
|
||||
tnbcat = new ThumbNailBuilder(48, 48, "com/unicenta/images/category.png");
|
||||
tnbsubcat = new ThumbNailBuilder(width, height, "com/unicenta/images/subcategory.png");
|
||||
tnbbutton = new ThumbNailBuilder(width, height, "com/unicenta/images/null.png");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void showCatalogPanel(String id) {
|
||||
|
||||
if (id == null) {
|
||||
showRootCategoriesPanel();
|
||||
} else {
|
||||
showProductPanel(id);
|
||||
}
|
||||
}
|
||||
|
||||
public Component getCatComponent() {
|
||||
return m_jCategories;
|
||||
}
|
||||
|
||||
public Component getProductComponent() {
|
||||
return m_jProducts;
|
||||
}
|
||||
|
||||
public boolean setControls(String position) {
|
||||
if (position.equals("south")) {
|
||||
m_jRootCategories.add(jPanel2, BorderLayout.SOUTH);
|
||||
m_jSubCategories.add(jPanel1, BorderLayout.SOUTH);
|
||||
((GridLayout) jPanel3.getLayout()).setRows(1);
|
||||
((GridLayout) jPanel5.getLayout()).setRows(1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void loadCatalog() throws BasicException {
|
||||
|
||||
// delete all categories panel
|
||||
m_jProducts.removeAll();
|
||||
|
||||
m_productsset.clear();
|
||||
m_categoriesset.clear();
|
||||
|
||||
showingcategory = null;
|
||||
|
||||
// Load the taxes logic
|
||||
taxeslogic = new TaxesLogic(m_dlSales.getTaxList().list());
|
||||
|
||||
// Load all categories.
|
||||
java.util.List<CategoryInfo> categories = m_dlSales.getRootCategories();
|
||||
|
||||
// Select the first category
|
||||
m_jListCategories.setCellRenderer(new SmallCategoryRenderer());
|
||||
m_jListCategories.setModel(new CategoriesListModel(categories)); // aCatList
|
||||
|
||||
if (m_jListCategories.getModel().getSize() == 0) {
|
||||
m_jscrollcat.setVisible(false);
|
||||
jPanel2.setVisible(false);
|
||||
} else {
|
||||
m_jscrollcat.setVisible(true);
|
||||
jPanel2.setVisible(true);
|
||||
m_jListCategories.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
showRootCategoriesPanel();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void setComponentEnabled(boolean value) {
|
||||
|
||||
m_jListCategories.setEnabled(value);
|
||||
m_jscrollcat.setEnabled(value);
|
||||
m_lblIndicator.setEnabled(value);
|
||||
m_btnBack1.setEnabled(value);
|
||||
m_jProducts.setEnabled(value);
|
||||
|
||||
synchronized (m_jProducts.getTreeLock()) {
|
||||
int compCount = m_jProducts.getComponentCount();
|
||||
for (int i = 0 ; i < compCount ; i++) {
|
||||
m_jProducts.getComponent(i).setEnabled(value);
|
||||
}
|
||||
}
|
||||
|
||||
this.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
@Override
|
||||
public void addActionListener(ActionListener l) {
|
||||
listeners.add(ActionListener.class, l);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
@Override
|
||||
public void removeActionListener(ActionListener l) {
|
||||
listeners.remove(ActionListener.class, l);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent evt) {
|
||||
|
||||
if (!evt.getValueIsAdjusting()) {
|
||||
int i = m_jListCategories.getSelectedIndex();
|
||||
if (i >= 0) {
|
||||
// Lo hago visible...
|
||||
Rectangle oRect = m_jListCategories.getCellBounds(i, i);
|
||||
m_jListCategories.scrollRectToVisible(oRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param prod
|
||||
*/
|
||||
protected void fireSelectedProduct(ProductInfoExt prod) {
|
||||
EventListener[] l = listeners.getListeners(ActionListener.class);
|
||||
ActionEvent e = null;
|
||||
for (EventListener l1 : l) {
|
||||
if (e == null) {
|
||||
e = new ActionEvent(prod, ActionEvent.ACTION_PERFORMED, prod.getID());
|
||||
}
|
||||
((ActionListener) l1).actionPerformed(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void selectCategoryPanel(String catid) {
|
||||
try {
|
||||
if (!m_categoriesset.contains(catid)) {
|
||||
|
||||
JCatalogTab jcurrTab = new JCatalogTab();
|
||||
jcurrTab.applyComponentOrientation(getComponentOrientation());
|
||||
m_jProducts.add(jcurrTab, catid);
|
||||
m_categoriesset.add(catid);
|
||||
|
||||
java.util.List<CategoryInfo> categories = m_dlSales.getSubcategories(catid);
|
||||
for (CategoryInfo cat : categories) {
|
||||
|
||||
if (cat.getCatShowName()) {
|
||||
jcurrTab.addButton(new ImageIcon(tnbsubcat.getThumbNailText
|
||||
(cat.getImage(), cat.getName())),
|
||||
new SelectedCategory(cat),cat.getTextTip());
|
||||
}else{
|
||||
jcurrTab.addButton(new ImageIcon(
|
||||
tnbsubcat.getThumbNailText(cat.getImage(), "")),
|
||||
new SelectedCategory(cat),cat.getTextTip());
|
||||
}
|
||||
}
|
||||
|
||||
java.util.List<ProductInfoExt> prods = m_dlSales.getProductConstant();
|
||||
for (ProductInfoExt prod : prods) {
|
||||
jcurrTab.addButton(
|
||||
new ImageIcon(tnbbutton.getThumbNailText(prod.getImage(),
|
||||
getProductLabel(prod))),
|
||||
new SelectedAction(prod),
|
||||
prod.getTextTip());
|
||||
}
|
||||
|
||||
java.util.List<ProductInfoExt> products = m_dlSales.getProductCatalog(catid);
|
||||
|
||||
for (ProductInfoExt prod : products) {
|
||||
jcurrTab.addButton(
|
||||
new ImageIcon(tnbbutton.getThumbNailText(prod.getImage(),
|
||||
getProductLabel(prod))),
|
||||
new SelectedAction(prod),prod.getTextTip());
|
||||
}
|
||||
}
|
||||
|
||||
CardLayout cl = (CardLayout)(m_jProducts.getLayout());
|
||||
cl.show(m_jProducts, catid);
|
||||
} catch (BasicException e) {
|
||||
JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING,
|
||||
AppLocal.getIntString("message.notactive"), e));
|
||||
}
|
||||
}
|
||||
|
||||
private String getProductLabel(ProductInfoExt product) {
|
||||
|
||||
if (pricevisible) {
|
||||
if (taxesincluded) {
|
||||
TaxInfo tax = taxeslogic.getTaxInfo(product.getTaxCategoryID());
|
||||
if(!"".equals(product.getDisplay())){
|
||||
return "<html><center>" + product.getDisplay() + "<br>" + product.printPriceSellTax(tax);
|
||||
} else {
|
||||
return "<html><center>" + product.getName() + "<br>" + product.printPriceSellTax(tax);
|
||||
}
|
||||
} else {
|
||||
if(!"".equals(product.getDisplay())){
|
||||
return "<html><center>" + product.getDisplay() + "<br>" + product.printPriceSell();
|
||||
} else {
|
||||
return "<html><center>" + product.getName() + "<br>" + product.printPriceSell();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!"".equals(product.getDisplay())) {
|
||||
return product.getDisplay();
|
||||
} else {
|
||||
return product.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void selectIndicatorPanel(Icon icon, String label, String texttip) {
|
||||
|
||||
m_lblIndicator.setText(label);
|
||||
m_lblIndicator.setIcon(icon);
|
||||
|
||||
// Show subcategories panel
|
||||
CardLayout cl = (CardLayout)(m_jCategories.getLayout());
|
||||
cl.show(m_jCategories, "subcategories");
|
||||
}
|
||||
|
||||
private void selectIndicatorCategories() {
|
||||
// Show root categories panel
|
||||
CardLayout cl = (CardLayout)(m_jCategories.getLayout());
|
||||
cl.show(m_jCategories, "rootcategories");
|
||||
}
|
||||
|
||||
private void showRootCategoriesPanel() {
|
||||
|
||||
selectIndicatorCategories();
|
||||
// Show selected root category
|
||||
CategoryInfo cat = (CategoryInfo) m_jListCategories.getSelectedValue();
|
||||
|
||||
if (cat != null) {
|
||||
selectCategoryPanel(cat.getID());
|
||||
}
|
||||
showingcategory = null;
|
||||
}
|
||||
|
||||
private void showSubcategoryPanel(CategoryInfo category) {
|
||||
// Modified JDL 13.04.13
|
||||
// this is the new panel that displays when a sub catergory is selected mouse does not work here
|
||||
selectIndicatorPanel(new ImageIcon(tnbsubcat.getThumbNail(
|
||||
category.getImage())),category.getName(), category.getTextTip());
|
||||
selectCategoryPanel(category.getID());
|
||||
showingcategory = category;
|
||||
}
|
||||
|
||||
private void showProductPanel(String id) {
|
||||
|
||||
ProductInfoExt product = m_productsset.get(id);
|
||||
|
||||
if (product == null) {
|
||||
if (m_productsset.containsKey(id)) {
|
||||
// It is an empty panel
|
||||
if (showingcategory == null) {
|
||||
showRootCategoriesPanel();
|
||||
} else {
|
||||
showSubcategoryPanel(showingcategory);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
// Create products panel
|
||||
java.util.List<ProductInfoExt> products = m_dlSales.getProductComments(id);
|
||||
|
||||
if (products.isEmpty()) {
|
||||
m_productsset.put(id, null);
|
||||
|
||||
if (showingcategory == null) {
|
||||
showRootCategoriesPanel();
|
||||
} else {
|
||||
showSubcategoryPanel(showingcategory);
|
||||
}
|
||||
} else {
|
||||
|
||||
product = m_dlSales.getProductInfo(id);
|
||||
m_productsset.put(id, product);
|
||||
|
||||
JCatalogTab jcurrTab = new JCatalogTab();
|
||||
jcurrTab.applyComponentOrientation(getComponentOrientation());
|
||||
m_jProducts.add(jcurrTab, "PRODUCT." + id);
|
||||
|
||||
// Add products
|
||||
for (ProductInfoExt prod : products) {
|
||||
jcurrTab.addButton(new ImageIcon(tnbbutton.getThumbNailText(prod.getImage(),
|
||||
getProductLabel(prod))), new SelectedAction(prod),prod.getTextTip());
|
||||
}
|
||||
selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(product.getImage())),
|
||||
product.getDisplay(), product.getTextTip());
|
||||
|
||||
CardLayout cl = (CardLayout)(m_jProducts.getLayout());
|
||||
cl.show(m_jProducts, "PRODUCT." + id);
|
||||
}
|
||||
} catch (BasicException eb) {
|
||||
m_productsset.put(id, null);
|
||||
if (showingcategory == null) {
|
||||
showRootCategoriesPanel();
|
||||
} else {
|
||||
showSubcategoryPanel(showingcategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(
|
||||
product.getImage())), product.getName(), product.getTextTip());
|
||||
|
||||
CardLayout cl = (CardLayout)(m_jProducts.getLayout());
|
||||
cl.show(m_jProducts, "PRODUCT." + id);
|
||||
}
|
||||
}
|
||||
|
||||
private class SelectedAction implements ActionListener {
|
||||
private final ProductInfoExt prod;
|
||||
public SelectedAction(ProductInfoExt prod) {
|
||||
this.prod = prod;
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fireSelectedProduct(prod);
|
||||
}
|
||||
}
|
||||
|
||||
private class SelectedCategory implements ActionListener {
|
||||
private final CategoryInfo category;
|
||||
public SelectedCategory(CategoryInfo category) {
|
||||
this.category = category;
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
showSubcategoryPanel(category);
|
||||
}
|
||||
}
|
||||
|
||||
private class CategoriesListModel extends AbstractListModel {
|
||||
private final java.util.List m_aCategories;
|
||||
public CategoriesListModel(java.util.List aCategories) {
|
||||
m_aCategories = aCategories;
|
||||
}
|
||||
@Override
|
||||
public int getSize() {
|
||||
return m_aCategories.size();
|
||||
}
|
||||
@Override
|
||||
public Object getElementAt(int i) {
|
||||
return m_aCategories.get(i);
|
||||
}
|
||||
}
|
||||
|
||||
private class SmallCategoryRenderer extends DefaultListCellRenderer {
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value,
|
||||
int index, boolean isSelected, boolean cellHasFocus) {
|
||||
|
||||
super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
|
||||
CategoryInfo cat = (CategoryInfo) value;
|
||||
setText(cat.getName());
|
||||
setIcon(new ImageIcon(tnbcat.getThumbNail(cat.getImage())));
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
m_jCategories = new javax.swing.JPanel();
|
||||
m_jRootCategories = new javax.swing.JPanel();
|
||||
m_jscrollcat = new javax.swing.JScrollPane();
|
||||
m_jListCategories = new javax.swing.JList();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
m_jSubCategories = new javax.swing.JPanel();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
m_lblIndicator = new javax.swing.JLabel();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
m_btnBack1 = new javax.swing.JButton();
|
||||
m_jProducts = new javax.swing.JPanel();
|
||||
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
m_jCategories.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jCategories.setMaximumSize(new java.awt.Dimension(275, 600));
|
||||
m_jCategories.setPreferredSize(new java.awt.Dimension(265, 0));
|
||||
m_jCategories.setLayout(new java.awt.CardLayout());
|
||||
|
||||
m_jRootCategories.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
|
||||
m_jRootCategories.setMinimumSize(new java.awt.Dimension(200, 100));
|
||||
m_jRootCategories.setPreferredSize(new java.awt.Dimension(275, 130));
|
||||
m_jRootCategories.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
m_jscrollcat.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
m_jscrollcat.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
m_jscrollcat.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jscrollcat.setPreferredSize(new java.awt.Dimension(265, 130));
|
||||
|
||||
m_jListCategories.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jListCategories.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
||||
m_jListCategories.setFocusable(false);
|
||||
m_jListCategories.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
||||
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
|
||||
m_jListCategoriesValueChanged(evt);
|
||||
}
|
||||
});
|
||||
m_jscrollcat.setViewportView(m_jListCategories);
|
||||
|
||||
m_jRootCategories.add(m_jscrollcat, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
jPanel3.setLayout(new java.awt.GridLayout(0, 1, 0, 5));
|
||||
jPanel2.add(jPanel3, java.awt.BorderLayout.NORTH);
|
||||
|
||||
m_jRootCategories.add(jPanel2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
m_jCategories.add(m_jRootCategories, "rootcategories");
|
||||
|
||||
m_jSubCategories.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel4.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
m_lblIndicator.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_lblIndicator.setText("jLabel1");
|
||||
jPanel4.add(m_lblIndicator, java.awt.BorderLayout.NORTH);
|
||||
|
||||
m_jSubCategories.add(jPanel4, java.awt.BorderLayout.WEST);
|
||||
|
||||
jPanel1.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
jPanel5.setLayout(new java.awt.GridLayout(0, 1, 0, 5));
|
||||
|
||||
m_btnBack1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/2uparrow.png"))); // NOI18N
|
||||
m_btnBack1.setFocusPainted(false);
|
||||
m_btnBack1.setFocusable(false);
|
||||
m_btnBack1.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
m_btnBack1.setPreferredSize(new java.awt.Dimension(60, 45));
|
||||
m_btnBack1.setRequestFocusEnabled(false);
|
||||
m_btnBack1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_btnBack1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel5.add(m_btnBack1);
|
||||
|
||||
jPanel1.add(jPanel5, java.awt.BorderLayout.NORTH);
|
||||
|
||||
m_jSubCategories.add(jPanel1, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
m_jCategories.add(m_jSubCategories, "subcategories");
|
||||
|
||||
add(m_jCategories, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
m_jProducts.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jProducts.setLayout(new java.awt.CardLayout());
|
||||
add(m_jProducts, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void m_jListCategoriesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_m_jListCategoriesValueChanged
|
||||
|
||||
if (!evt.getValueIsAdjusting()) {
|
||||
CategoryInfo cat = (CategoryInfo) m_jListCategories.getSelectedValue();
|
||||
if (cat != null) {
|
||||
selectCategoryPanel(cat.getID());
|
||||
}
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_m_jListCategoriesValueChanged
|
||||
|
||||
private void m_btnBack1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_btnBack1ActionPerformed
|
||||
|
||||
showRootCategoriesPanel();
|
||||
|
||||
}//GEN-LAST:event_m_btnBack1ActionPerformed
|
||||
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JButton m_btnBack1;
|
||||
private javax.swing.JPanel m_jCategories;
|
||||
private javax.swing.JList m_jListCategories;
|
||||
private javax.swing.JPanel m_jProducts;
|
||||
private javax.swing.JPanel m_jRootCategories;
|
||||
private javax.swing.JPanel m_jSubCategories;
|
||||
private javax.swing.JScrollPane m_jscrollcat;
|
||||
private javax.swing.JLabel m_lblIndicator;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,1,0,0,1,102"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
</Form>
|
||||
@@ -0,0 +1,98 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.catalog;
|
||||
|
||||
import com.unicenta.beans.JFlowPanel;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JCatalogTab extends javax.swing.JPanel {
|
||||
|
||||
private JFlowPanel flowpanel;
|
||||
|
||||
/** Creates new form JCategoryProducts */
|
||||
public JCatalogTab() {
|
||||
initComponents();
|
||||
|
||||
flowpanel = new JFlowPanel();
|
||||
JScrollPane scroll = new JScrollPane(flowpanel);
|
||||
scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
scroll.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
|
||||
add(scroll, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
flowpanel.setEnabled(value);
|
||||
super.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ico
|
||||
* @param al
|
||||
* @param textTip
|
||||
*/
|
||||
public void addButton(Icon ico, ActionListener al, String textTip) {
|
||||
JButton btn = new JButton();
|
||||
btn.applyComponentOrientation(getComponentOrientation());
|
||||
btn.setIcon(ico);
|
||||
btn.setFocusPainted(false);
|
||||
btn.setFocusable(false);
|
||||
|
||||
if (textTip != null){
|
||||
btn.setToolTipText(textTip);
|
||||
}
|
||||
|
||||
btn.setRequestFocusEnabled(false);
|
||||
btn.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
btn.setVerticalTextPosition(SwingConstants.BOTTOM);
|
||||
btn.setMargin(new Insets(2, 2, 2, 2));
|
||||
btn.addActionListener(al);
|
||||
|
||||
flowpanel.add(btn);
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
|
||||
</AuxValues>
|
||||
<LayoutCode>
|
||||
<CodeStatement>
|
||||
<CodeExpression id="1">
|
||||
<ExpressionOrigin>
|
||||
<ExpressionProvider type="ComponentRef">
|
||||
<ComponentRef name="."/>
|
||||
</ExpressionProvider>
|
||||
</ExpressionOrigin>
|
||||
</CodeExpression>
|
||||
<StatementProvider type="CodeMethod">
|
||||
<CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/>
|
||||
</StatementProvider>
|
||||
<Parameters>
|
||||
<CodeExpression id="2">
|
||||
<ExpressionOrigin>
|
||||
<ExpressionProvider type="CodeConstructor">
|
||||
<CodeConstructor class="org.jdesktop.swingx.VerticalLayout" parameterTypes=""/>
|
||||
</ExpressionProvider>
|
||||
</ExpressionOrigin>
|
||||
</CodeExpression>
|
||||
</Parameters>
|
||||
</CodeStatement>
|
||||
</LayoutCode>
|
||||
</Form>
|
||||
@@ -0,0 +1,95 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.catalog;
|
||||
|
||||
import com.unicenta.beans.JFlowPanel;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Image;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JProductsSelector extends javax.swing.JPanel {
|
||||
|
||||
private final JFlowPanel flowpanel;
|
||||
|
||||
/** Creates new form JProductsSelector */
|
||||
public JProductsSelector() {
|
||||
initComponents();
|
||||
|
||||
flowpanel = new JFlowPanel();
|
||||
|
||||
add(flowpanel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param img
|
||||
* @param display
|
||||
* @param al
|
||||
* @param textTip
|
||||
*/
|
||||
public void addProduct(Image img, String display, ActionListener al,String textTip) {
|
||||
JButton btn = new JButton();
|
||||
btn.applyComponentOrientation(getComponentOrientation());
|
||||
btn.setText(display);
|
||||
btn.setFocusPainted(false);
|
||||
|
||||
if (textTip != null){
|
||||
btn.setToolTipText(textTip);
|
||||
}
|
||||
|
||||
btn.setFocusable(false);
|
||||
btn.setRequestFocusEnabled(false);
|
||||
btn.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
btn.setVerticalTextPosition(SwingConstants.TOP);
|
||||
btn.setMargin(new Insets(0, 0, 0, 0));
|
||||
btn.setMaximumSize(new Dimension(80, 70));
|
||||
// btn.setPreferredSize(new Dimension(20, 20));
|
||||
btn.setMinimumSize(new Dimension(40, 30));
|
||||
btn.addActionListener(al);
|
||||
|
||||
flowpanel.add(btn);
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setLayout(new org.jdesktop.swingx.VerticalLayout());
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.comm;
|
||||
|
||||
import gnu.io.CommPort;
|
||||
import gnu.io.CommPortIdentifier;
|
||||
import gnu.io.ParallelPort;
|
||||
import gnu.io.SerialPort;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class CommStream {
|
||||
|
||||
private String m_sPort;
|
||||
|
||||
private CommPortIdentifier m_PortIdPrinter;
|
||||
private CommPort m_CommPortPrinter;
|
||||
|
||||
private OutputStream m_out;
|
||||
private InputStream m_in;
|
||||
|
||||
/** Creates a new instance of CommPort
|
||||
* @param port */
|
||||
public CommStream(String port) {
|
||||
m_sPort = port;
|
||||
|
||||
m_PortIdPrinter = null;
|
||||
m_CommPortPrinter = null;
|
||||
m_out = null;
|
||||
m_in = null;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
try {
|
||||
if (m_out == null) {
|
||||
m_PortIdPrinter = CommPortIdentifier.getPortIdentifier(m_sPort); // Tomamos el puerto
|
||||
m_CommPortPrinter = m_PortIdPrinter.open("PORTID", 2000); // Abrimos el puerto
|
||||
|
||||
m_out = m_CommPortPrinter.getOutputStream(); // Tomamos el chorro de escritura
|
||||
|
||||
if (m_PortIdPrinter.getPortType() == CommPortIdentifier.PORT_SERIAL) {
|
||||
((SerialPort)m_CommPortPrinter).setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); // Configuramos el puerto
|
||||
} else if (m_PortIdPrinter.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
|
||||
((ParallelPort)m_CommPortPrinter).setMode(1);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
m_PortIdPrinter = null;
|
||||
m_CommPortPrinter = null;
|
||||
m_out = null;
|
||||
m_in = null;
|
||||
// } catch (NoSuchPortException e) {
|
||||
// } catch (PortInUseException e) {
|
||||
// } catch (UnsupportedCommOperationException e) {
|
||||
// } catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void closeAll() throws IOException {
|
||||
|
||||
if (m_out != null) {
|
||||
m_in = null;
|
||||
m_out.flush();
|
||||
m_out.close();
|
||||
m_out = null;
|
||||
m_CommPortPrinter = null;
|
||||
m_PortIdPrinter = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getPort() {
|
||||
return m_sPort;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public InputStream getIn() {
|
||||
init();
|
||||
return m_in;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public OutputStream getOut() {
|
||||
init();
|
||||
return m_out;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="0"/>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[950, 450]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[950, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,3,26,0,0,3,40"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
</Form>
|
||||
@@ -0,0 +1,128 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.alee.laf.WebLookAndFeel;
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppProperties;
|
||||
import com.unicenta.pos.forms.JRootFrame;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JFrmConfig extends javax.swing.JFrame {
|
||||
|
||||
private final JPanelConfiguration config;
|
||||
|
||||
/** Creates new form JFrmConfig
|
||||
* @param props */
|
||||
public JFrmConfig(AppProperties props) {
|
||||
|
||||
initComponents();
|
||||
|
||||
try {
|
||||
this.setIconImage(ImageIO.read(JRootFrame.class.getResourceAsStream("/com/unicenta/images/favicon.png")));
|
||||
} catch (IOException e) {
|
||||
}
|
||||
setTitle(AppLocal.APP_NAME + " - " + AppLocal.APP_VERSION + " - " + AppLocal.getIntString("Menu.Configuration"));
|
||||
|
||||
addWindowListener(new MyFrameListener());
|
||||
|
||||
config = new JPanelConfiguration(props);
|
||||
|
||||
getContentPane().add(config, BorderLayout.CENTER);
|
||||
|
||||
try {
|
||||
config.activate();
|
||||
} catch (BasicException e) { // never thrown ;-)
|
||||
}
|
||||
}
|
||||
|
||||
private class MyFrameListener extends WindowAdapter{
|
||||
|
||||
@Override
|
||||
public void windowClosing(WindowEvent evt) {
|
||||
if (config.deactivate()) {
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void windowClosed(WindowEvent evt) {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
setMinimumSize(new java.awt.Dimension(950, 450));
|
||||
setPreferredSize(new java.awt.Dimension(950, 500));
|
||||
|
||||
setSize(new java.awt.Dimension(808, 794));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(final String args[]) {
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
AppConfig config = new AppConfig(args);
|
||||
config.load();
|
||||
|
||||
// Set the look and feel
|
||||
try {
|
||||
Object laf = Class.forName(config.getProperty("swing.defaultlaf")).newInstance();
|
||||
if (!(laf instanceof MetalLookAndFeel) && laf instanceof LookAndFeel) {
|
||||
UIManager.setLookAndFeel((LookAndFeel) laf);
|
||||
} else {
|
||||
UIManager.setLookAndFeel("com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("Cannot set Look and Feel "+e.getMessage());
|
||||
}
|
||||
|
||||
new JFrmConfig(config).setVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,492 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[700, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="lblTktFooter1" max="32767" attributes="0"/>
|
||||
<Component id="lblTktHeader1" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="lblLogo" min="-2" pref="66" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="webSwtch_Logo" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jLbllogoPath" alignment="0" min="-2" pref="134" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="214" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="lblLogo" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="webSwtch_Logo" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="55" max="-2" attributes="0"/>
|
||||
<Component id="lblTktHeader1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="163" max="-2" attributes="0"/>
|
||||
<Component id="lblTktFooter1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="70" max="-2" attributes="0"/>
|
||||
<Component id="jLbllogoPath" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lblTktHeader1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tktheader1" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblTktFooter1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tktfooter1" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.extended.button.WebSwitch" name="webSwtch_Logo">
|
||||
<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="[80, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="webSwtch_LogoActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="jtxtTktFooter5" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktFooter4" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktFooter3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktFooter2" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktFooter1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader6" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader5" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader4" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader2" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktHeader1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jtxtTktFooter6" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLogo" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLogo" pref="91" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktHeader6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jtxtTktFooter6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter6">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader5">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader6">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter5">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktHeader1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtTktFooter1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLogo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/printer.ticket.logo.jpg"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLbllogoPath">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="99" green="99" red="99" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tktheader1" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblLogo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tktheader1" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,425 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import java.awt.Component;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class JPanelConfigCompany extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private final DirtyManager dirty = new DirtyManager();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public JPanelConfigCompany() {
|
||||
|
||||
initComponents();
|
||||
|
||||
jtxtTktHeader1.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktHeader2.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktHeader3.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktHeader4.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktHeader5.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktHeader6.getDocument().addDocumentListener(dirty);
|
||||
|
||||
jtxtTktFooter1.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktFooter2.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktFooter3.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktFooter4.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktFooter5.getDocument().addDocumentListener(dirty);
|
||||
jtxtTktFooter6.getDocument().addDocumentListener(dirty);
|
||||
|
||||
// JG - For future
|
||||
lblLogo.setVisible(false);
|
||||
jLbllogoPath.setVisible(false);
|
||||
webSwtch_Logo.setVisible(false);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
jtxtTktHeader1.setText(config.getProperty("tkt.header1"));
|
||||
jtxtTktHeader2.setText(config.getProperty("tkt.header2"));
|
||||
jtxtTktHeader3.setText(config.getProperty("tkt.header3"));
|
||||
jtxtTktHeader4.setText(config.getProperty("tkt.header4"));
|
||||
jtxtTktHeader5.setText(config.getProperty("tkt.header5"));
|
||||
jtxtTktHeader6.setText(config.getProperty("tkt.header6"));
|
||||
|
||||
jtxtTktFooter1.setText(config.getProperty("tkt.footer1"));
|
||||
jtxtTktFooter2.setText(config.getProperty("tkt.footer2"));
|
||||
jtxtTktFooter3.setText(config.getProperty("tkt.footer3"));
|
||||
jtxtTktFooter4.setText(config.getProperty("tkt.footer4"));
|
||||
jtxtTktFooter5.setText(config.getProperty("tkt.footer5"));
|
||||
jtxtTktFooter6.setText(config.getProperty("tkt.footer6"));
|
||||
|
||||
/** JG - here for future per terminal
|
||||
jLbllogoPath.setText(config.getProperty("tkt.logopath"));
|
||||
ImageIcon image = new ImageIcon(jLbllogoPath.getText());
|
||||
jLogo.setIcon(image);
|
||||
*/
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("tkt.header1", jtxtTktHeader1.getText());
|
||||
config.setProperty("tkt.header2", jtxtTktHeader2.getText());
|
||||
config.setProperty("tkt.header3", jtxtTktHeader3.getText());
|
||||
config.setProperty("tkt.header4", jtxtTktHeader4.getText());
|
||||
config.setProperty("tkt.header5", jtxtTktHeader5.getText());
|
||||
config.setProperty("tkt.header6", jtxtTktHeader6.getText());
|
||||
|
||||
config.setProperty("tkt.footer1", jtxtTktFooter1.getText());
|
||||
config.setProperty("tkt.footer2", jtxtTktFooter2.getText());
|
||||
config.setProperty("tkt.footer3", jtxtTktFooter3.getText());
|
||||
config.setProperty("tkt.footer4", jtxtTktFooter4.getText());
|
||||
config.setProperty("tkt.footer5", jtxtTktFooter5.getText());
|
||||
config.setProperty("tkt.footer6", jtxtTktFooter6.getText());
|
||||
|
||||
config.setProperty("tkt.logopath", jLbllogoPath.getText());
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
lblTktHeader1 = new javax.swing.JLabel();
|
||||
lblTktFooter1 = new javax.swing.JLabel();
|
||||
webSwtch_Logo = new com.alee.extended.button.WebSwitch();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jtxtTktHeader3 = new javax.swing.JTextField();
|
||||
jtxtTktFooter6 = new javax.swing.JTextField();
|
||||
jtxtTktHeader2 = new javax.swing.JTextField();
|
||||
jtxtTktHeader5 = new javax.swing.JTextField();
|
||||
jtxtTktHeader6 = new javax.swing.JTextField();
|
||||
jtxtTktFooter4 = new javax.swing.JTextField();
|
||||
jtxtTktHeader4 = new javax.swing.JTextField();
|
||||
jtxtTktFooter5 = new javax.swing.JTextField();
|
||||
jtxtTktHeader1 = new javax.swing.JTextField();
|
||||
jtxtTktFooter3 = new javax.swing.JTextField();
|
||||
jtxtTktFooter2 = new javax.swing.JTextField();
|
||||
jtxtTktFooter1 = new javax.swing.JTextField();
|
||||
jLogo = new javax.swing.JLabel();
|
||||
jLbllogoPath = new javax.swing.JLabel();
|
||||
lblLogo = new javax.swing.JLabel();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(700, 500));
|
||||
|
||||
lblTktHeader1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
lblTktHeader1.setText(AppLocal.getIntString("label.tktheader1")); // NOI18N
|
||||
lblTktHeader1.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
lblTktHeader1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
lblTktHeader1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
lblTktFooter1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
lblTktFooter1.setText(AppLocal.getIntString("label.tktfooter1")); // NOI18N
|
||||
lblTktFooter1.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
lblTktFooter1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
lblTktFooter1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
webSwtch_Logo.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
webSwtch_Logo.setPreferredSize(new java.awt.Dimension(80, 30));
|
||||
webSwtch_Logo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
webSwtch_LogoActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jtxtTktHeader3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader3.setBorder(null);
|
||||
jtxtTktHeader3.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader3.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader3.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter6.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter6.setBorder(null);
|
||||
jtxtTktFooter6.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter6.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter6.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktHeader2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader2.setBorder(null);
|
||||
jtxtTktHeader2.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader2.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader2.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktHeader5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader5.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader5.setBorder(null);
|
||||
jtxtTktHeader5.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader5.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader5.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktHeader6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader6.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader6.setBorder(null);
|
||||
jtxtTktHeader6.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader6.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader6.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter4.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter4.setBorder(null);
|
||||
jtxtTktFooter4.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter4.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter4.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktHeader4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader4.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader4.setBorder(null);
|
||||
jtxtTktHeader4.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader4.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader4.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter5.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter5.setBorder(null);
|
||||
jtxtTktFooter5.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter5.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter5.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktHeader1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktHeader1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktHeader1.setBorder(null);
|
||||
jtxtTktHeader1.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktHeader1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktHeader1.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter3.setBorder(null);
|
||||
jtxtTktFooter3.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter3.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter3.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter2.setBorder(null);
|
||||
jtxtTktFooter2.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter2.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter2.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jtxtTktFooter1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtTktFooter1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jtxtTktFooter1.setBorder(null);
|
||||
jtxtTktFooter1.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtTktFooter1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtTktFooter1.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jLogo.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jLogo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/printer.ticket.logo.jpg"))); // NOI18N
|
||||
jLogo.setToolTipText("");
|
||||
jLogo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jLogo.setOpaque(true);
|
||||
jLogo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(jtxtTktFooter5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktFooter4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktFooter3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktFooter2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktFooter1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktHeader1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jtxtTktFooter6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jLogo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 91, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jtxtTktHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktHeader2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktHeader3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktHeader4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktHeader5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktHeader6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jtxtTktFooter1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktFooter2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktFooter3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktFooter4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktFooter5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jtxtTktFooter6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
jLbllogoPath.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jLbllogoPath.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jLbllogoPath.setForeground(new java.awt.Color(153, 153, 153));
|
||||
jLbllogoPath.setText(AppLocal.getIntString("label.tktheader1")); // NOI18N
|
||||
jLbllogoPath.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLbllogoPath.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLbllogoPath.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
lblLogo.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
lblLogo.setText(AppLocal.getIntString("label.tktheader1")); // NOI18N
|
||||
lblLogo.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
lblLogo.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
lblLogo.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(lblTktFooter1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lblTktHeader1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(lblLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(webSwtch_Logo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(jLbllogoPath, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(214, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(39, 39, 39)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(lblLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(webSwtch_Logo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(55, 55, 55)
|
||||
.addComponent(lblTktHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(163, 163, 163)
|
||||
.addComponent(lblTktFooter1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(70, 70, 70)
|
||||
.addComponent(jLbllogoPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void webSwtch_LogoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_webSwtch_LogoActionPerformed
|
||||
// JG - For future
|
||||
if (webSwtch_Logo.isSelected()) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_webSwtch_LogoActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLbllogoPath;
|
||||
private javax.swing.JLabel jLogo;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JTextField jtxtTktFooter1;
|
||||
private javax.swing.JTextField jtxtTktFooter2;
|
||||
private javax.swing.JTextField jtxtTktFooter3;
|
||||
private javax.swing.JTextField jtxtTktFooter4;
|
||||
private javax.swing.JTextField jtxtTktFooter5;
|
||||
private javax.swing.JTextField jtxtTktFooter6;
|
||||
private javax.swing.JTextField jtxtTktHeader1;
|
||||
private javax.swing.JTextField jtxtTktHeader2;
|
||||
private javax.swing.JTextField jtxtTktHeader3;
|
||||
private javax.swing.JTextField jtxtTktHeader4;
|
||||
private javax.swing.JTextField jtxtTktHeader5;
|
||||
private javax.swing.JTextField jtxtTktHeader6;
|
||||
private javax.swing.JLabel lblLogo;
|
||||
private javax.swing.JLabel lblTktFooter1;
|
||||
private javax.swing.JLabel lblTktHeader1;
|
||||
private com.alee.extended.button.WebSwitch webSwtch_Logo;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[700, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jlabelUrl" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelId" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelProperties" 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="jtxtUrl" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtId" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextField1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextField2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtPassword" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jtxtUrl" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jtxtId" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jTextField1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jTextField2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jtxtPassword" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jlabelUrl" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelId" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelName" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelProperties" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextField" name="jtxtUrl">
|
||||
<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="[350, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtId">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField1">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField2">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtName">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="jtxtPassword">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jlabelUrl">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erpurl" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelId">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erpid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erporg" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erppos" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erpuser" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelProperties">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="erp_messages.properties" key="label.erppassword" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,247 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.AltEncrypter;
|
||||
import java.awt.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPanelConfigERP extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private DirtyManager dirty = new DirtyManager();
|
||||
|
||||
/** Creates new form JPanelConfigERP */
|
||||
public JPanelConfigERP() {
|
||||
initComponents();
|
||||
|
||||
jTextField1.getDocument().addDocumentListener(dirty);
|
||||
jTextField2.getDocument().addDocumentListener(dirty);
|
||||
jtxtId.getDocument().addDocumentListener(dirty);
|
||||
jtxtName.getDocument().addDocumentListener(dirty);
|
||||
jtxtPassword.getDocument().addDocumentListener(dirty);
|
||||
jtxtUrl.getDocument().addDocumentListener(dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
jtxtUrl.setText(config.getProperty("erp.URL"));
|
||||
jtxtId.setText(config.getProperty("erp.id"));
|
||||
jTextField2.setText(config.getProperty("erp.pos"));
|
||||
jTextField1.setText(config.getProperty("erp.org"));
|
||||
|
||||
String sERPUser = config.getProperty("erp.user");
|
||||
String sERPPassword = config.getProperty("erp.password");
|
||||
if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
|
||||
// La clave esta encriptada.
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
|
||||
sERPPassword = cypher.decrypt(sERPPassword.substring(6));
|
||||
}
|
||||
jtxtName.setText(sERPUser);
|
||||
jtxtPassword.setText(sERPPassword);
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("erp.URL", jtxtUrl.getText());
|
||||
config.setProperty("erp.id", jtxtId.getText());
|
||||
config.setProperty("erp.pos", jTextField2.getText());
|
||||
config.setProperty("erp.org", jTextField1.getText());
|
||||
|
||||
config.setProperty("erp.user", jtxtName.getText());
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + jtxtName.getText());
|
||||
config.setProperty("erp.password", "crypt:" + cypher.encrypt(new String(jtxtPassword.getPassword())));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jtxtUrl = new javax.swing.JTextField();
|
||||
jtxtId = new javax.swing.JTextField();
|
||||
jTextField1 = new javax.swing.JTextField();
|
||||
jTextField2 = new javax.swing.JTextField();
|
||||
jtxtName = new javax.swing.JTextField();
|
||||
jtxtPassword = new javax.swing.JPasswordField();
|
||||
jlabelUrl = new javax.swing.JLabel();
|
||||
jLabelId = new javax.swing.JLabel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabelName = new javax.swing.JLabel();
|
||||
jLabelProperties = new javax.swing.JLabel();
|
||||
|
||||
setBackground(new java.awt.Color(255, 255, 255));
|
||||
setPreferredSize(new java.awt.Dimension(700, 500));
|
||||
|
||||
jtxtUrl.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtUrl.setPreferredSize(new java.awt.Dimension(350, 30));
|
||||
|
||||
jtxtId.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtId.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jTextField1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTextField1.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jTextField2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTextField2.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jtxtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtName.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jtxtPassword.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtPassword.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jlabelUrl.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jlabelUrl.setText(AppLocal.getIntString("label.erpurl")); // NOI18N
|
||||
jlabelUrl.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabelId.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelId.setText(AppLocal.getIntString("label.erpid")); // NOI18N
|
||||
jLabelId.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.erporg")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.erppos")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabelName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelName.setText(AppLocal.getIntString("label.erpuser")); // NOI18N
|
||||
jLabelName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabelProperties.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelProperties.setText(AppLocal.getIntString("label.erppassword")); // NOI18N
|
||||
jLabelProperties.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jlabelUrl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelProperties, 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.LEADING)
|
||||
.addComponent(jtxtUrl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(jtxtUrl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jtxtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jtxtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(jlabelUrl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabelId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabelName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabelProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabelId;
|
||||
private javax.swing.JLabel jLabelName;
|
||||
private javax.swing.JLabel jLabelProperties;
|
||||
private javax.swing.JTextField jTextField1;
|
||||
private javax.swing.JTextField jTextField2;
|
||||
private javax.swing.JLabel jlabelUrl;
|
||||
private javax.swing.JTextField jtxtId;
|
||||
private javax.swing.JTextField jtxtName;
|
||||
private javax.swing.JPasswordField jtxtPassword;
|
||||
private javax.swing.JTextField jtxtUrl;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,655 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[800, 450]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jPanel11" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel11" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel11">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[750, 450]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JPanelConfigGeneral_jPanel1"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jtxtMachineHostname" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jtxtMachineDepartment" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="webLabel1" min="-2" pref="132" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblIP_Address" min="-2" pref="271" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboLAF" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboMachineScreenmode" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel18" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupLogo" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel19" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblURL" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jchkHideInfo" min="-2" pref="287" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupText" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupHTML" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jbtnLogo" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jbtnText" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jbtnTextClear" min="-2" pref="40" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jbtnHTML" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jbtnClearHTML" min="-2" pref="40" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboTicketsBag" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtMachineHostname" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="webLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lblIP_Address" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtMachineDepartment" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboLAF" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboMachineScreenmode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboTicketsBag" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel18" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupLogo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnLogo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel19" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupText" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnText" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnTextClear" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblURL" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtStartupHTML" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnHTML" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnClearHTML" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jchkHideInfo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.MachineName" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.looknfeel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.MachineScreen" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.Ticketsbag" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtMachineHostname">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.terminal" replaceFormat="AppLocal.getIntString("tooltip.config.general.terminal")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboLAF">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.skin" replaceFormat="AppLocal.getIntString("tooltip.config.general.skin")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcboLAFActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JPanelConfigGeneral_jcboLAF"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboMachineScreenmode">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.screen" replaceFormat="AppLocal.getIntString("tooltip.config.general.screen")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboTicketsBag">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.tickets" replaceFormat="AppLocal.getIntString("tooltip.config.general.tickets")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkHideInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.Infopanel" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.footer" replaceFormat="AppLocal.getIntString("tooltip.config.general.footer")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="4"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel18">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.startuplogo" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtStartupLogo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.logo" replaceFormat="AppLocal.getIntString("tooltip.config.general.logo")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel19">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.startuptext" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtStartupText">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.footer" replaceFormat="AppLocal.getIntString("tooltip.config.general.text")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtStartupTextFocusGained"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jtxtStartupTextActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnLogo">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/fileopen.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value=" "/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.logo" replaceFormat="AppLocal.getIntString("tooltip.config.general.logo")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnLogoActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JPanelConfigGeneral_jbtnLogoName"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnText">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/fileopen.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value=" "/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.text" replaceFormat="AppLocal.getIntString("tooltip.config.general.text")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnTextActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnTextClear">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="1"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="99" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="X"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnTextClearActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.MachineDepartment" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtMachineDepartment">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.dept" replaceFormat="AppLocal.getIntString("tooltip.config.general.dept")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.laf.label.WebLabel" name="lblIP_Address">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.compip" replaceFormat="AppLocal.getIntString("tooltip.config.general.compip")"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[230, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.laf.label.WebLabel" name="webLabel1">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.nameIP" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</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="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblURL">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/pay.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.URL" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.URL" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLblURLMouseClicked"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtStartupHTML">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.URL" replaceFormat="AppLocal.getIntString("tooltip.config.general.text")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtStartupHTMLFocusGained"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jtxtStartupHTMLActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnHTML">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/fileopen.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value=" "/>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.config.general.html" replaceFormat="AppLocal.getIntString("tooltip.config.general.text")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[64, 32]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnHTMLActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnClearHTML">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="1"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="99" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="X"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnClearHTMLActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,668 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.FlatLightLaf;
|
||||
import com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightContrastIJTheme;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.FileChooserEvent;
|
||||
import com.unicenta.pos.util.FlatLookAndFeel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
|
||||
import org.pushingpixels.substance.api.SubstanceSkin;
|
||||
import org.pushingpixels.substance.api.skin.SkinInfo;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.UIManager.LookAndFeelInfo;
|
||||
import java.awt.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class JPanelConfigGeneral extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private final DirtyManager dirty = new DirtyManager();
|
||||
|
||||
/**
|
||||
* Creates new form JPanelConfigGeneral
|
||||
*/
|
||||
public JPanelConfigGeneral() {
|
||||
|
||||
initComponents();
|
||||
|
||||
InetAddress IP = null;
|
||||
try {
|
||||
IP = InetAddress.getLocalHost();
|
||||
} catch (UnknownHostException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
|
||||
jtxtMachineHostname.getDocument().addDocumentListener(dirty);
|
||||
jtxtMachineDepartment.getDocument().addDocumentListener(dirty);
|
||||
lblIP_Address.setText(IP.toString());
|
||||
jcboLAF.addActionListener(dirty);
|
||||
jcboMachineScreenmode.addActionListener(dirty);
|
||||
jcboTicketsBag.addActionListener(dirty);
|
||||
jchkHideInfo.addActionListener(dirty);
|
||||
jtxtStartupText.getDocument().addDocumentListener(dirty);
|
||||
jbtnText.addActionListener(new FileChooserEvent(jtxtStartupText));
|
||||
jtxtStartupLogo.getDocument().addDocumentListener(dirty);
|
||||
jbtnLogo.addActionListener(new FileChooserEvent(jtxtStartupLogo));
|
||||
jtxtStartupHTML.getDocument().addDocumentListener(dirty);
|
||||
jbtnHTML.addActionListener(new FileChooserEvent(jtxtStartupHTML));
|
||||
|
||||
FlatLookAndFeel.getLafs().forEach((key, value) ->
|
||||
jcboLAF.addItem(new LAFInfo(key, value))
|
||||
);
|
||||
|
||||
jcboLAF.addActionListener((java.awt.event.ActionEvent evt) -> {
|
||||
changeLAF();
|
||||
});
|
||||
|
||||
jcboMachineScreenmode.addItem("window");
|
||||
jcboMachineScreenmode.addItem("fullscreen");
|
||||
|
||||
jcboTicketsBag.addItem("simple");
|
||||
jcboTicketsBag.addItem("standard");
|
||||
jcboTicketsBag.addItem("restaurant");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
jtxtMachineHostname.setText(config.getProperty("machine.hostname"));
|
||||
jtxtMachineDepartment.setText(config.getProperty("machine.department"));
|
||||
|
||||
String lafclass = config.getProperty("swing.defaultlaf");
|
||||
jcboLAF.setSelectedItem(null);
|
||||
for (int i = 0; i < jcboLAF.getItemCount(); i++) {
|
||||
LAFInfo lafinfo = (LAFInfo) jcboLAF.getItemAt(i);
|
||||
if (lafinfo.getClassName().equals(lafclass)) {
|
||||
jcboLAF.setSelectedIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
jcboMachineScreenmode.setSelectedItem(config.getProperty("machine.screenmode"));
|
||||
jcboTicketsBag.setSelectedItem(config.getProperty("machine.ticketsbag"));
|
||||
jchkHideInfo.setSelected(Boolean.parseBoolean(config.getProperty("till.hideinfo")));
|
||||
jtxtStartupLogo.setText(config.getProperty("start.logo"));
|
||||
jtxtStartupText.setText(config.getProperty("start.text"));
|
||||
jtxtStartupLogo.setText(config.getProperty("start.logo"));
|
||||
jtxtStartupHTML.setText(config.getProperty("start.html"));
|
||||
|
||||
String txtPIN = (config.getProperty("override.pin"));
|
||||
if (txtPIN == null) {
|
||||
config.setProperty("override.check", "true");
|
||||
config.setProperty("override.pin", "1234");
|
||||
}
|
||||
|
||||
// jtxtStartupMedia.setText(config.getProperty("start.media")); // Coming later!!
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("machine.hostname", jtxtMachineHostname.getText());
|
||||
config.setProperty("machine.department", jtxtMachineDepartment.getText());
|
||||
|
||||
LAFInfo laf = (LAFInfo) jcboLAF.getSelectedItem();
|
||||
config.setProperty("swing.defaultlaf", laf == null
|
||||
? System.getProperty("swing.defaultlaf", "javax.swing.plaf.metal.MetalLookAndFeel")
|
||||
: laf.getClassName());
|
||||
|
||||
config.setProperty("machine.screenmode", comboValue(jcboMachineScreenmode.getSelectedItem()));
|
||||
config.setProperty("machine.ticketsbag", comboValue(jcboTicketsBag.getSelectedItem()));
|
||||
config.setProperty("till.hideinfo", Boolean.toString(jchkHideInfo.isSelected()));
|
||||
config.setProperty("start.logo", jtxtStartupLogo.getText());
|
||||
config.setProperty("start.text", jtxtStartupText.getText());
|
||||
config.setProperty("start.html", jtxtStartupHTML.getText());
|
||||
|
||||
// config.setProperty("start.media", jtxtStartupMedia.getText()); // Coming later!
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
private String comboValue(Object value) {
|
||||
return value == null ? "" : value.toString();
|
||||
}
|
||||
|
||||
private void changeLAF() {
|
||||
|
||||
final LAFInfo laf = (LAFInfo) jcboLAF.getSelectedItem();
|
||||
if (laf != null && !laf.getClassName().equals(UIManager.getLookAndFeel().getClass().getName())) {
|
||||
// The selected look and feel is different from the current look and feel.
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
try {
|
||||
String lafname = laf.getClassName();
|
||||
Object laf1 = Class.forName(lafname).newInstance();
|
||||
if (laf1 instanceof LookAndFeel) {
|
||||
UIManager.setLookAndFeel((LookAndFeel) laf1);
|
||||
} else if (laf1 instanceof SubstanceSkin) {
|
||||
SubstanceLookAndFeel.setSkin((SubstanceSkin) laf1);
|
||||
}
|
||||
SwingUtilities.updateComponentTreeUI(JPanelConfigGeneral.this.getTopLevelAncestor());
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static class LAFInfo {
|
||||
|
||||
private final String name;
|
||||
private final String classname;
|
||||
|
||||
public LAFInfo(String name, String classname) {
|
||||
this.name = name;
|
||||
this.classname = classname;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return classname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel11 = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jtxtMachineHostname = new javax.swing.JTextField();
|
||||
jcboLAF = new javax.swing.JComboBox();
|
||||
jcboMachineScreenmode = new javax.swing.JComboBox();
|
||||
jcboTicketsBag = new javax.swing.JComboBox();
|
||||
jchkHideInfo = new javax.swing.JCheckBox();
|
||||
jLabel18 = new javax.swing.JLabel();
|
||||
jtxtStartupLogo = new javax.swing.JTextField();
|
||||
jLabel19 = new javax.swing.JLabel();
|
||||
jtxtStartupText = new javax.swing.JTextField();
|
||||
jbtnLogo = new javax.swing.JButton();
|
||||
jbtnText = new javax.swing.JButton();
|
||||
jbtnTextClear = new javax.swing.JButton();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jtxtMachineDepartment = new javax.swing.JTextField();
|
||||
lblIP_Address = new com.alee.laf.label.WebLabel();
|
||||
webLabel1 = new com.alee.laf.label.WebLabel();
|
||||
jLblURL = new javax.swing.JLabel();
|
||||
jtxtStartupHTML = new javax.swing.JTextField();
|
||||
jbtnHTML = new javax.swing.JButton();
|
||||
jbtnClearHTML = new javax.swing.JButton();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(800, 450));
|
||||
|
||||
jPanel11.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jPanel11.setOpaque(false);
|
||||
jPanel11.setPreferredSize(new java.awt.Dimension(750, 450));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.MachineName")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.looknfeel")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(AppLocal.getIntString("label.MachineScreen")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel4.setText(AppLocal.getIntString("label.Ticketsbag")); // NOI18N
|
||||
jLabel4.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jtxtMachineHostname.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtMachineHostname.setToolTipText(AppLocal.getIntString("tooltip.config.general.terminal")); // NOI18N
|
||||
jtxtMachineHostname.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jtxtMachineHostname.setMinimumSize(new java.awt.Dimension(130, 25));
|
||||
jtxtMachineHostname.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jcboLAF.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboLAF.setToolTipText(AppLocal.getIntString("tooltip.config.general.skin")); // NOI18N
|
||||
jcboLAF.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jcboLAF.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jcboLAF.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcboLAFActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jcboMachineScreenmode.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboMachineScreenmode.setToolTipText(AppLocal.getIntString("tooltip.config.general.screen")); // NOI18N
|
||||
jcboMachineScreenmode.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jcboMachineScreenmode.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jcboTicketsBag.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboTicketsBag.setToolTipText(AppLocal.getIntString("tooltip.config.general.tickets")); // NOI18N
|
||||
jcboTicketsBag.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jcboTicketsBag.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jchkHideInfo.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkHideInfo.setSelected(true);
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jchkHideInfo.setText(bundle.getString("label.Infopanel")); // NOI18N
|
||||
jchkHideInfo.setToolTipText(AppLocal.getIntString("tooltip.config.general.footer")); // NOI18N
|
||||
jchkHideInfo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
jchkHideInfo.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
|
||||
jchkHideInfo.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkHideInfo.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkHideInfo.setOpaque(false);
|
||||
jchkHideInfo.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel18.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel18.setText(bundle.getString("label.startuplogo")); // NOI18N
|
||||
jLabel18.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabel18.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabel18.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jtxtStartupLogo.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtStartupLogo.setToolTipText(AppLocal.getIntString("tooltip.config.general.logo")); // NOI18N
|
||||
jtxtStartupLogo.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtStartupLogo.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtStartupLogo.setPreferredSize(new java.awt.Dimension(400, 30));
|
||||
|
||||
jLabel19.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel19.setText(AppLocal.getIntString("label.startuptext")); // NOI18N
|
||||
jLabel19.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabel19.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabel19.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jtxtStartupText.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtStartupText.setToolTipText(AppLocal.getIntString("tooltip.config.general.text")); // NOI18N
|
||||
jtxtStartupText.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtStartupText.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtStartupText.setPreferredSize(new java.awt.Dimension(400, 30));
|
||||
jtxtStartupText.addFocusListener(new java.awt.event.FocusAdapter() {
|
||||
public void focusGained(java.awt.event.FocusEvent evt) {
|
||||
jtxtStartupTextFocusGained(evt);
|
||||
}
|
||||
});
|
||||
jtxtStartupText.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jtxtStartupTextActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/fileopen.png"))); // NOI18N
|
||||
jbtnLogo.setText(" ");
|
||||
jbtnLogo.setToolTipText(AppLocal.getIntString("tooltip.config.general.logo")); // NOI18N
|
||||
jbtnLogo.setMaximumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnLogo.setMinimumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnLogo.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
jbtnLogo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnLogoActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnText.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/fileopen.png"))); // NOI18N
|
||||
jbtnText.setText(" ");
|
||||
jbtnText.setToolTipText(AppLocal.getIntString("tooltip.config.general.text")); // NOI18N
|
||||
jbtnText.setMaximumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnText.setMinimumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnText.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
jbtnText.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnTextActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnTextClear.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
|
||||
jbtnTextClear.setForeground(new java.awt.Color(255, 0, 153));
|
||||
jbtnTextClear.setText("X");
|
||||
jbtnTextClear.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnTextClearActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel6.setText(AppLocal.getIntString("label.MachineDepartment")); // NOI18N
|
||||
jLabel6.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jtxtMachineDepartment.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtMachineDepartment.setToolTipText(AppLocal.getIntString("tooltip.config.general.dept")); // NOI18N
|
||||
jtxtMachineDepartment.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jtxtMachineDepartment.setMinimumSize(new java.awt.Dimension(130, 25));
|
||||
jtxtMachineDepartment.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
lblIP_Address.setBackground(new java.awt.Color(240, 240, 240));
|
||||
lblIP_Address.setBorder(null);
|
||||
lblIP_Address.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblIP_Address.setToolTipText(AppLocal.getIntString("tooltip.config.general.compip")); // NOI18N
|
||||
lblIP_Address.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
lblIP_Address.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
lblIP_Address.setPreferredSize(new java.awt.Dimension(230, 30));
|
||||
|
||||
webLabel1.setBackground(new java.awt.Color(240, 240, 240));
|
||||
webLabel1.setBorder(null);
|
||||
webLabel1.setText(bundle.getString("label.nameIP")); // NOI18N
|
||||
webLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
webLabel1.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jLblURL.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblURL.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/pay.png"))); // NOI18N
|
||||
jLblURL.setText(AppLocal.getIntString("label.URL")); // NOI18N
|
||||
jLblURL.setToolTipText(bundle.getString("tooltip.config.general.URL")); // NOI18N
|
||||
jLblURL.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
jLblURL.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLblURL.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLblURL.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
jLblURL.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jLblURLMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jtxtStartupHTML.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtStartupHTML.setToolTipText(AppLocal.getIntString("tooltip.config.general.text")); // NOI18N
|
||||
jtxtStartupHTML.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtStartupHTML.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtStartupHTML.setPreferredSize(new java.awt.Dimension(400, 30));
|
||||
jtxtStartupHTML.addFocusListener(new java.awt.event.FocusAdapter() {
|
||||
public void focusGained(java.awt.event.FocusEvent evt) {
|
||||
jtxtStartupHTMLFocusGained(evt);
|
||||
}
|
||||
});
|
||||
jtxtStartupHTML.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jtxtStartupHTMLActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnHTML.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/fileopen.png"))); // NOI18N
|
||||
jbtnHTML.setText(" ");
|
||||
jbtnHTML.setToolTipText(AppLocal.getIntString("tooltip.config.general.text")); // NOI18N
|
||||
jbtnHTML.setMaximumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnHTML.setMinimumSize(new java.awt.Dimension(64, 32));
|
||||
jbtnHTML.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
jbtnHTML.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnHTMLActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnClearHTML.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
|
||||
jbtnClearHTML.setForeground(new java.awt.Color(255, 0, 153));
|
||||
jbtnClearHTML.setText("X");
|
||||
jbtnClearHTML.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnClearHTMLActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
|
||||
jPanel11.setLayout(jPanel11Layout);
|
||||
jPanel11Layout.setHorizontalGroup(
|
||||
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jtxtMachineHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jtxtMachineDepartment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(webLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblIP_Address, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboLAF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboMachineScreenmode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jtxtStartupLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel11Layout.createSequentialGroup()
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblURL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jchkHideInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtStartupText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtStartupHTML, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jbtnLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jbtnText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jbtnTextClear, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jbtnHTML, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jbtnClearHTML, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboTicketsBag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel11Layout.setVerticalGroup(
|
||||
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtMachineHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(webLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(lblIP_Address, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtMachineDepartment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboLAF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboMachineScreenmode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboTicketsBag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(48, 48, 48)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtStartupLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtStartupText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnTextClear))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblURL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jtxtStartupHTML, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnHTML, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnClearHTML))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jchkHideInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
);
|
||||
|
||||
getAccessibleContext().setAccessibleName("");
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jcboLAFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcboLAFActionPerformed
|
||||
|
||||
}//GEN-LAST:event_jcboLAFActionPerformed
|
||||
|
||||
private void jtxtStartupTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtxtStartupTextActionPerformed
|
||||
|
||||
}//GEN-LAST:event_jtxtStartupTextActionPerformed
|
||||
|
||||
private void jtxtStartupTextFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtStartupTextFocusGained
|
||||
// JG 31 August 2103 GNU GPL License Warning
|
||||
|
||||
// transferFocus();
|
||||
|
||||
// JOptionPane.showMessageDialog(jPanel1,"<html>Changing default Startup Text content may violate the <br>"
|
||||
// + " Free Software Foundation's GNU General Public License GPL","GNU GPL Warning",JOptionPane.WARNING_MESSAGE);
|
||||
|
||||
}//GEN-LAST:event_jtxtStartupTextFocusGained
|
||||
|
||||
private void jbtnTextClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnTextClearActionPerformed
|
||||
jtxtStartupText.setText("");
|
||||
}//GEN-LAST:event_jbtnTextClearActionPerformed
|
||||
|
||||
private void jtxtStartupHTMLFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtStartupHTMLFocusGained
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jtxtStartupHTMLFocusGained
|
||||
|
||||
private void jtxtStartupHTMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtxtStartupHTMLActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jtxtStartupHTMLActionPerformed
|
||||
|
||||
private void jbtnClearHTMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnClearHTMLActionPerformed
|
||||
jtxtStartupHTML.setText("");
|
||||
}//GEN-LAST:event_jbtnClearHTMLActionPerformed
|
||||
|
||||
private void jbtnHTMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnHTMLActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jbtnHTMLActionPerformed
|
||||
|
||||
private void jbtnLogoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnLogoActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jbtnLogoActionPerformed
|
||||
|
||||
private void jLblURLMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLblURLMouseClicked
|
||||
JOptionPane.showMessageDialog(this,
|
||||
AppLocal.getIntString("message.URL"),
|
||||
"URL",
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}//GEN-LAST:event_jLblURLMouseClicked
|
||||
|
||||
private void jbtnTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnTextActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jbtnTextActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel18;
|
||||
private javax.swing.JLabel jLabel19;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLblURL;
|
||||
private javax.swing.JPanel jPanel11;
|
||||
private javax.swing.JButton jbtnClearHTML;
|
||||
private javax.swing.JButton jbtnHTML;
|
||||
private javax.swing.JButton jbtnLogo;
|
||||
private javax.swing.JButton jbtnText;
|
||||
private javax.swing.JButton jbtnTextClear;
|
||||
private javax.swing.JComboBox jcboLAF;
|
||||
private javax.swing.JComboBox jcboMachineScreenmode;
|
||||
private javax.swing.JComboBox jcboTicketsBag;
|
||||
private javax.swing.JCheckBox jchkHideInfo;
|
||||
private javax.swing.JTextField jtxtMachineDepartment;
|
||||
private javax.swing.JTextField jtxtMachineHostname;
|
||||
private javax.swing.JTextField jtxtStartupHTML;
|
||||
private javax.swing.JTextField jtxtStartupLogo;
|
||||
private javax.swing.JTextField jtxtStartupText;
|
||||
private com.alee.laf.label.WebLabel lblIP_Address;
|
||||
private com.alee.laf.label.WebLabel webLabel1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[650, 450]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="200" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="148" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboDatetime" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboTime" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboDate" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboPercent" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboCurrency" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboDouble" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboInteger" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jcboLocale" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="51" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jcboLocale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboInteger" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboDouble" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboCurrency" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboPercent" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboDate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboTime" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboDatetime" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="100" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.locale" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboLocale">
|
||||
<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="jLabel1">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.integer" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboInteger">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.double" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboDouble">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel3">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.currency" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboCurrency">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel4">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.percent" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboPercent">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel6">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.date" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboDate">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel7">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.time" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboTime">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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="jLabel8">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.datetime" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboDatetime">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="true"/>
|
||||
<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>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,425 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import java.awt.Component;
|
||||
import java.util.Locale;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPanelConfigLocale extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private final DirtyManager dirty = new DirtyManager();
|
||||
|
||||
private final static String DEFAULT_VALUE = "(Default)";
|
||||
|
||||
/** Creates new form JPanelConfigLocale */
|
||||
public JPanelConfigLocale() {
|
||||
|
||||
initComponents();
|
||||
|
||||
jcboLocale.addActionListener(dirty);
|
||||
jcboInteger.addActionListener(dirty);
|
||||
jcboDouble.addActionListener(dirty);
|
||||
jcboCurrency.addActionListener(dirty);
|
||||
jcboPercent.addActionListener(dirty);
|
||||
jcboDate.addActionListener(dirty);
|
||||
jcboTime.addActionListener(dirty);
|
||||
jcboDatetime.addActionListener(dirty);
|
||||
|
||||
List<Locale> availablelocales = new ArrayList<>();
|
||||
availablelocales.addAll(Arrays.asList(Locale.getAvailableLocales())); // Available java locales
|
||||
// addLocale(availablelocales, new Locale("en", "GB", "")); // English GB
|
||||
// addLocale(availablelocales, new Locale("en", "US", "")); // English USA
|
||||
|
||||
Collections.sort(availablelocales, new LocaleComparator());
|
||||
|
||||
jcboLocale.addItem(new LocaleInfo (null));
|
||||
for (Locale l : availablelocales) {
|
||||
jcboLocale.addItem(new LocaleInfo(l));
|
||||
}
|
||||
|
||||
jcboInteger.addItem(DEFAULT_VALUE);
|
||||
jcboInteger.addItem("#0");
|
||||
jcboInteger.addItem("#,##0");
|
||||
|
||||
jcboDouble.addItem(DEFAULT_VALUE);
|
||||
jcboDouble.addItem("#0.0");
|
||||
jcboDouble.addItem("#,##0.#");
|
||||
|
||||
jcboCurrency.addItem(DEFAULT_VALUE);
|
||||
jcboCurrency.addItem("\u00A4 #0.00");
|
||||
jcboCurrency.addItem("'$' #,##0.00");
|
||||
|
||||
jcboPercent.addItem(DEFAULT_VALUE);
|
||||
jcboPercent.addItem("#,##0.##%");
|
||||
|
||||
jcboDate.addItem(DEFAULT_VALUE);
|
||||
|
||||
jcboTime.addItem(DEFAULT_VALUE);
|
||||
|
||||
jcboDatetime.addItem(DEFAULT_VALUE);
|
||||
|
||||
}
|
||||
|
||||
private void addLocale(List<Locale> ll, Locale l) {
|
||||
if (!ll.contains(l)) {
|
||||
ll.add(l);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
String slang = config.getProperty("user.language");
|
||||
String scountry = config.getProperty("user.country");
|
||||
String svariant = config.getProperty("user.variant");
|
||||
|
||||
if (slang != null && !slang.equals("") && scountry != null && svariant != null) {
|
||||
Locale currentlocale = new Locale(slang, scountry, svariant);
|
||||
for (int i = 0 ; i < jcboLocale.getItemCount(); i++) {
|
||||
LocaleInfo l = (LocaleInfo) jcboLocale.getItemAt(i);
|
||||
if (currentlocale.equals(l.getLocale())) {
|
||||
jcboLocale.setSelectedIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
jcboLocale.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
jcboInteger.setSelectedItem(writeWithDefault(config.getProperty("format.integer")));
|
||||
jcboDouble.setSelectedItem(writeWithDefault(config.getProperty("format.double")));
|
||||
jcboCurrency.setSelectedItem(writeWithDefault(config.getProperty("format.currency")));
|
||||
jcboPercent.setSelectedItem(writeWithDefault(config.getProperty("format.percent")));
|
||||
jcboDate.setSelectedItem(writeWithDefault(config.getProperty("format.date")));
|
||||
jcboTime.setSelectedItem(writeWithDefault(config.getProperty("format.time")));
|
||||
jcboDatetime.setSelectedItem(writeWithDefault(config.getProperty("format.datetime")));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
Locale l = ((LocaleInfo) jcboLocale.getSelectedItem()).getLocale();
|
||||
if (l == null) {
|
||||
config.setProperty("user.language", "");
|
||||
config.setProperty("user.country", "");
|
||||
config.setProperty("user.variant", "");
|
||||
} else {
|
||||
config.setProperty("user.language", l.getLanguage());
|
||||
config.setProperty("user.country", l.getCountry());
|
||||
config.setProperty("user.variant", l.getVariant());
|
||||
}
|
||||
|
||||
config.setProperty("format.integer", readWithDefault(jcboInteger.getSelectedItem()));
|
||||
config.setProperty("format.double", readWithDefault(jcboDouble.getSelectedItem()));
|
||||
config.setProperty("format.currency", readWithDefault(jcboCurrency.getSelectedItem()));
|
||||
config.setProperty("format.percent", readWithDefault(jcboPercent.getSelectedItem()));
|
||||
config.setProperty("format.date", readWithDefault(jcboDate.getSelectedItem()));
|
||||
config.setProperty("format.time", readWithDefault(jcboTime.getSelectedItem()));
|
||||
config.setProperty("format.datetime", readWithDefault(jcboDatetime.getSelectedItem()));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
private String readWithDefault(Object value) {
|
||||
if (DEFAULT_VALUE.equals(value)) {
|
||||
return "";
|
||||
} else {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
private Object writeWithDefault(String value) {
|
||||
if (value == null || value.equals("") || value.equals(DEFAULT_VALUE)) {
|
||||
return DEFAULT_VALUE;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
private static class LocaleInfo {
|
||||
private final Locale locale;
|
||||
|
||||
public LocaleInfo(Locale locale) {
|
||||
this.locale = locale;
|
||||
}
|
||||
public Locale getLocale() {
|
||||
return locale;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return locale == null
|
||||
? "(System default)"
|
||||
: locale.getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
jcboLocale = new javax.swing.JComboBox();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jcboInteger = new javax.swing.JComboBox();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jcboDouble = new javax.swing.JComboBox();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jcboCurrency = new javax.swing.JComboBox();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jcboPercent = new javax.swing.JComboBox();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jcboDate = new javax.swing.JComboBox();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jcboTime = new javax.swing.JComboBox();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
jcboDatetime = new javax.swing.JComboBox();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(650, 450));
|
||||
|
||||
jPanel1.setOpaque(false);
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(600, 400));
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel5.setText(AppLocal.getIntString("label.locale")); // NOI18N
|
||||
jLabel5.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboLocale.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboLocale.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.integer")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboInteger.setEditable(true);
|
||||
jcboInteger.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboInteger.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.double")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboDouble.setEditable(true);
|
||||
jcboDouble.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboDouble.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(AppLocal.getIntString("label.currency")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboCurrency.setEditable(true);
|
||||
jcboCurrency.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboCurrency.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel4.setText(AppLocal.getIntString("label.percent")); // NOI18N
|
||||
jLabel4.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboPercent.setEditable(true);
|
||||
jcboPercent.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboPercent.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel6.setText(AppLocal.getIntString("label.date")); // NOI18N
|
||||
jLabel6.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboDate.setEditable(true);
|
||||
jcboDate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboDate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel7.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel7.setText(AppLocal.getIntString("label.time")); // NOI18N
|
||||
jLabel7.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboTime.setEditable(true);
|
||||
jcboTime.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboTime.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel8.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel8.setText(AppLocal.getIntString("label.datetime")); // NOI18N
|
||||
jLabel8.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboDatetime.setEditable(true);
|
||||
jcboDatetime.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboDatetime.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboDatetime, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboTime, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboDate, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboPercent, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboCurrency, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboDouble, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboInteger, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jcboLocale, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(51, 51, 51))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jcboLocale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboInteger, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboDouble, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboCurrency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboPercent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboDatetime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(100, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(200, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(2, 2, 2)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(148, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JComboBox jcboCurrency;
|
||||
private javax.swing.JComboBox jcboDate;
|
||||
private javax.swing.JComboBox jcboDatetime;
|
||||
private javax.swing.JComboBox jcboDouble;
|
||||
private javax.swing.JComboBox jcboInteger;
|
||||
private javax.swing.JComboBox jcboLocale;
|
||||
private javax.swing.JComboBox jcboPercent;
|
||||
private javax.swing.JComboBox jcboTime;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[590, 450]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="149" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jLabel11" max="32767" attributes="0"/>
|
||||
<Component id="jLabel13" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jcboCardReader" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboPaymentGateway" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="109" max="-2" attributes="0"/>
|
||||
<Component id="emvConfigPanel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="127" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboPaymentGateway" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jcboCardReader" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="64" max="-2" attributes="0"/>
|
||||
<Component id="emvConfigPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="152" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel13">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.paymentgateway" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboPaymentGateway">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcboPaymentGatewayActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel11">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.cardreader" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jcboCardReader">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="emvConfigPanel">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="securityKeyLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceIdLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="urlLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="urlValue" max="32767" attributes="0"/>
|
||||
<Component id="deviceIdValue" max="32767" attributes="0"/>
|
||||
<Component id="securityKeyValue" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="125" max="32767" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="114" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="12" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="urlValue" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="urlLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="deviceIdValue" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceIdLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="securityKeyValue" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="securityKeyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="urlLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="URL"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="urlValue">
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="urlValueActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="deviceIdLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Device ID"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="deviceIdValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="securityKeyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Security Key"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="securityKeyValue">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Liberation Sans" size="18" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Device Configuration"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,303 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.payment.ConfigPaymentPanelEmpty;
|
||||
import com.unicenta.pos.payment.PaymentConfiguration;
|
||||
import java.awt.Component;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* @author Mikel Irurita
|
||||
*/
|
||||
public class JPanelConfigPayment extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private final DirtyManager dirty = new DirtyManager();
|
||||
private final Map<String, PaymentConfiguration> paymentsName = new HashMap<>();
|
||||
private PaymentConfiguration paymentConfiguration;
|
||||
|
||||
/** Creates new form JPanelConfigPayment */
|
||||
public JPanelConfigPayment() {
|
||||
|
||||
initComponents();
|
||||
|
||||
// dirty manager
|
||||
jcboCardReader.addActionListener(dirty);
|
||||
jcboPaymentGateway.addActionListener(dirty);
|
||||
|
||||
// Payment Provider
|
||||
initPayments("Not defined", new ConfigPaymentPanelEmpty());
|
||||
initPayments("external", new ConfigPaymentPanelEmpty());
|
||||
initPayments("PaymentSense", new ConfigPaymentPanelEmpty());
|
||||
|
||||
// Lector de tarjetas.
|
||||
jcboCardReader.addItem("Not defined");
|
||||
jcboCardReader.addItem("EMV");
|
||||
jcboCardReader.addItem("External");
|
||||
jcboCardReader.addItem("Generic");
|
||||
jcboCardReader.addItem("Intelligent");
|
||||
jcboCardReader.addItem("Keyboard");
|
||||
jcboCardReader.addItem("NFC/RFID");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
jcboCardReader.setSelectedItem(config.getProperty("payment.magcardreader"));
|
||||
jcboPaymentGateway.setSelectedItem(config.getProperty("payment.gateway"));
|
||||
urlValue.setText(config.getProperty("payment.URL"));
|
||||
deviceIdValue.setText(config.getProperty("payment.device-id"));
|
||||
securityKeyValue.setText(config.getProperty("payment.security-key"));
|
||||
paymentConfiguration.loadProperties(config);
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("payment.magcardreader", comboValue(jcboCardReader.getSelectedItem()));
|
||||
config.setProperty("payment.gateway", comboValue(jcboPaymentGateway.getSelectedItem()));
|
||||
config.setProperty("payment.URL", urlValue.getText());
|
||||
config.setProperty("payment.device-id", deviceIdValue.getText());
|
||||
config.setProperty("payment.security-key", securityKeyValue.getText());
|
||||
paymentConfiguration.saveProperties(config);
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
private void initPayments(String name, PaymentConfiguration pc) {
|
||||
jcboPaymentGateway.addItem(name);
|
||||
paymentsName.put(name, pc);
|
||||
}
|
||||
|
||||
private String comboValue(Object value) {
|
||||
return value == null ? "" : value.toString();
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel13 = new javax.swing.JLabel();
|
||||
jcboPaymentGateway = new javax.swing.JComboBox();
|
||||
jLabel11 = new javax.swing.JLabel();
|
||||
jcboCardReader = new javax.swing.JComboBox();
|
||||
emvConfigPanel = new javax.swing.JPanel();
|
||||
urlLabel = new javax.swing.JLabel();
|
||||
urlValue = new javax.swing.JTextField();
|
||||
deviceIdLabel = new javax.swing.JLabel();
|
||||
deviceIdValue = new javax.swing.JTextField();
|
||||
securityKeyLabel = new javax.swing.JLabel();
|
||||
securityKeyValue = new javax.swing.JTextField();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(590, 450));
|
||||
|
||||
jLabel13.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel13.setText(AppLocal.getIntString("label.paymentgateway")); // NOI18N
|
||||
jLabel13.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
jLabel13.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboPaymentGateway.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboPaymentGateway.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jcboPaymentGateway.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcboPaymentGatewayActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel11.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel11.setText(AppLocal.getIntString("label.cardreader")); // NOI18N
|
||||
jLabel11.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
jLabel11.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jcboCardReader.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jcboCardReader.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
emvConfigPanel.setBackground(new java.awt.Color(255, 255, 255));
|
||||
|
||||
urlLabel.setText("URL");
|
||||
urlLabel.setFont(new java.awt.Font("Arial", 0, 14));
|
||||
|
||||
urlValue.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
urlValueActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
deviceIdLabel.setText("Device ID");
|
||||
deviceIdLabel.setFont(new java.awt.Font("Arial", 0, 14));
|
||||
|
||||
securityKeyLabel.setText("Security Key");
|
||||
securityKeyLabel.setFont(new java.awt.Font("Arial", 0, 14));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Liberation Sans", 1, 18)); // NOI18N
|
||||
jLabel1.setText("Device Configuration");
|
||||
|
||||
javax.swing.GroupLayout emvConfigPanelLayout = new javax.swing.GroupLayout(emvConfigPanel);
|
||||
emvConfigPanel.setLayout(emvConfigPanelLayout);
|
||||
emvConfigPanelLayout.setHorizontalGroup(
|
||||
emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(emvConfigPanelLayout.createSequentialGroup()
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(securityKeyLabel)
|
||||
.addComponent(deviceIdLabel)
|
||||
.addComponent(urlLabel))
|
||||
.addGap(59, 59, 59)
|
||||
.addGroup(emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(urlValue)
|
||||
.addComponent(deviceIdValue)
|
||||
.addComponent(securityKeyValue))
|
||||
.addContainerGap())
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, emvConfigPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(125, Short.MAX_VALUE)
|
||||
.addComponent(jLabel1)
|
||||
.addGap(114, 114, 114))
|
||||
);
|
||||
emvConfigPanelLayout.setVerticalGroup(
|
||||
emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, emvConfigPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLabel1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
|
||||
.addGroup(emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(urlValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(urlLabel))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(deviceIdValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceIdLabel))
|
||||
.addGap(15, 15, 15)
|
||||
.addGroup(emvConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(securityKeyValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(securityKeyLabel))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(149, 149, 149)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jcboCardReader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboPaymentGateway, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(109, 109, 109)
|
||||
.addComponent(emvConfigPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(127, 127, 127))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(11, 11, 11)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboPaymentGateway, 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.BASELINE)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jcboCardReader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(64, 64, 64)
|
||||
.addComponent(emvConfigPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(152, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void urlValueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_urlValueActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_urlValueActionPerformed
|
||||
|
||||
private void jcboPaymentGatewayActionPerformed(java.awt.event.ActionEvent evt) {
|
||||
paymentConfiguration = paymentsName.get(comboValue(jcboPaymentGateway.getSelectedItem()));
|
||||
|
||||
if (comboValue(jcboPaymentGateway.getSelectedItem()).equals("PaymentSense")) {
|
||||
emvConfigPanel.setVisible(Boolean.TRUE);
|
||||
jcboCardReader.setSelectedItem("EMV");
|
||||
jcboCardReader.setEnabled(Boolean.FALSE);
|
||||
}
|
||||
else {
|
||||
emvConfigPanel.setVisible(Boolean.FALSE);
|
||||
jcboCardReader.setEnabled(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel deviceIdLabel;
|
||||
private javax.swing.JTextField deviceIdValue;
|
||||
private javax.swing.JPanel emvConfigPanel;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel13;
|
||||
private javax.swing.JComboBox jcboCardReader;
|
||||
private javax.swing.JComboBox jcboPaymentGateway;
|
||||
private javax.swing.JLabel securityKeyLabel;
|
||||
private javax.swing.JTextField securityKeyValue;
|
||||
private javax.swing.JLabel urlLabel;
|
||||
private javax.swing.JTextField urlValue;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,922 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[700, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jchkSCOnOff" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jchkautoRefreshTableMap" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelInactiveTime1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jchkShowWaiterDetails" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelTableNameTextColour" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jchkShowCustomerDetails" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jchkTransBtn" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="50" pref="50" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabelSCRate" min="-2" pref="333" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="jLabelSCRatePerCent" min="-2" pref="32" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jTextSCRate" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jchkSCRestaurant" min="-2" pref="240" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jTxtautoRefreshTimer" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLblautoRefresh" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="WaiterColour" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="TableNameColour" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="CustomerColour" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
|
||||
<Component id="jchkAutoLogoffToTables" min="-2" pref="340" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jchkAutoLogoff" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelInactiveTime" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="100" max="-2" attributes="0"/>
|
||||
<Component id="jTextAutoLogoffTime" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabelTimedMessage" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" min="-2" pref="654" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel1" alignment="0" min="-2" pref="260" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jchkInstance" max="-2" attributes="0"/>
|
||||
<Component id="jTaxIncluded" max="-2" attributes="0"/>
|
||||
<Component id="jchkTextOverlay" alignment="0" max="-2" attributes="0"/>
|
||||
<Component id="jchkPriceUpdate" alignment="0" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jchkOverride" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jtxtPIN" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="disableAnonymousStats" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="107" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel2" alignment="1" min="-2" pref="250" max="-2" attributes="0"/>
|
||||
<Component id="jCheckPrice00" max="-2" attributes="0"/>
|
||||
<Component id="jMoveAMountBoxToTop" max="-2" attributes="0"/>
|
||||
<Component id="jCloseCashbtn" max="-2" attributes="0"/>
|
||||
<Component id="jchkBarcodetype" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jTaxIncluded" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jCheckPrice00" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkInstance" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jMoveAMountBoxToTop" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkTextOverlay" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jCloseCashbtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkPriceUpdate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jchkBarcodetype" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jtxtPIN" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jchkOverride" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="disableAnonymousStats" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkAutoLogoff" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelInactiveTime" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextAutoLogoffTime" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelTimedMessage" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jchkAutoLogoffToTables" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkautoRefreshTableMap" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelInactiveTime1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTxtautoRefreshTimer" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblautoRefresh" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jchkSCOnOff" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabelSCRate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextSCRate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelSCRatePerCent" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jchkSCRestaurant" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jchkShowCustomerDetails" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="CustomerColour" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jchkShowWaiterDetails" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="WaiterColour" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="TableNameColour" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelTableNameTextColour" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jchkTransBtn" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.configOptionStartup" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.configOptionKeypad" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.configOptionLogOff" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.configOptionRestaurant" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkInstance">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.instance" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelInactiveTime">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autolofftime" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextAutoLogoffTime">
|
||||
<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="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 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="jLabelTimedMessage">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autologoffzero" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkAutoLogoff">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autologonoff" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkAutoLogoffActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkAutoLogoffToTables">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autoloffrestaurant" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkAutoLogoffToTablesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkShowCustomerDetails">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tableshowcustomerdetails" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[350, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkShowCustomerDetailsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkShowWaiterDetails">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tableshowwaiterdetails" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[350, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelTableNameTextColour">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.textclourtablename" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[350, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCheckPrice00">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.pricewith00" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckPrice00ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jTaxIncluded">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxincluded" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCloseCashbtn">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="message.systemclosecash" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jMoveAMountBoxToTop">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.inputamount" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkTextOverlay">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.currencybutton" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkautoRefreshTableMap">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autoRefreshTableMap" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkautoRefreshTableMapActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelInactiveTime1">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autolofftime" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTxtautoRefreshTimer">
|
||||
<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="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 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="jLblautoRefresh">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.autoRefreshTableMapTimer" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkSCOnOff">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.SCOnOff" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkSCOnOffActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelSCRate">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.SCRate" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[190, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextSCRate">
|
||||
<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="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextSCRateActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelSCRatePerCent">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.SCZero" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 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.JCheckBox" name="jchkSCRestaurant">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.SCRestaurant" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkPriceUpdate">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.priceupdate" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.priceupdate" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="propertyChange" listener="java.beans.PropertyChangeListener" parameters="java.beans.PropertyChangeEvent" handler="jchkPriceUpdatePropertyChange"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkBarcodetype">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.barcodetype" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.barcodetype" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkTransBtn">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.tabletransbutton" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[350, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkTransBtnActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="com.alee.extended.colorchooser.WebColorChooserField" name="WaiterColour">
|
||||
<Properties>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.prodhtmldisplayColourChooser" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="colorDisplayType" type="com.alee.extended.colorchooser.ColorDisplayType" editor="org.netbeans.modules.form.editors.EnumEditor">
|
||||
<Value id="hex"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.extended.colorchooser.WebColorChooserField" name="TableNameColour">
|
||||
<Properties>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.prodhtmldisplayColourChooser" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="colorDisplayType" type="com.alee.extended.colorchooser.ColorDisplayType" editor="org.netbeans.modules.form.editors.EnumEditor">
|
||||
<Value id="hex"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.alee.extended.colorchooser.WebColorChooserField" name="CustomerColour">
|
||||
<Properties>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.prodhtmldisplayColourChooser" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="colorDisplayType" type="com.alee.extended.colorchooser.ColorDisplayType" editor="org.netbeans.modules.form.editors.EnumEditor">
|
||||
<Value id="hex"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jchkOverride">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.override" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jchkOverrideActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jtxtPIN">
|
||||
<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="1234"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<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="PIN"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="disableAnonymousStats">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Disable Anonymous Stats"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,828 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import java.awt.*;
|
||||
import com.alee.extended.colorchooser.*;
|
||||
import com.alee.managers.language.*;
|
||||
import com.alee.laf.*;
|
||||
import com.alee.extended.colorchooser.ColorDisplayType;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class JPanelConfigSystem extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private DirtyManager dirty = new DirtyManager();
|
||||
|
||||
/** Creates new form JPanelConfigDatabase */
|
||||
public JPanelConfigSystem() {
|
||||
|
||||
WebLookAndFeel.initializeManagers ();
|
||||
|
||||
initComponents();
|
||||
|
||||
|
||||
jTextAutoLogoffTime.getDocument().addDocumentListener(dirty);
|
||||
jchkInstance.addActionListener(dirty);
|
||||
jchkTextOverlay.addActionListener(dirty);
|
||||
jchkAutoLogoff.addActionListener(dirty);
|
||||
jchkAutoLogoffToTables.addActionListener(dirty);
|
||||
jTaxIncluded.addActionListener(dirty);
|
||||
jCheckPrice00.addActionListener(dirty);
|
||||
jMoveAMountBoxToTop.addActionListener(dirty);
|
||||
jCloseCashbtn.addActionListener(dirty);
|
||||
jchkautoRefreshTableMap.addActionListener(dirty);
|
||||
jTxtautoRefreshTimer.getDocument().addDocumentListener(dirty);
|
||||
jchkSCOnOff.addActionListener(dirty);
|
||||
jchkSCRestaurant.addActionListener(dirty);
|
||||
jTextSCRate.getDocument().addDocumentListener(dirty);
|
||||
jchkPriceUpdate.addActionListener(dirty);
|
||||
jchkBarcodetype.addActionListener(dirty);
|
||||
jchkShowCustomerDetails.addActionListener(dirty);
|
||||
jchkShowWaiterDetails.addActionListener(dirty);
|
||||
CustomerColour.addActionListener(dirty);
|
||||
WaiterColour.addActionListener(dirty);
|
||||
TableNameColour.addActionListener(dirty);
|
||||
jchkTransBtn.addActionListener(dirty);
|
||||
jchkOverride.addActionListener(dirty);
|
||||
jtxtPIN.getDocument().addDocumentListener(dirty);
|
||||
disableAnonymousStats.addActionListener(dirty);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
String timerCheck =(config.getProperty("till.autotimer"));
|
||||
if (timerCheck == null){
|
||||
config.setProperty("till.autotimer","100");
|
||||
} else {
|
||||
jTextAutoLogoffTime.setText(config.getProperty("till.autotimer"));
|
||||
}
|
||||
|
||||
String autoRefreshtimerCheck =(config.getProperty("till.autoRefreshTimer"));
|
||||
if (autoRefreshtimerCheck == null){
|
||||
config.setProperty("till.autoRefreshTableMap","false");
|
||||
config.setProperty("till.autoRefreshTimer","5");
|
||||
}
|
||||
jTxtautoRefreshTimer.setText(config.getProperty("till.autoRefreshTimer"));
|
||||
|
||||
jchkInstance.setSelected(Boolean.parseBoolean(config.getProperty("machine.uniqueinstance")));
|
||||
|
||||
jchkTextOverlay.setSelected(Boolean.parseBoolean(config.getProperty("payments.textoverlay")));
|
||||
jchkAutoLogoff.setSelected(Boolean.parseBoolean(config.getProperty("till.autoLogoff")));
|
||||
jchkAutoLogoffToTables.setSelected(Boolean.parseBoolean(config.getProperty("till.autoLogoffrestaurant")));
|
||||
jTaxIncluded.setSelected(Boolean.parseBoolean(config.getProperty("till.taxincluded")));
|
||||
jCheckPrice00.setSelected(Boolean.parseBoolean(config.getProperty("till.pricewith00")));
|
||||
jMoveAMountBoxToTop.setSelected(Boolean.parseBoolean(config.getProperty("till.amountattop")));
|
||||
jCloseCashbtn.setSelected(Boolean.parseBoolean(config.getProperty("screen.600800")));
|
||||
jchkautoRefreshTableMap.setSelected(Boolean.parseBoolean(config.getProperty("till.autoRefreshTableMap")));
|
||||
jchkPriceUpdate.setSelected(AppConfig.getInstance().getBoolean("db.prodpriceupdate"));
|
||||
jchkBarcodetype.setSelected(Boolean.parseBoolean(config.getProperty("machine.barcodetype")));
|
||||
|
||||
String txtPIN =(config.getProperty("override.pin"));
|
||||
if (txtPIN == null){
|
||||
config.setProperty("override.check","true");
|
||||
config.setProperty("override.pin","1234");
|
||||
}
|
||||
jchkOverride.setSelected(Boolean.parseBoolean(config.getProperty("override.check")));
|
||||
jtxtPIN.setText(config.getProperty("override.pin"));
|
||||
|
||||
/** Added: JG 23 July 13 */
|
||||
String SCCheck =(config.getProperty("till.SCRate"));
|
||||
if (SCCheck == null){
|
||||
config.setProperty("till.SCRate","0");
|
||||
}
|
||||
jTextSCRate.setText(config.getProperty("till.SCRate"));
|
||||
jchkSCOnOff.setSelected(Boolean.parseBoolean(config.getProperty("till.SCOnOff")));
|
||||
jchkSCRestaurant.setSelected(Boolean.parseBoolean(config.getProperty("till.SCRestaurant")));
|
||||
|
||||
if (jchkSCOnOff.isSelected()){
|
||||
jchkSCRestaurant.setVisible(true);
|
||||
jLabelSCRate.setVisible(true);
|
||||
jTextSCRate.setVisible(true);
|
||||
jLabelSCRatePerCent.setVisible(true);
|
||||
}else{
|
||||
jchkSCRestaurant.setVisible(false);
|
||||
jLabelSCRate.setVisible(false);
|
||||
jTextSCRate.setVisible(false);
|
||||
jLabelSCRatePerCent.setVisible(false);
|
||||
}
|
||||
|
||||
if (jchkAutoLogoff.isSelected()){
|
||||
jchkAutoLogoffToTables.setVisible(true);
|
||||
jLabelInactiveTime.setVisible(true);
|
||||
jLabelTimedMessage.setVisible(true);
|
||||
jTextAutoLogoffTime.setVisible(true);
|
||||
}else{
|
||||
jchkAutoLogoffToTables.setVisible(false);
|
||||
jLabelInactiveTime.setVisible(false);
|
||||
jLabelTimedMessage.setVisible(false);
|
||||
jTextAutoLogoffTime.setVisible(false);
|
||||
}
|
||||
|
||||
if (jchkautoRefreshTableMap.isSelected()){
|
||||
jLblautoRefresh.setVisible(true);
|
||||
jLabelInactiveTime1.setVisible(true);
|
||||
jTxtautoRefreshTimer.setVisible(true);
|
||||
}else{
|
||||
jLblautoRefresh.setVisible(false);
|
||||
jLabelInactiveTime1.setVisible(false);
|
||||
jTxtautoRefreshTimer.setVisible(false);
|
||||
}
|
||||
|
||||
String customerCheck =(config.getProperty("table.showcustomerdetails"));
|
||||
if (customerCheck == null) {
|
||||
config.setProperty("table.showcustomerdetails","true");
|
||||
}
|
||||
jchkShowCustomerDetails.setSelected(Boolean.parseBoolean(config.getProperty("table.showcustomerdetails")));
|
||||
if (config.getProperty("table.customercolour")==null){
|
||||
CustomerColour.setText("");
|
||||
}else{
|
||||
CustomerColour.setText(config.getProperty("table.customercolour"));
|
||||
}
|
||||
|
||||
String waiterCheck =(config.getProperty("table.showwaiterdetails"));
|
||||
if (waiterCheck == null) {
|
||||
config.setProperty("table.showwaiterdetails","true");
|
||||
}
|
||||
jchkShowWaiterDetails.setSelected(Boolean.parseBoolean(config.getProperty("table.showwaiterdetails")));
|
||||
if (config.getProperty("table.waitercolour")==null){
|
||||
WaiterColour.setText("");
|
||||
}else{
|
||||
WaiterColour.setText(config.getProperty("table.waitercolour"));
|
||||
}
|
||||
if (config.getProperty("table.tablecolour")==null){
|
||||
TableNameColour.setText("");
|
||||
}else{
|
||||
TableNameColour.setText(config.getProperty("table.tablecolour"));
|
||||
}
|
||||
|
||||
jchkTransBtn.setSelected(Boolean.parseBoolean(config.getProperty("table.transbtn")));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("till.autotimer",jTextAutoLogoffTime.getText());
|
||||
config.setProperty("machine.uniqueinstance", Boolean.toString(jchkInstance.isSelected()));
|
||||
config.setProperty("table.showcustomerdetails", Boolean.toString(jchkShowCustomerDetails.isSelected()));
|
||||
config.setProperty("table.showwaiterdetails", Boolean.toString(jchkShowWaiterDetails.isSelected()));
|
||||
config.setProperty("payments.textoverlay", Boolean.toString(jchkTextOverlay.isSelected()));
|
||||
config.setProperty("till.autoLogoff", Boolean.toString(jchkAutoLogoff.isSelected()));
|
||||
config.setProperty("till.autoLogoffrestaurant", Boolean.toString(jchkAutoLogoffToTables.isSelected()));
|
||||
config.setProperty("table.customercolour",CustomerColour.getText());
|
||||
config.setProperty("table.waitercolour",WaiterColour.getText());
|
||||
config.setProperty("table.tablecolour",TableNameColour.getText());
|
||||
config.setProperty("till.taxincluded",Boolean.toString(jTaxIncluded.isSelected()));
|
||||
config.setProperty("till.pricewith00",Boolean.toString(jCheckPrice00.isSelected()));
|
||||
config.setProperty("till.amountattop",Boolean.toString(jMoveAMountBoxToTop.isSelected()));
|
||||
config.setProperty("screen.600800",Boolean.toString(jCloseCashbtn.isSelected()));
|
||||
config.setProperty("till.autoRefreshTableMap", Boolean.toString(jchkautoRefreshTableMap.isSelected()));
|
||||
config.setProperty("till.autoRefreshTimer", jTxtautoRefreshTimer.getText());
|
||||
|
||||
config.setProperty("till.SCOnOff",Boolean.toString(jchkSCOnOff.isSelected()));
|
||||
config.setProperty("till.SCRate",jTextSCRate.getText());
|
||||
config.setProperty("till.SCRestaurant",Boolean.toString(jchkSCRestaurant.isSelected()));
|
||||
|
||||
config.setProperty("db.prodpriceupdate", Boolean.toString(jchkPriceUpdate.isSelected()));
|
||||
config.setProperty("machine.barcodetype", Boolean.toString(jchkBarcodetype.isSelected()));
|
||||
|
||||
config.setProperty("table.transbtn", Boolean.toString(jchkTransBtn.isSelected()));
|
||||
|
||||
config.setProperty("override.check", Boolean.toString(jchkOverride.isSelected()));
|
||||
config.setProperty("override.pin",jtxtPIN.getText());
|
||||
config.setProperty("disable.stats", Boolean.toString(disableAnonymousStats.isSelected()));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jchkInstance = new javax.swing.JCheckBox();
|
||||
jLabelInactiveTime = new javax.swing.JLabel();
|
||||
jTextAutoLogoffTime = new javax.swing.JTextField();
|
||||
jLabelTimedMessage = new javax.swing.JLabel();
|
||||
jchkAutoLogoff = new javax.swing.JCheckBox();
|
||||
jchkAutoLogoffToTables = new javax.swing.JCheckBox();
|
||||
jchkShowCustomerDetails = new javax.swing.JCheckBox();
|
||||
jchkShowWaiterDetails = new javax.swing.JCheckBox();
|
||||
jLabelTableNameTextColour = new javax.swing.JLabel();
|
||||
jCheckPrice00 = new javax.swing.JCheckBox();
|
||||
jTaxIncluded = new javax.swing.JCheckBox();
|
||||
jCloseCashbtn = new javax.swing.JCheckBox();
|
||||
jMoveAMountBoxToTop = new javax.swing.JCheckBox();
|
||||
jchkTextOverlay = new javax.swing.JCheckBox();
|
||||
jchkautoRefreshTableMap = new javax.swing.JCheckBox();
|
||||
jLabelInactiveTime1 = new javax.swing.JLabel();
|
||||
jTxtautoRefreshTimer = new javax.swing.JTextField();
|
||||
jLblautoRefresh = new javax.swing.JLabel();
|
||||
jchkSCOnOff = new javax.swing.JCheckBox();
|
||||
jLabelSCRate = new javax.swing.JLabel();
|
||||
jTextSCRate = new javax.swing.JTextField();
|
||||
jLabelSCRatePerCent = new javax.swing.JLabel();
|
||||
jchkSCRestaurant = new javax.swing.JCheckBox();
|
||||
jchkPriceUpdate = new javax.swing.JCheckBox();
|
||||
jchkBarcodetype = new javax.swing.JCheckBox();
|
||||
jchkTransBtn = new javax.swing.JCheckBox();
|
||||
WaiterColour = new com.alee.extended.colorchooser.WebColorChooserField();
|
||||
TableNameColour = new com.alee.extended.colorchooser.WebColorChooserField();
|
||||
CustomerColour = new com.alee.extended.colorchooser.WebColorChooserField();
|
||||
jchkOverride = new javax.swing.JCheckBox();
|
||||
jtxtPIN = new javax.swing.JTextField();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
disableAnonymousStats = new javax.swing.JCheckBox();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(700, 500));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLabel1.setText(bundle.getString("label.configOptionStartup")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
jLabel2.setText(bundle.getString("label.configOptionKeypad")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
jLabel3.setText(bundle.getString("label.configOptionLogOff")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
jLabel4.setText(bundle.getString("label.configOptionRestaurant")); // NOI18N
|
||||
jLabel4.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jchkInstance.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkInstance.setSelected(true);
|
||||
jchkInstance.setText(bundle.getString("label.instance")); // NOI18N
|
||||
jchkInstance.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkInstance.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkInstance.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jLabelInactiveTime.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jLabelInactiveTime.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelInactiveTime.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabelInactiveTime.setText(bundle.getString("label.autolofftime")); // NOI18N
|
||||
jLabelInactiveTime.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelInactiveTime.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelInactiveTime.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
jTextAutoLogoffTime.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTextAutoLogoffTime.setText("0");
|
||||
jTextAutoLogoffTime.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jTextAutoLogoffTime.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jTextAutoLogoffTime.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabelTimedMessage.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelTimedMessage.setText(bundle.getString("label.autologoffzero")); // NOI18N
|
||||
jLabelTimedMessage.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelTimedMessage.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelTimedMessage.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jchkAutoLogoff.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkAutoLogoff.setText(bundle.getString("label.autologonoff")); // NOI18N
|
||||
jchkAutoLogoff.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkAutoLogoff.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkAutoLogoff.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jchkAutoLogoff.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkAutoLogoffActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jchkAutoLogoffToTables.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkAutoLogoffToTables.setText(bundle.getString("label.autoloffrestaurant")); // NOI18N
|
||||
jchkAutoLogoffToTables.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkAutoLogoffToTables.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkAutoLogoffToTables.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
jchkAutoLogoffToTables.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkAutoLogoffToTablesActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jchkShowCustomerDetails.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkShowCustomerDetails.setSelected(true);
|
||||
jchkShowCustomerDetails.setText(bundle.getString("label.tableshowcustomerdetails")); // NOI18N
|
||||
jchkShowCustomerDetails.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkShowCustomerDetails.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkShowCustomerDetails.setPreferredSize(new java.awt.Dimension(350, 30));
|
||||
jchkShowCustomerDetails.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkShowCustomerDetailsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jchkShowWaiterDetails.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkShowWaiterDetails.setSelected(true);
|
||||
jchkShowWaiterDetails.setText(bundle.getString("label.tableshowwaiterdetails")); // NOI18N
|
||||
jchkShowWaiterDetails.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkShowWaiterDetails.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkShowWaiterDetails.setPreferredSize(new java.awt.Dimension(350, 30));
|
||||
|
||||
jLabelTableNameTextColour.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jLabelTableNameTextColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelTableNameTextColour.setText(bundle.getString("label.textclourtablename")); // NOI18N
|
||||
jLabelTableNameTextColour.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelTableNameTextColour.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelTableNameTextColour.setPreferredSize(new java.awt.Dimension(350, 30));
|
||||
|
||||
jCheckPrice00.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jCheckPrice00.setText(bundle.getString("label.pricewith00")); // NOI18N
|
||||
jCheckPrice00.setToolTipText("");
|
||||
jCheckPrice00.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jCheckPrice00.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jCheckPrice00.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
jCheckPrice00.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jCheckPrice00ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jTaxIncluded.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTaxIncluded.setText(bundle.getString("label.taxincluded")); // NOI18N
|
||||
jTaxIncluded.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jTaxIncluded.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jTaxIncluded.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jCloseCashbtn.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jCloseCashbtn.setText(bundle.getString("message.systemclosecash")); // NOI18N
|
||||
jCloseCashbtn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
jCloseCashbtn.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jCloseCashbtn.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jCloseCashbtn.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jMoveAMountBoxToTop.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jMoveAMountBoxToTop.setSelected(true);
|
||||
jMoveAMountBoxToTop.setText(bundle.getString("label.inputamount")); // NOI18N
|
||||
jMoveAMountBoxToTop.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jMoveAMountBoxToTop.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jMoveAMountBoxToTop.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jchkTextOverlay.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkTextOverlay.setText(bundle.getString("label.currencybutton")); // NOI18N
|
||||
jchkTextOverlay.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
jchkTextOverlay.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkTextOverlay.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkTextOverlay.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jchkautoRefreshTableMap.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkautoRefreshTableMap.setText(bundle.getString("label.autoRefreshTableMap")); // NOI18N
|
||||
jchkautoRefreshTableMap.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkautoRefreshTableMap.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkautoRefreshTableMap.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jchkautoRefreshTableMap.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkautoRefreshTableMapActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabelInactiveTime1.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jLabelInactiveTime1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelInactiveTime1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabelInactiveTime1.setText(bundle.getString("label.autolofftime")); // NOI18N
|
||||
jLabelInactiveTime1.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelInactiveTime1.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelInactiveTime1.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
jTxtautoRefreshTimer.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTxtautoRefreshTimer.setText("0");
|
||||
jTxtautoRefreshTimer.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jTxtautoRefreshTimer.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jTxtautoRefreshTimer.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLblautoRefresh.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblautoRefresh.setText(bundle.getString("label.autoRefreshTableMapTimer")); // NOI18N
|
||||
jLblautoRefresh.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLblautoRefresh.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLblautoRefresh.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jchkSCOnOff.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkSCOnOff.setText(bundle.getString("label.SCOnOff")); // NOI18N
|
||||
jchkSCOnOff.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkSCOnOff.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkSCOnOff.setPreferredSize(new java.awt.Dimension(0, 25));
|
||||
jchkSCOnOff.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkSCOnOffActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabelSCRate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelSCRate.setText(bundle.getString("label.SCRate")); // NOI18N
|
||||
jLabelSCRate.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelSCRate.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelSCRate.setPreferredSize(new java.awt.Dimension(190, 30));
|
||||
|
||||
jTextSCRate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTextSCRate.setText("0");
|
||||
jTextSCRate.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jTextSCRate.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jTextSCRate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
jTextSCRate.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jTextSCRateActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabelSCRatePerCent.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabelSCRatePerCent.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
jLabelSCRatePerCent.setText(bundle.getString("label.SCZero")); // NOI18N
|
||||
jLabelSCRatePerCent.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jLabelSCRatePerCent.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jLabelSCRatePerCent.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jchkSCRestaurant.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkSCRestaurant.setText(bundle.getString("label.SCRestaurant")); // NOI18N
|
||||
jchkSCRestaurant.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkSCRestaurant.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkSCRestaurant.setPreferredSize(new java.awt.Dimension(0, 25));
|
||||
|
||||
jchkPriceUpdate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkPriceUpdate.setText(bundle.getString("label.priceupdate")); // NOI18N
|
||||
jchkPriceUpdate.setToolTipText(bundle.getString("tooltip.priceupdate")); // NOI18N
|
||||
jchkPriceUpdate.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
jchkPriceUpdate.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkPriceUpdate.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkPriceUpdate.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jchkBarcodetype.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkBarcodetype.setText(bundle.getString("label.barcodetype")); // NOI18N
|
||||
jchkBarcodetype.setToolTipText(bundle.getString("tooltip.barcodetype")); // NOI18N
|
||||
jchkBarcodetype.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
jchkBarcodetype.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkBarcodetype.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkBarcodetype.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
|
||||
jchkTransBtn.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkTransBtn.setText(bundle.getString("label.tabletransbutton")); // NOI18N
|
||||
jchkTransBtn.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkTransBtn.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkTransBtn.setPreferredSize(new java.awt.Dimension(350, 30));
|
||||
jchkTransBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jchkTransBtnActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
WaiterColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N
|
||||
WaiterColour.setColorDisplayType(com.alee.extended.colorchooser.ColorDisplayType.hex);
|
||||
WaiterColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
WaiterColour.setMinimumSize(new java.awt.Dimension(51, 30));
|
||||
|
||||
TableNameColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N
|
||||
TableNameColour.setColorDisplayType(com.alee.extended.colorchooser.ColorDisplayType.hex);
|
||||
TableNameColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
TableNameColour.setMinimumSize(new java.awt.Dimension(51, 30));
|
||||
|
||||
CustomerColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N
|
||||
CustomerColour.setColorDisplayType(com.alee.extended.colorchooser.ColorDisplayType.hex);
|
||||
CustomerColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
CustomerColour.setMinimumSize(new java.awt.Dimension(51, 30));
|
||||
|
||||
jchkOverride.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jchkOverride.setText(bundle.getString("label.override")); // NOI18N
|
||||
jchkOverride.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jchkOverride.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jchkOverride.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jtxtPIN.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jtxtPIN.setText("1234");
|
||||
jtxtPIN.setToolTipText("");
|
||||
jtxtPIN.setMaximumSize(new java.awt.Dimension(0, 25));
|
||||
jtxtPIN.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
jtxtPIN.setPreferredSize(new java.awt.Dimension(60, 30));
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel5.setText("PIN");
|
||||
|
||||
disableAnonymousStats.setText("Disable Anonymous Stats");
|
||||
disableAnonymousStats.setFont(new java.awt.Font("Arial", 0, 14));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jchkSCOnOff, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jchkautoRefreshTableMap, 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(jLabelInactiveTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkShowCustomerDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkTransBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(50, 50, 50))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jTxtautoRefreshTimer, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(WaiterColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(TableNameColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(CustomerColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(15, 15, 15)
|
||||
.addComponent(jchkAutoLogoffToTables, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jchkAutoLogoff, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabelInactiveTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(100, 100, 100)
|
||||
.addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabelTimedMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(0, 0, Short.MAX_VALUE))))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 654, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jchkInstance, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTaxIncluded, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkTextOverlay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkPriceUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jtxtPIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel5))
|
||||
.addComponent(disableAnonymousStats))))
|
||||
.addGap(107, 107, 107)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCheckPrice00, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jMoveAMountBoxToTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCloseCashbtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkBarcodetype, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGap(0, 0, Short.MAX_VALUE))))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2, 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(jTaxIncluded, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCheckPrice00, 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(jchkInstance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jMoveAMountBoxToTop, 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(jchkTextOverlay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCloseCashbtn, 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(jchkPriceUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkBarcodetype, 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(jLabel5)
|
||||
.addComponent(jtxtPIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(disableAnonymousStats)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel3, 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(jchkAutoLogoff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelInactiveTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelTimedMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jchkAutoLogoffToTables, 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(jchkautoRefreshTableMap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelInactiveTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTxtautoRefreshTimer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jchkSCOnOff, 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(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel4, 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(jchkShowCustomerDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(CustomerColour, 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.CENTER)
|
||||
.addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(WaiterColour, 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.CENTER)
|
||||
.addComponent(TableNameColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jchkTransBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(32, 32, 32))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jchkAutoLogoffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkAutoLogoffActionPerformed
|
||||
if (jchkAutoLogoff.isSelected()){
|
||||
jchkAutoLogoffToTables.setVisible(true);
|
||||
jLabelInactiveTime.setVisible(true);
|
||||
jLabelTimedMessage.setVisible(true);
|
||||
jTextAutoLogoffTime.setVisible(true);
|
||||
}else{
|
||||
jchkAutoLogoffToTables.setVisible(false);
|
||||
jLabelInactiveTime.setVisible(false);
|
||||
jLabelTimedMessage.setVisible(false);
|
||||
jTextAutoLogoffTime.setVisible(false);
|
||||
}
|
||||
}//GEN-LAST:event_jchkAutoLogoffActionPerformed
|
||||
|
||||
private void jCheckPrice00ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckPrice00ActionPerformed
|
||||
|
||||
}//GEN-LAST:event_jCheckPrice00ActionPerformed
|
||||
|
||||
private void jchkAutoLogoffToTablesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkAutoLogoffToTablesActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jchkAutoLogoffToTablesActionPerformed
|
||||
|
||||
private void jchkShowCustomerDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkShowCustomerDetailsActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jchkShowCustomerDetailsActionPerformed
|
||||
|
||||
private void jchkautoRefreshTableMapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkautoRefreshTableMapActionPerformed
|
||||
if (jchkautoRefreshTableMap.isSelected()){
|
||||
jLblautoRefresh.setVisible(true);
|
||||
jLabelInactiveTime1.setVisible(true);
|
||||
jTxtautoRefreshTimer.setVisible(true);
|
||||
}else{
|
||||
jLblautoRefresh.setVisible(false);
|
||||
jLabelInactiveTime1.setVisible(false);
|
||||
jTxtautoRefreshTimer.setVisible(false);
|
||||
}
|
||||
}//GEN-LAST:event_jchkautoRefreshTableMapActionPerformed
|
||||
|
||||
private void jchkSCOnOffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkSCOnOffActionPerformed
|
||||
if (jchkSCOnOff.isSelected()){
|
||||
jchkSCRestaurant.setVisible(true);
|
||||
jLabelSCRate.setVisible(true);
|
||||
jTextSCRate.setVisible(true);
|
||||
jLabelSCRatePerCent.setVisible(true);
|
||||
}else{
|
||||
jchkSCRestaurant.setVisible(false);
|
||||
jLabelSCRate.setVisible(false);
|
||||
jTextSCRate.setVisible(false);
|
||||
jLabelSCRatePerCent.setVisible(false);
|
||||
}
|
||||
}//GEN-LAST:event_jchkSCOnOffActionPerformed
|
||||
|
||||
private void jTextSCRateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextSCRateActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jTextSCRateActionPerformed
|
||||
|
||||
private void jchkTransBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchkTransBtnActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jchkTransBtnActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private com.alee.extended.colorchooser.WebColorChooserField CustomerColour;
|
||||
private com.alee.extended.colorchooser.WebColorChooserField TableNameColour;
|
||||
private com.alee.extended.colorchooser.WebColorChooserField WaiterColour;
|
||||
private javax.swing.JCheckBox disableAnonymousStats;
|
||||
private javax.swing.JCheckBox jCheckPrice00;
|
||||
private javax.swing.JCheckBox jCloseCashbtn;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabelInactiveTime;
|
||||
private javax.swing.JLabel jLabelInactiveTime1;
|
||||
private javax.swing.JLabel jLabelSCRate;
|
||||
private javax.swing.JLabel jLabelSCRatePerCent;
|
||||
private javax.swing.JLabel jLabelTableNameTextColour;
|
||||
private javax.swing.JLabel jLabelTimedMessage;
|
||||
private javax.swing.JLabel jLblautoRefresh;
|
||||
private javax.swing.JCheckBox jMoveAMountBoxToTop;
|
||||
private javax.swing.JCheckBox jTaxIncluded;
|
||||
private javax.swing.JTextField jTextAutoLogoffTime;
|
||||
private javax.swing.JTextField jTextSCRate;
|
||||
private javax.swing.JTextField jTxtautoRefreshTimer;
|
||||
private javax.swing.JCheckBox jchkAutoLogoff;
|
||||
private javax.swing.JCheckBox jchkAutoLogoffToTables;
|
||||
private javax.swing.JCheckBox jchkBarcodetype;
|
||||
private javax.swing.JCheckBox jchkInstance;
|
||||
private javax.swing.JCheckBox jchkOverride;
|
||||
private javax.swing.JCheckBox jchkPriceUpdate;
|
||||
private javax.swing.JCheckBox jchkSCOnOff;
|
||||
private javax.swing.JCheckBox jchkSCRestaurant;
|
||||
private javax.swing.JCheckBox jchkShowCustomerDetails;
|
||||
private javax.swing.JCheckBox jchkShowWaiterDetails;
|
||||
private javax.swing.JCheckBox jchkTextOverlay;
|
||||
private javax.swing.JCheckBox jchkTransBtn;
|
||||
private javax.swing.JCheckBox jchkautoRefreshTableMap;
|
||||
private javax.swing.JTextField jtxtPIN;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[950, 600]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTabbedPane1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jTabbedPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JTabbedPane" name="jTabbedPane1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[930, 550]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelGeneral">
|
||||
<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, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="General">
|
||||
<Property name="tabTitle" type="java.lang.String" value="General"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelLocale">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Locale">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Locale"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelPayment">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Payment Method">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Payment Method"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelPeripheral">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Peripherals">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Peripherals"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelSystem">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="System Options">
|
||||
<Property name="tabTitle" type="java.lang.String" value="System Options"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelTicketSetup">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Ticket Setup">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Ticket Setup"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelCompany">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Company">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Company"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelDatabase">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Database Setup">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Database Setup"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jbtnSave" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jbtnRestore" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jbtnExit" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="31" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jbtnRestore" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnExit" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnSave" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jbtnRestore">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.factory" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 33]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 33]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnRestoreActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnExit">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.exit" replaceFormat="AppLocal.getIntString("Button.Exit")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnExitActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnSave">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.save" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSaveActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,384 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.JMessageDialog;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.pos.forms.*;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.*;
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPanelConfiguration extends JPanel implements JPanelView {
|
||||
|
||||
private List<PanelConfig> m_panelconfig;
|
||||
|
||||
private AppConfig config;
|
||||
|
||||
/** Creates new form JPanelConfiguration
|
||||
* @param oApp */
|
||||
public JPanelConfiguration(AppView oApp) {
|
||||
this(oApp.getProperties());
|
||||
if (oApp!= null) {
|
||||
jbtnExit.setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param props
|
||||
*/
|
||||
public JPanelConfiguration(AppProperties props) {
|
||||
|
||||
initComponents();
|
||||
config = new AppConfig(props.getConfigFile());
|
||||
|
||||
m_panelconfig = new ArrayList<>();
|
||||
|
||||
PanelConfig panel;
|
||||
|
||||
panel = new JPanelConfigDatabase();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelDatabase.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigGeneral();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelGeneral.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigLocale();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelLocale.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigPayment();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelPayment.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigPeripheral();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelPeripheral.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigSystem();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelSystem.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelTicketSetup();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelTicketSetup.add(panel.getConfigComponent());
|
||||
|
||||
panel = new JPanelConfigCompany();
|
||||
m_panelconfig.add(panel);
|
||||
jPanelCompany.add(panel.getConfigComponent());
|
||||
|
||||
}
|
||||
|
||||
private void restoreProperties() {
|
||||
|
||||
if (config.delete()) {
|
||||
loadProperties();
|
||||
} else {
|
||||
JMessageDialog.showMessage(this,
|
||||
new MessageInf(MessageInf.SGN_WARNING,
|
||||
AppLocal.getIntString("message.cannotdeleteconfig")));
|
||||
}
|
||||
}
|
||||
|
||||
private void loadProperties() {
|
||||
|
||||
config.load();
|
||||
|
||||
// paneles auxiliares
|
||||
for (PanelConfig c: m_panelconfig) {
|
||||
c.loadProperties(config);
|
||||
}
|
||||
}
|
||||
|
||||
private void saveProperties() {
|
||||
|
||||
// paneles auxiliares
|
||||
for (PanelConfig c: m_panelconfig) {
|
||||
c.saveProperties(config);
|
||||
}
|
||||
|
||||
try {
|
||||
config.save();
|
||||
JOptionPane.showMessageDialog(this,
|
||||
AppLocal.getIntString("message.restartchanges"),
|
||||
AppLocal.getIntString("message.title"),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
} catch (IOException e) {
|
||||
JMessageDialog.showMessage(this,
|
||||
new MessageInf(MessageInf.SGN_WARNING,
|
||||
AppLocal.getIntString("message.cannotsaveconfig"), e));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Configuration");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
loadProperties();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
|
||||
boolean haschanged = false;
|
||||
for (PanelConfig c: m_panelconfig) {
|
||||
if (c.hasChanged()) {
|
||||
haschanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (haschanged) {
|
||||
int res = JOptionPane.showConfirmDialog(this,
|
||||
AppLocal.getIntString("message.wannasave"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_CANCEL_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
if (res == JOptionPane.YES_OPTION) {
|
||||
saveProperties();
|
||||
return true;
|
||||
} else {
|
||||
return res == JOptionPane.NO_OPTION;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jTabbedPane1 = new javax.swing.JTabbedPane();
|
||||
jPanelGeneral = new javax.swing.JPanel();
|
||||
jPanelLocale = new javax.swing.JPanel();
|
||||
jPanelPayment = new javax.swing.JPanel();
|
||||
jPanelPeripheral = new javax.swing.JPanel();
|
||||
jPanelSystem = new javax.swing.JPanel();
|
||||
jPanelTicketSetup = new javax.swing.JPanel();
|
||||
jPanelCompany = new javax.swing.JPanel();
|
||||
jPanelDatabase = new javax.swing.JPanel();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jbtnRestore = new javax.swing.JButton();
|
||||
jbtnExit = new javax.swing.JButton();
|
||||
jbtnSave = new javax.swing.JButton();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setPreferredSize(new java.awt.Dimension(950, 600));
|
||||
|
||||
jTabbedPane1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jTabbedPane1.setOpaque(true);
|
||||
jTabbedPane1.setPreferredSize(new java.awt.Dimension(930, 550));
|
||||
|
||||
jPanelGeneral.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jPanelGeneral.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelGeneral.setLayout(new javax.swing.BoxLayout(jPanelGeneral, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("General", jPanelGeneral);
|
||||
|
||||
jPanelLocale.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelLocale.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelLocale.setLayout(new javax.swing.BoxLayout(jPanelLocale, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Locale", jPanelLocale);
|
||||
|
||||
jPanelPayment.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelPayment.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelPayment.setLayout(new javax.swing.BoxLayout(jPanelPayment, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Payment Method", jPanelPayment);
|
||||
|
||||
jPanelPeripheral.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelPeripheral.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelPeripheral.setLayout(new javax.swing.BoxLayout(jPanelPeripheral, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Peripherals", jPanelPeripheral);
|
||||
|
||||
jPanelSystem.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelSystem.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelSystem.setLayout(new javax.swing.BoxLayout(jPanelSystem, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("System Options", jPanelSystem);
|
||||
|
||||
jPanelTicketSetup.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelTicketSetup.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelTicketSetup.setLayout(new javax.swing.BoxLayout(jPanelTicketSetup, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Ticket Setup", jPanelTicketSetup);
|
||||
|
||||
jPanelCompany.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jPanelCompany.setLayout(new javax.swing.BoxLayout(jPanelCompany, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Company", jPanelCompany);
|
||||
|
||||
jPanelDatabase.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanelDatabase.setPreferredSize(new java.awt.Dimension(0, 400));
|
||||
jPanelDatabase.setLayout(new javax.swing.BoxLayout(jPanelDatabase, javax.swing.BoxLayout.LINE_AXIS));
|
||||
jTabbedPane1.addTab("Database Setup", jPanelDatabase);
|
||||
|
||||
jbtnRestore.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnRestore.setText(AppLocal.getIntString("button.factory")); // NOI18N
|
||||
jbtnRestore.setMaximumSize(new java.awt.Dimension(103, 33));
|
||||
jbtnRestore.setMinimumSize(new java.awt.Dimension(103, 33));
|
||||
jbtnRestore.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnRestore.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnRestoreActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnExit.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnExit.setText(AppLocal.getIntString("Button.Exit")); // NOI18N
|
||||
jbtnExit.setMaximumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnExit.setMinimumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnExit.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnExit.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnExitActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnSave.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnSave.setText(AppLocal.getIntString("button.save")); // NOI18N
|
||||
jbtnSave.setMaximumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnSave.setMinimumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnSave.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnSave.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnSaveActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jbtnSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jbtnRestore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jbtnExit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(31, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jbtnRestore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnExit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jbtnRestoreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnRestoreActionPerformed
|
||||
|
||||
if (JOptionPane.showConfirmDialog(this,
|
||||
AppLocal.getIntString("message.configfactory"),
|
||||
AppLocal.getIntString("message.title"),
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
|
||||
restoreProperties();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jbtnRestoreActionPerformed
|
||||
|
||||
private void jbtnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSaveActionPerformed
|
||||
|
||||
saveProperties();
|
||||
|
||||
}//GEN-LAST:event_jbtnSaveActionPerformed
|
||||
|
||||
private void jbtnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnExitActionPerformed
|
||||
deactivate();
|
||||
System.exit(0);
|
||||
}//GEN-LAST:event_jbtnExitActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanelCompany;
|
||||
private javax.swing.JPanel jPanelDatabase;
|
||||
private javax.swing.JPanel jPanelGeneral;
|
||||
private javax.swing.JPanel jPanelLocale;
|
||||
private javax.swing.JPanel jPanelPayment;
|
||||
private javax.swing.JPanel jPanelPeripheral;
|
||||
private javax.swing.JPanel jPanelSystem;
|
||||
private javax.swing.JPanel jPanelTicketSetup;
|
||||
private javax.swing.JTabbedPane jTabbedPane1;
|
||||
private javax.swing.JButton jbtnExit;
|
||||
private javax.swing.JButton jbtnRestore;
|
||||
private javax.swing.JButton jbtnSave;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[700, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jReceiptPrintOff" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jPickupSize" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jbtnReset" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" alignment="0" min="-2" pref="160" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jReceiptSize" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jTextReceiptPrefix" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jTicketExample" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="digitalReceipt" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jReceiptSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" pref="40" max="-2" attributes="0"/>
|
||||
<Component id="jTextReceiptPrefix" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTicketExample" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="m_jReceiptPrintOff" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jPickupSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jbtnReset" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="digitalReceipt" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="254" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.ticketsetupnumber" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[190, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jReceiptSize">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0" minimum="0" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jReceiptSizeStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.ticketsetupprefix" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextReceiptPrefix">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jTextReceiptPrefixKeyReleased"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTicketExample">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="1"/>
|
||||
<Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.pickupcodesize" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[190, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jPickupSize">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0" minimum="0" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jPickupSizeStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="m_jReceiptPrintOff">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.receiptprint" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[180, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jReceiptPrintOffActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnReset">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/reload.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.resetpickup" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 33]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnResetActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="digitalReceipt">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Enable digital email Receipts"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="digitalReceiptActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,400 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.AltEncrypter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
@Slf4j
|
||||
public class JPanelTicketSetup extends javax.swing.JPanel implements PanelConfig {
|
||||
|
||||
private final DirtyManager dirty = new DirtyManager();
|
||||
private String receipt="1";
|
||||
private Integer x = 0;
|
||||
private String receiptSize;
|
||||
private String pickupSize;
|
||||
private final Integer ps = 0;
|
||||
|
||||
private Connection conn;
|
||||
private String sdbmanager;
|
||||
private String SQL;
|
||||
private Statement stmt;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public JPanelTicketSetup() {
|
||||
|
||||
initComponents();
|
||||
|
||||
jReceiptSize.addChangeListener(dirty);
|
||||
jPickupSize.addChangeListener(dirty);
|
||||
jTextReceiptPrefix.getDocument().addDocumentListener(dirty);
|
||||
m_jReceiptPrintOff.addActionListener(dirty);
|
||||
|
||||
jbtnReset.setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChanged() {
|
||||
return dirty.isDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getConfigComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void loadProperties(AppConfig config) {
|
||||
|
||||
receiptSize =(config.getProperty("till.receiptsize"));
|
||||
if (receiptSize == null || "".equals(receiptSize)){
|
||||
jReceiptSize.setModel(new SpinnerNumberModel(1,1,20,1));
|
||||
} else {
|
||||
jReceiptSize.setModel(new SpinnerNumberModel(Integer.parseInt(receiptSize),1,20,1));
|
||||
}
|
||||
|
||||
pickupSize =(config.getProperty("till.pickupsize"));
|
||||
if (pickupSize == null || "".equals(pickupSize)){
|
||||
jPickupSize.setModel(new SpinnerNumberModel(1,1,20,1));
|
||||
} else {
|
||||
jPickupSize.setModel(new SpinnerNumberModel(Integer.parseInt(pickupSize),1,20,1));
|
||||
}
|
||||
|
||||
jTextReceiptPrefix.setText(config.getProperty("till.receiptprefix"));
|
||||
// build the example receipt using the loaded details
|
||||
receipt="";
|
||||
x=1;
|
||||
while (x < (Integer)jReceiptSize.getValue()){
|
||||
receipt += "0";
|
||||
x++;
|
||||
}
|
||||
|
||||
receipt += "1";
|
||||
jTicketExample.setText(jTextReceiptPrefix.getText()+receipt);
|
||||
m_jReceiptPrintOff.setSelected(Boolean.parseBoolean(config.getProperty("till.receiptprintoff")));
|
||||
|
||||
digitalReceipt.setSelected(Boolean.parseBoolean(config.getProperty("till.digital-receipt")));
|
||||
|
||||
dirty.setDirty(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* JG Oct 2017
|
||||
* This block to be used for internal SETS/RESETS and external ORDERS sync's
|
||||
*/
|
||||
public void loadUp() throws ClassNotFoundException, SQLException {
|
||||
|
||||
/* Add external received order reset block here -
|
||||
* Get connex to secondary or external system's DB + [params]
|
||||
* Pref' use is JSON/REST rather than PreparedStatement
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@Override
|
||||
public void saveProperties(AppConfig config) {
|
||||
|
||||
config.setProperty("till.receiptprefix", jTextReceiptPrefix.getText());
|
||||
config.setProperty("till.receiptsize", jReceiptSize.getValue().toString());
|
||||
config.setProperty("till.pickupsize", jPickupSize.getValue().toString());
|
||||
config.setProperty("till.receiptprintoff",Boolean.toString(m_jReceiptPrintOff.isSelected()));
|
||||
config.setProperty("till.digital-receipt", Boolean.toString(digitalReceipt.isSelected()));
|
||||
|
||||
dirty.setDirty(false);
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jReceiptSize = new javax.swing.JSpinner();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jTextReceiptPrefix = new javax.swing.JTextField();
|
||||
jTicketExample = new javax.swing.JTextField();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jPickupSize = new javax.swing.JSpinner();
|
||||
m_jReceiptPrintOff = new javax.swing.JCheckBox();
|
||||
jbtnReset = new javax.swing.JButton();
|
||||
digitalReceipt = new javax.swing.JCheckBox();
|
||||
|
||||
setBackground(new java.awt.Color(0, 0, 0));
|
||||
setOpaque(false);
|
||||
setPreferredSize(new java.awt.Dimension(700, 500));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLabel1.setText(bundle.getString("label.ticketsetupnumber")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(190, 30));
|
||||
|
||||
jReceiptSize.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
|
||||
jReceiptSize.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
|
||||
jReceiptSize.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
jReceiptSize.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
jReceiptSizeStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(bundle.getString("label.ticketsetupprefix")); // NOI18N
|
||||
|
||||
jTextReceiptPrefix.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
|
||||
jTextReceiptPrefix.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
jTextReceiptPrefix.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
jTextReceiptPrefix.addKeyListener(new java.awt.event.KeyAdapter() {
|
||||
public void keyReleased(java.awt.event.KeyEvent evt) {
|
||||
jTextReceiptPrefixKeyReleased(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jTicketExample.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
|
||||
jTicketExample.setText("1");
|
||||
jTicketExample.setDisabledTextColor(new java.awt.Color(0, 0, 0));
|
||||
jTicketExample.setEnabled(false);
|
||||
jTicketExample.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(bundle.getString("label.pickupcodesize")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(190, 30));
|
||||
|
||||
jPickupSize.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
|
||||
jPickupSize.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
|
||||
jPickupSize.setToolTipText("");
|
||||
jPickupSize.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
jPickupSize.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
jPickupSizeStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
m_jReceiptPrintOff.setBackground(new java.awt.Color(255, 255, 255));
|
||||
m_jReceiptPrintOff.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jReceiptPrintOff.setText(bundle.getString("label.receiptprint")); // NOI18N
|
||||
m_jReceiptPrintOff.setPreferredSize(new java.awt.Dimension(180, 30));
|
||||
m_jReceiptPrintOff.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jReceiptPrintOffActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jbtnReset.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/reload.png"))); // NOI18N
|
||||
jbtnReset.setText(AppLocal.getIntString("label.resetpickup")); // NOI18N
|
||||
jbtnReset.setMaximumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnReset.setMinimumSize(new java.awt.Dimension(70, 33));
|
||||
jbtnReset.setPreferredSize(new java.awt.Dimension(100, 45));
|
||||
jbtnReset.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnResetActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
digitalReceipt.setText("Enable digital email Receipts");
|
||||
digitalReceipt.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
digitalReceiptActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jReceiptPrintOff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jPickupSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jbtnReset, javax.swing.GroupLayout.PREFERRED_SIZE, 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(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jReceiptSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jTextReceiptPrefix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jTicketExample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addComponent(digitalReceipt))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jReceiptSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTextReceiptPrefix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jTicketExample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(m_jReceiptPrintOff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jPickupSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jbtnReset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(digitalReceipt)
|
||||
.addContainerGap(254, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jTextReceiptPrefixKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextReceiptPrefixKeyReleased
|
||||
|
||||
jTicketExample.setText(jTextReceiptPrefix.getText()+ receipt);
|
||||
}//GEN-LAST:event_jTextReceiptPrefixKeyReleased
|
||||
|
||||
private void jReceiptSizeStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jReceiptSizeStateChanged
|
||||
|
||||
receipt="";
|
||||
x=1;
|
||||
while (x < (Integer)jReceiptSize.getValue()){
|
||||
receipt += "0";
|
||||
x++;
|
||||
}
|
||||
receipt += "1";
|
||||
jTicketExample.setText(jTextReceiptPrefix.getText()+receipt);
|
||||
|
||||
}//GEN-LAST:event_jReceiptSizeStateChanged
|
||||
|
||||
private void jPickupSizeStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jPickupSizeStateChanged
|
||||
|
||||
}//GEN-LAST:event_jPickupSizeStateChanged
|
||||
|
||||
private void m_jReceiptPrintOffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jReceiptPrintOffActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_m_jReceiptPrintOffActionPerformed
|
||||
|
||||
private void jbtnResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnResetActionPerformed
|
||||
int response = JOptionPane.showOptionDialog(null,
|
||||
AppLocal.getIntString("message.resetpickup"),
|
||||
"Reset",
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE,
|
||||
null, null, null);
|
||||
if (response == JOptionPane.YES_OPTION) {
|
||||
try {
|
||||
|
||||
String db_url = (AppConfig.getInstance().getProperty("db.URL"));
|
||||
String db_schema = (AppConfig.getInstance().getProperty("db.schema"));
|
||||
String db_user =(AppConfig.getInstance().getProperty("db.user"));
|
||||
String db_password = (AppConfig.getInstance().getProperty("db.password"));
|
||||
|
||||
if (db_user != null && db_password != null && db_password.startsWith("crypt:")) {
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + db_user);
|
||||
db_password = cypher.decrypt(db_password.substring(6));
|
||||
}
|
||||
|
||||
String url = db_url + db_schema;
|
||||
|
||||
conn = DriverManager.getConnection(url,db_user,db_password);
|
||||
sdbmanager = conn.getMetaData().getDatabaseProductName();
|
||||
stmt = (Statement) conn.createStatement();
|
||||
|
||||
if ("MySQL".equals(sdbmanager)) {
|
||||
SQL = "UPDATE pickup_number SET id = 0";
|
||||
try {
|
||||
stmt.executeUpdate(SQL);
|
||||
} catch (SQLException e){
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
} else if ("PostgreSQL".equals(sdbmanager)) {
|
||||
SQL = "ALTER SEQUENCE pickup_number RESTART WITH 1";
|
||||
try {
|
||||
stmt.executeUpdate(SQL);
|
||||
} catch (SQLException e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) { log.error(ex.getMessage());
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_jbtnResetActionPerformed
|
||||
|
||||
private void digitalReceiptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_digitalReceiptActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_digitalReceiptActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JCheckBox digitalReceipt;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JSpinner jPickupSize;
|
||||
private javax.swing.JSpinner jReceiptSize;
|
||||
private javax.swing.JTextField jTextReceiptPrefix;
|
||||
private javax.swing.JTextField jTicketExample;
|
||||
private javax.swing.JButton jbtnReset;
|
||||
private javax.swing.JCheckBox m_jReceiptPrintOff;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class LocaleComparator implements Comparator<Locale> {
|
||||
|
||||
/** Creates a new instance of LocaleComparator */
|
||||
public LocaleComparator() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(Locale o1, Locale o2) {
|
||||
return o1.getDisplayName().compareTo(o2.getDisplayName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.pos.forms.AppConfig;
|
||||
import java.awt.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface PanelConfig {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
public void loadProperties(AppConfig config);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
public void saveProperties(AppConfig config);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean hasChanged();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getConfigComponent();
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.util.StringParser;
|
||||
import java.awt.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrian
|
||||
*/
|
||||
public interface ParametersConfig {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dirty
|
||||
*/
|
||||
public void addDirtyManager(DirtyManager dirty);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param p
|
||||
*/
|
||||
public void setParameters(StringParser p);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getParameters();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPrinters" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jReceiptPrinter" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jPrinters" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jReceiptPrinter" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="jPrinters">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jPrintersActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jReceiptPrinter">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.receiptprinter" replaceFormat="AppLocal.getIntString("label.receiptprinter")"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,149 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.config;
|
||||
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.util.StringParser;
|
||||
import java.awt.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrian
|
||||
*/
|
||||
public class ParametersPrinter extends javax.swing.JPanel implements ParametersConfig {
|
||||
|
||||
private String othersizename = "standard";
|
||||
|
||||
/** Creates new form ParametersPrinter
|
||||
* @param printernames */
|
||||
public ParametersPrinter(String [] printernames) {
|
||||
initComponents();
|
||||
|
||||
jPrinters.addItem("(Default)");
|
||||
jPrinters.addItem("(Show dialog)");
|
||||
for (String name : printernames) {
|
||||
jPrinters.addItem(name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dirty
|
||||
*/
|
||||
public void addDirtyManager(DirtyManager dirty) {
|
||||
jPrinters.addActionListener(dirty);
|
||||
jReceiptPrinter.addActionListener(dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param p
|
||||
*/
|
||||
public void setParameters(StringParser p) {
|
||||
jPrinters.setSelectedItem(p.nextToken(','));
|
||||
String sizename = p.nextToken(',');
|
||||
jReceiptPrinter.setSelected("receipt".equals(sizename));
|
||||
othersizename = "receipt".equals(sizename) ? "standard" : sizename;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getParameters() {
|
||||
return comboValue(jPrinters.getSelectedItem()) + "," + boolValue(jReceiptPrinter.isSelected());
|
||||
}
|
||||
|
||||
private static String comboValue(Object value) {
|
||||
return value == null ? "" : value.toString();
|
||||
}
|
||||
|
||||
private String boolValue(boolean value) {
|
||||
return value ? "receipt" : othersizename;
|
||||
}
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPrinters = new javax.swing.JComboBox();
|
||||
jReceiptPrinter = new javax.swing.JCheckBox();
|
||||
|
||||
setOpaque(false);
|
||||
|
||||
jPrinters.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jPrinters.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jPrinters.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jPrintersActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jReceiptPrinter.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jReceiptPrinter.setSelected(true);
|
||||
jReceiptPrinter.setText(AppLocal.getIntString("label.receiptprinter")); // NOI18N
|
||||
jReceiptPrinter.setOpaque(false);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jPrinters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jReceiptPrinter)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jPrinters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jReceiptPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jPrintersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPrintersActionPerformed
|
||||
|
||||
}//GEN-LAST:event_jPrintersActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JComboBox jPrinters;
|
||||
private javax.swing.JCheckBox jReceiptPrinter;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.pos.util.StringUtils;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.Serializable;
|
||||
|
||||
/** @author jack gerrard, adrianromero */
|
||||
|
||||
// JG 20 Sep 12 Extended for Postal
|
||||
// JG 2 Sep 13 Extended for Phone + Email
|
||||
public class CustomerInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9083257536541L;
|
||||
|
||||
protected String id;
|
||||
protected String searchkey;
|
||||
protected String taxid;
|
||||
protected String name;
|
||||
protected String postal;
|
||||
protected String phone;
|
||||
protected String email;
|
||||
protected BufferedImage image;
|
||||
protected Double curdebt;
|
||||
|
||||
|
||||
/** Creates a new instance of CustomerInfo
|
||||
* @param id */
|
||||
public CustomerInfo(String id) {
|
||||
this.id = id;
|
||||
this.searchkey = null;
|
||||
this.taxid = null;
|
||||
this.name = null;
|
||||
this.postal = null;
|
||||
this.phone = null;
|
||||
this.email = null;
|
||||
this.image = null;
|
||||
this.curdebt = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return id string
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return searchkey string
|
||||
*/
|
||||
public String getSearchkey() {
|
||||
return searchkey;
|
||||
}
|
||||
public void setSearchkey(String searchkey) {
|
||||
this.searchkey = searchkey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return taxid string
|
||||
*/
|
||||
public String getTaxid() {
|
||||
return taxid;
|
||||
}
|
||||
public void setTaxid(String taxid) {
|
||||
this.taxid = taxid;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return name string
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return postal/zip code string
|
||||
*/
|
||||
public String getPcode() {
|
||||
return postal;
|
||||
}
|
||||
public void setPcode(String postal) {
|
||||
this.postal = postal;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Primary Telephone string
|
||||
*/
|
||||
public String getPhone1() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone1(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return email string
|
||||
*/
|
||||
public String getCemail() {
|
||||
return email;
|
||||
}
|
||||
public void setCemail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String printName() {
|
||||
return StringUtils.encodeXML(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's photograph / image
|
||||
*/
|
||||
public BufferedImage getImage() {
|
||||
return image;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param img
|
||||
*/
|
||||
public void setImage(BufferedImage img) {
|
||||
image = img;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return name double
|
||||
*/
|
||||
public Double getCurDebt() {
|
||||
return curdebt;
|
||||
}
|
||||
public void setCurDebt(Double curdebt) {
|
||||
this.curdebt = curdebt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,467 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.util.RoundUtils;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class CustomerInfoExt extends CustomerInfo {
|
||||
|
||||
protected String taxcustomerid;
|
||||
protected String taxcustcategoryid;
|
||||
protected String card;
|
||||
protected Double maxdebt;
|
||||
protected String address;
|
||||
protected String address2;
|
||||
protected String pcode;
|
||||
protected String city;
|
||||
protected String region;
|
||||
protected String country;
|
||||
protected String firstname;
|
||||
protected String lastname;
|
||||
protected String cemail;
|
||||
protected String phone1;
|
||||
protected String phone2;
|
||||
protected String fax;
|
||||
protected String notes;
|
||||
protected boolean visible;
|
||||
protected Date curdate;
|
||||
protected Double accdebt;
|
||||
protected BufferedImage m_Image;
|
||||
protected boolean isvip;
|
||||
protected Double discount;
|
||||
protected String prepay;
|
||||
protected String memodate;
|
||||
|
||||
/** Creates a new instance of UserInfoBasic
|
||||
* @param id */
|
||||
public CustomerInfoExt(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's tax category
|
||||
*/
|
||||
public String getTaxCustCategoryID() {
|
||||
// return taxcustomerid;
|
||||
return taxcustcategoryid;
|
||||
}
|
||||
public void setTaxCustCategoryID(String taxcustcategoryid) {
|
||||
this.taxcustcategoryid = taxcustcategoryid;
|
||||
}
|
||||
|
||||
public String getTaxCustomerID() {
|
||||
return taxcustomerid;
|
||||
}
|
||||
public void setTaxCustomerID(String taxcustomerid) {
|
||||
this.taxcustomerid = taxcustomerid;
|
||||
}
|
||||
public String printTaxCustomerID() {
|
||||
return Formats.STRING.formatValue(taxcustomerid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTaxid() {
|
||||
return taxid;
|
||||
}
|
||||
@Override
|
||||
public void setTaxid(String taxid) {
|
||||
this.taxid = taxid;
|
||||
}
|
||||
public String printTaxid() {
|
||||
return Formats.STRING.formatValue(taxid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return notes string
|
||||
*/
|
||||
public String getNotes() {
|
||||
return notes;
|
||||
}
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Is visible Y/N? boolean
|
||||
*/
|
||||
public boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
public void setVisible(boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's hashed member/loyalty card string
|
||||
*/
|
||||
public String getCard() {
|
||||
return card;
|
||||
}
|
||||
public void setCard(String card) {
|
||||
this.card = card;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's maximum allowed debt value
|
||||
*/
|
||||
public Double getMaxdebt() {
|
||||
return maxdebt;
|
||||
}
|
||||
public void setMaxdebt(Double maxdebt) {
|
||||
this.maxdebt = maxdebt;
|
||||
}
|
||||
public String printMaxDebt() {
|
||||
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getMaxdebt()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's last ticket transaction date
|
||||
*/
|
||||
public Date getCurdate() {
|
||||
return curdate;
|
||||
}
|
||||
public void setCurdate(Date curdate) {
|
||||
this.curdate = curdate;
|
||||
}
|
||||
public String printCurDate() {
|
||||
return Formats.DATE.formatValue(getCurdate());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's current value of account
|
||||
*/
|
||||
public Double getAccdebt() {
|
||||
return accdebt;
|
||||
}
|
||||
public void setAccdebt(Double accdebt) {
|
||||
this.accdebt = accdebt;
|
||||
}
|
||||
public String printCurDebt() {
|
||||
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getAccdebt()));
|
||||
}
|
||||
|
||||
public String printCurBal() {
|
||||
String balance = null;
|
||||
|
||||
if (getMaxdebt() != null && getAccdebt() != null) {
|
||||
balance = Formats.CURRENCY.formatValue(RoundUtils.getValue(getMaxdebt() - getAccdebt()));
|
||||
}
|
||||
return balance;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return prepay string
|
||||
*/
|
||||
public String getPrePay() {
|
||||
return prepay;
|
||||
}
|
||||
public void setPrePay(String prepay) {
|
||||
this.prepay = prepay;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param amount
|
||||
* @param d
|
||||
*/
|
||||
public void updateCurDebt(Double amount, Date d) {
|
||||
|
||||
accdebt = accdebt == null ? amount : accdebt + amount;
|
||||
curdate = (new Date());
|
||||
|
||||
if (RoundUtils.compare(accdebt, 0.0) > 0) {
|
||||
if (curdate == null) {
|
||||
// new date
|
||||
curdate = d;
|
||||
}
|
||||
} else if (RoundUtils.compare(accdebt, 0.0) == 0) {
|
||||
accdebt = null;
|
||||
curdate = null;
|
||||
} else { // < 0
|
||||
// curdate = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's firstname string
|
||||
*/
|
||||
public String getFirstname() {
|
||||
return firstname;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param firstname
|
||||
*/
|
||||
public void setFirstname(String firstname) {
|
||||
this.firstname = firstname;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's lastname string
|
||||
*/
|
||||
public String getLastname() {
|
||||
return lastname;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lastname
|
||||
*/
|
||||
public void setLastname(String lastname) {
|
||||
this.lastname = lastname;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's cemail string
|
||||
*/
|
||||
@Override
|
||||
public String getCemail() {
|
||||
return cemail;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cemail
|
||||
*/
|
||||
@Override
|
||||
public void setCemail(String cemail) {
|
||||
this.cemail = cemail;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's Primary telephone string
|
||||
*/
|
||||
@Override
|
||||
public String getPhone1() {
|
||||
return phone1;
|
||||
}
|
||||
@Override
|
||||
public void setPhone1(String phone1) {
|
||||
this.phone1 = phone1;
|
||||
}
|
||||
public String printPhone1() {
|
||||
return Formats.STRING.formatValue(phone1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's Secondary telephone string
|
||||
*/
|
||||
public String getPhone2() {
|
||||
return phone2;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param phone2
|
||||
*/
|
||||
public void setPhone2(String phone2) {
|
||||
this.phone2 = phone2;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's fax number string
|
||||
*/
|
||||
public String getFax() {
|
||||
return fax;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fax
|
||||
*/
|
||||
public void setFax(String fax) {
|
||||
this.fax = fax;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's address line 1 string
|
||||
*/
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String printAddress() {
|
||||
return Formats.STRING.formatValue(address);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's address line 2 string
|
||||
*/
|
||||
public String getAddress2() {
|
||||
return address2;
|
||||
}
|
||||
public void setAddress2(String address2) {
|
||||
this.address2 = address2;
|
||||
}
|
||||
public String printAddress2() {
|
||||
return Formats.STRING.formatValue(address2);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's pcode/zip code string
|
||||
*/
|
||||
@Override
|
||||
public String getPcode() {
|
||||
return pcode;
|
||||
}
|
||||
@Override
|
||||
public void setPcode(String pcode) {
|
||||
this.pcode = pcode;
|
||||
}
|
||||
public String printPostal() {
|
||||
return Formats.STRING.formatValue(pcode);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's address city string
|
||||
*/
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param city
|
||||
*/
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's address region/state/county string
|
||||
*/
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param region
|
||||
*/
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's address country string
|
||||
*/
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param country
|
||||
*/
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's photograph / image
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage getImage() {
|
||||
return m_Image;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param img
|
||||
*/
|
||||
@Override
|
||||
public void setImage(BufferedImage img) {
|
||||
this.m_Image = img;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Is VIP Y/N? boolean
|
||||
*/
|
||||
public boolean isVIP() {
|
||||
return isvip;
|
||||
}
|
||||
public void setisVIP(boolean isvip) {
|
||||
this.isvip = isvip;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's discount allowed
|
||||
*/
|
||||
public Double getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
public void setDiscount(Double discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
public String printDiscount() {
|
||||
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getDiscount()));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return memo date string
|
||||
*/
|
||||
public String getMemoDate() {
|
||||
return memodate;
|
||||
}
|
||||
public void setMemoDate(String memodate) {
|
||||
this.memodate = memodate;
|
||||
}
|
||||
public String printMemoDate() {
|
||||
return Formats.STRING.formatValue(memodate);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
// For BrowseEditableData
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.data.user.BrowsableEditableData;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author HS uniCenta
|
||||
*/
|
||||
public class CustomerInfoGlobal {
|
||||
|
||||
private static CustomerInfoGlobal INSTANCE;
|
||||
private CustomerInfoExt customerInfoExt;
|
||||
private BrowsableEditableData editableData;
|
||||
|
||||
//Singleton class
|
||||
private CustomerInfoGlobal() {
|
||||
}
|
||||
|
||||
//Singleton constructor
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static CustomerInfoGlobal getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new CustomerInfoGlobal();
|
||||
}
|
||||
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public CustomerInfoExt getCustomerInfoExt() {
|
||||
return customerInfoExt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param customerInfoExt
|
||||
*/
|
||||
public void setCustomerInfoExt(CustomerInfoExt customerInfoExt) {
|
||||
this.customerInfoExt = customerInfoExt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public BrowsableEditableData getEditableData() {
|
||||
return editableData;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param editableData
|
||||
*/
|
||||
public void setEditableData(BrowsableEditableData editableData) {
|
||||
this.editableData = editableData;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import java.awt.Component;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class CustomerRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private final Icon icocustomer;
|
||||
|
||||
/** Creates a new instance of CustomerRenderer */
|
||||
public CustomerRenderer() {
|
||||
|
||||
icocustomer = new ImageIcon(getClass().getClassLoader().getResource("com/unicenta/images/customer_sml.png"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value,
|
||||
int index, boolean isSelected, boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
|
||||
|
||||
setIcon(icocustomer);
|
||||
setText(value.toString());
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.SerializerRead;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author JG uniCenta Gerrard 1 Nov 12
|
||||
* Used in Customer's transactions tab to display all this Customer's
|
||||
* ticketline values
|
||||
*/
|
||||
@Slf4j
|
||||
public class CustomerTransaction {
|
||||
|
||||
String ticketId;
|
||||
String productName;
|
||||
String unit;
|
||||
Double amount;
|
||||
Double total;
|
||||
Date transactionDate;
|
||||
String customerId;
|
||||
|
||||
/**
|
||||
* Main method to return all customer's transactions
|
||||
*/
|
||||
public CustomerTransaction() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ticketId
|
||||
* @param productName
|
||||
* @param unit
|
||||
* @param amount
|
||||
* @param total
|
||||
* @param transactionDate
|
||||
* @param cId
|
||||
*/
|
||||
public CustomerTransaction(String ticketId, String productName, String unit, Double amount, Double total, Date transactionDate, String cId) {
|
||||
this.ticketId = ticketId;
|
||||
this.productName = productName;
|
||||
this.unit = unit;
|
||||
this.amount = amount;
|
||||
this.total = total;
|
||||
this.transactionDate = transactionDate;
|
||||
// this.customerName = name;
|
||||
this.customerId = cId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticket id string
|
||||
*/
|
||||
public String getTicketId() {
|
||||
return ticketId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ticketId
|
||||
*/
|
||||
public void setTicketId(String ticketId) {
|
||||
this.ticketId = ticketId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticket amount value
|
||||
*/
|
||||
public Double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
*/
|
||||
public void setAmount(Double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param total
|
||||
*/
|
||||
public void setTotal(Double total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticketline value
|
||||
*/
|
||||
public Double getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticketline's product name string
|
||||
*/
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param productName
|
||||
*/
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticket's transaction date
|
||||
*/
|
||||
public Date getTransactionDate() {
|
||||
return transactionDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param transactionDate
|
||||
*/
|
||||
public void setTransactionDate(Date transactionDate) {
|
||||
this.transactionDate = transactionDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ticketline's quantity string value
|
||||
*/
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unit
|
||||
*/
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's account name string
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return customer's account name string
|
||||
*/
|
||||
public String getCustomerId() {
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return ticketlines for this customer
|
||||
*/
|
||||
public static SerializerRead getSerializerRead() {
|
||||
return new SerializerRead() {
|
||||
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
|
||||
String ticketId = dr.getString(1);
|
||||
String productName = dr.getString(2);
|
||||
String unit = dr.getString(3);
|
||||
Double amount = dr.getDouble(4);
|
||||
Double total = dr.getDouble(5);
|
||||
String dateValue = dr.getString(6);
|
||||
String customerId = dr.getString(7);
|
||||
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
Date date = null;
|
||||
try {
|
||||
date = formatter.parse(dateValue);
|
||||
} catch (ParseException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
return new CustomerTransaction(ticketId, productName, unit, amount, total, date, customerId);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class CustomersPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tcustomers;
|
||||
private CustomersView jeditor;
|
||||
|
||||
/** Creates a new instance of CustomersPanel */
|
||||
public CustomersPanel() {
|
||||
// CustomerInfoGlobal.getInstance().setEditableData(bd);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicCustomers dlCustomers = (DataLogicCustomers) app.getBean("com.unicenta.pos.customers.DataLogicCustomers");
|
||||
tcustomers = dlCustomers.getTableCustomers();
|
||||
jeditor = new CustomersView(app, dirty);
|
||||
// System.out.println(tcustomers.getListSQL());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
jeditor.activate();
|
||||
super.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tcustomers);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tcustomers, new int[] {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tcustomers.getVectorerBasic(new int[]{1, 2, 3, 4});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tcustomers.getComparatorCreator(new int[] {1, 2, 3, 4});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tcustomers.getRenderStringBasic(new int[]{3}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.CustomersManagement");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,572 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-88,0,0,2,-23"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Before"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="btnCustomer">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/customer_sml.png"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.customerpay.customer" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCustomerActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnSave">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/filesave.png"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tootltip.save" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSaveActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator1">
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnPay">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/pay.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.pay" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.customerpay.pay" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 44]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 44]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPayActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnPrePay">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/customer_add_sml.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.prepay" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.prepay" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 44]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 44]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPrePayActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorKeys" name="m_jKeys">
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jKeysActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="editorcard">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 14, 8, 14]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" pref="140" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="txtName" min="-2" pref="240" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel5" min="-2" pref="140" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="txtCard" min="-2" pref="240" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel7" min="-2" pref="140" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="txtTaxId" min="-2" pref="240" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel12" alignment="0" min="-2" pref="140" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" 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="txtPrePay" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtNotes" min="-2" pref="250" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="txtMaxdebt" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtCurdebt" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCurdate" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtTaxId" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCard" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtNotes" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPrePay" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtCurdebt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtMaxdebt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCurdate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.name" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel12">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.notes" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.card" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCard">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.maxdebt" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.curdebt" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCurdebt">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCurdate">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.curdate" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtName">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtMaxdebt">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="txtPrePay">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="cc" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.customerpay.prepay" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtTaxId">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.prepay" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="txtNotes">
|
||||
<Properties>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="tooltip.customerpay.notes" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<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="[250, 100]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,793 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.*;
|
||||
import com.unicenta.pos.payment.JPaymentSelect;
|
||||
import com.unicenta.pos.payment.JPaymentSelectCustomer;
|
||||
import com.unicenta.pos.payment.PaymentInfo;
|
||||
import com.unicenta.pos.payment.PaymentInfoTicket;
|
||||
import com.unicenta.pos.printer.TicketParser;
|
||||
import com.unicenta.pos.printer.TicketPrinterException;
|
||||
import com.unicenta.pos.scripting.ScriptEngine;
|
||||
import com.unicenta.pos.scripting.ScriptException;
|
||||
import com.unicenta.pos.scripting.ScriptFactory;
|
||||
import com.unicenta.pos.ticket.TicketInfo;
|
||||
import com.unicenta.pos.util.RoundUtils;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class CustomersPayment extends javax.swing.JPanel implements JPanelView, BeanFactoryApp {
|
||||
|
||||
private AppView app;
|
||||
private DataLogicCustomers dlcustomers;
|
||||
private DataLogicSales dlsales;
|
||||
private DataLogicSystem dlsystem;
|
||||
private TicketParser ttp;
|
||||
private JPaymentSelect paymentdialog;
|
||||
|
||||
private CustomerInfoExt customerext;
|
||||
private DirtyManager dirty;
|
||||
|
||||
/** Creates new form CustomersPayment */
|
||||
public CustomersPayment() {
|
||||
|
||||
initComponents();
|
||||
|
||||
editorcard.addEditorKeys(m_jKeys);
|
||||
txtNotes.addEditorKeys(m_jKeys);
|
||||
txtPrePay.addEditorKeys(m_jKeys);
|
||||
|
||||
dirty = new DirtyManager();
|
||||
txtNotes.addPropertyChangeListener("Text", dirty);
|
||||
txtPrePay.addPropertyChangeListener("Number", dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
@Override
|
||||
public void init(AppView app) throws BeanFactoryException {
|
||||
|
||||
this.app = app;
|
||||
dlcustomers = (DataLogicCustomers) app.getBean("com.unicenta.pos.customers.DataLogicCustomers");
|
||||
dlsales = (DataLogicSales) app.getBean("com.unicenta.pos.forms.DataLogicSales");
|
||||
dlsystem = (DataLogicSystem) app.getBean("com.unicenta.pos.forms.DataLogicSystem");
|
||||
ttp = new TicketParser(app.getDeviceTicket(), dlsystem);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getBean() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.CustomersPayment");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
|
||||
paymentdialog = JPaymentSelectCustomer.getDialog(this);
|
||||
paymentdialog.init(app);
|
||||
|
||||
resetCustomer();
|
||||
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
if (dirty.isDirty()) {
|
||||
int res = JOptionPane.showConfirmDialog(this, AppLocal.getIntString("message.wannasave"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_CANCEL_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
if (res == JOptionPane.YES_OPTION) {
|
||||
save();
|
||||
return true;
|
||||
} else {
|
||||
return res == JOptionPane.NO_OPTION;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
private void editCustomer(CustomerInfoExt customer) {
|
||||
|
||||
customerext = customer;
|
||||
|
||||
txtTaxId.setText(customer.getTaxid());
|
||||
txtName.setText(customer.getName());
|
||||
txtCard.setText(customer.getCard());
|
||||
txtNotes.reset();
|
||||
txtNotes.setText(customer.getNotes());
|
||||
txtMaxdebt.setText(Formats.CURRENCY.formatValue(customer.getMaxdebt()));
|
||||
txtCurdebt.setText(Formats.CURRENCY.formatValue(customer.getAccdebt()));
|
||||
txtCurdate.setText(Formats.DATE.formatValue(customer.getCurdate()));
|
||||
txtPrePay.setText(null);
|
||||
|
||||
txtNotes.setEnabled(true);
|
||||
txtPrePay.setEnabled(true);
|
||||
|
||||
dirty.setDirty(false);
|
||||
|
||||
btnSave.setEnabled(true);
|
||||
btnPay.setEnabled(true);
|
||||
btnPrePay.setEnabled(true);
|
||||
|
||||
// btnPay.setEnabled(customer.getCurdebt() != null && customer.getCurdebt().doubleValue() > 0.0);
|
||||
|
||||
}
|
||||
|
||||
private void resetCustomer() {
|
||||
|
||||
customerext = null;
|
||||
|
||||
txtTaxId.setText(null);
|
||||
txtName.setText(null);
|
||||
txtCard.setText(null);
|
||||
txtNotes.reset();
|
||||
txtMaxdebt.setText(null);
|
||||
txtCurdebt.setText(null);
|
||||
txtCurdate.setText(null);
|
||||
txtPrePay.setText(null);
|
||||
|
||||
txtNotes.setEnabled(false);
|
||||
txtPrePay.setEnabled(false);
|
||||
|
||||
dirty.setDirty(false);
|
||||
|
||||
btnSave.setEnabled(false);
|
||||
btnPay.setEnabled(false);
|
||||
btnPrePay.setEnabled(false);
|
||||
|
||||
}
|
||||
|
||||
private void readCustomer() {
|
||||
|
||||
try {
|
||||
CustomerInfoExt customer = dlsales.findCustomerExt(editorcard.getText());
|
||||
if (customer == null) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"));
|
||||
msg.show(this);
|
||||
} else {
|
||||
editCustomer(customer);
|
||||
}
|
||||
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
}
|
||||
|
||||
private void save() {
|
||||
|
||||
customerext.setNotes(txtNotes.getText());
|
||||
customerext.setPrePay(txtPrePay.getText());
|
||||
|
||||
try {
|
||||
dlcustomers.updateCustomerExt(customerext);
|
||||
editCustomer(customerext);
|
||||
} catch (BasicException e) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.nosave"), e);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void printTicket(String resname, TicketInfo ticket, CustomerInfoExt customer) {
|
||||
|
||||
String resource = dlsystem.getResourceAsXML(resname);
|
||||
if (resource == null) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintticket"));
|
||||
msg.show(this);
|
||||
} else {
|
||||
try {
|
||||
ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
|
||||
script.put("ticket", ticket);
|
||||
script.put("customer", customer);
|
||||
ttp.printTicket(script.eval(resource).toString());
|
||||
// JG 6 May use multicatch
|
||||
} catch ( ScriptException | TicketPrinterException e) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintticket"), e);
|
||||
msg.show(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
jPanel6 = new javax.swing.JPanel();
|
||||
btnCustomer = new javax.swing.JButton();
|
||||
btnSave = new javax.swing.JButton();
|
||||
jSeparator1 = new javax.swing.JSeparator();
|
||||
btnPay = new javax.swing.JButton();
|
||||
btnPrePay = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
m_jKeys = new com.unicenta.editor.JEditorKeys();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
editorcard = new com.unicenta.editor.JEditorString();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel12 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
txtCard = new javax.swing.JTextField();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
txtCurdebt = new javax.swing.JTextField();
|
||||
txtCurdate = new javax.swing.JTextField();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
txtName = new javax.swing.JTextField();
|
||||
txtMaxdebt = new javax.swing.JTextField();
|
||||
txtPrePay = new com.unicenta.editor.JEditorString();
|
||||
txtTaxId = new javax.swing.JTextField();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
txtNotes = new com.unicenta.editor.JEditorString();
|
||||
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
btnCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/customer_sml.png"))); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
btnCustomer.setToolTipText(bundle.getString("tooltip.customerpay.customer")); // NOI18N
|
||||
btnCustomer.setFocusPainted(false);
|
||||
btnCustomer.setFocusable(false);
|
||||
btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
btnCustomer.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
btnCustomer.setRequestFocusEnabled(false);
|
||||
btnCustomer.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnCustomerActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(btnCustomer);
|
||||
|
||||
btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/filesave.png"))); // NOI18N
|
||||
btnSave.setToolTipText(bundle.getString("tootltip.save")); // NOI18N
|
||||
btnSave.setFocusPainted(false);
|
||||
btnSave.setFocusable(false);
|
||||
btnSave.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
btnSave.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
btnSave.setRequestFocusEnabled(false);
|
||||
btnSave.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnSaveActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(btnSave);
|
||||
jPanel6.add(jSeparator1);
|
||||
|
||||
btnPay.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
btnPay.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/pay.png"))); // NOI18N
|
||||
btnPay.setText(AppLocal.getIntString("button.pay")); // NOI18N
|
||||
btnPay.setToolTipText(bundle.getString("tooltip.customerpay.pay")); // NOI18N
|
||||
btnPay.setFocusPainted(false);
|
||||
btnPay.setFocusable(false);
|
||||
btnPay.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
btnPay.setMaximumSize(new java.awt.Dimension(110, 44));
|
||||
btnPay.setMinimumSize(new java.awt.Dimension(110, 44));
|
||||
btnPay.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
btnPay.setRequestFocusEnabled(false);
|
||||
btnPay.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnPayActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(btnPay);
|
||||
|
||||
btnPrePay.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
btnPrePay.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/customer_add_sml.png"))); // NOI18N
|
||||
btnPrePay.setText(AppLocal.getIntString("button.prepay")); // NOI18N
|
||||
btnPrePay.setToolTipText(bundle.getString("tooltip.prepay")); // NOI18N
|
||||
btnPrePay.setFocusPainted(false);
|
||||
btnPrePay.setFocusable(false);
|
||||
btnPrePay.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
btnPrePay.setMaximumSize(new java.awt.Dimension(110, 44));
|
||||
btnPrePay.setMinimumSize(new java.awt.Dimension(110, 44));
|
||||
btnPrePay.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
btnPrePay.setRequestFocusEnabled(false);
|
||||
btnPrePay.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnPrePayActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(btnPrePay);
|
||||
|
||||
jPanel2.add(jPanel6, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
add(jPanel2, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));
|
||||
|
||||
m_jKeys.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jKeysActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel4.add(m_jKeys);
|
||||
|
||||
jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
jPanel5.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
editorcard.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
editorcard.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
jPanel5.add(editorcard, new java.awt.GridBagConstraints());
|
||||
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jButton1.setFocusPainted(false);
|
||||
jButton1.setFocusable(false);
|
||||
jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14));
|
||||
jButton1.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jButton1.setRequestFocusEnabled(false);
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
|
||||
jPanel5.add(jButton1, gridBagConstraints);
|
||||
|
||||
jPanel4.add(jPanel5);
|
||||
|
||||
jPanel3.add(jPanel4, java.awt.BorderLayout.NORTH);
|
||||
|
||||
add(jPanel3, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(AppLocal.getIntString("label.name")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel12.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel12.setText(AppLocal.getIntString("label.notes")); // NOI18N
|
||||
jLabel12.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel5.setText(AppLocal.getIntString("label.card")); // NOI18N
|
||||
jLabel5.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtCard.setEditable(false);
|
||||
txtCard.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtCard.setFocusable(false);
|
||||
txtCard.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
txtCard.setRequestFocusEnabled(false);
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel1.setText(AppLocal.getIntString("label.maxdebt")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel2.setText(AppLocal.getIntString("label.curdebt")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
|
||||
txtCurdebt.setEditable(false);
|
||||
txtCurdebt.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtCurdebt.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
|
||||
txtCurdebt.setFocusable(false);
|
||||
txtCurdebt.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
txtCurdebt.setRequestFocusEnabled(false);
|
||||
|
||||
txtCurdate.setEditable(false);
|
||||
txtCurdate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtCurdate.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
txtCurdate.setFocusable(false);
|
||||
txtCurdate.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
txtCurdate.setRequestFocusEnabled(false);
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel6.setText(AppLocal.getIntString("label.curdate")); // NOI18N
|
||||
jLabel6.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
|
||||
txtName.setEditable(false);
|
||||
txtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtName.setFocusable(false);
|
||||
txtName.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
txtName.setRequestFocusEnabled(false);
|
||||
|
||||
txtMaxdebt.setEditable(false);
|
||||
txtMaxdebt.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtMaxdebt.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
|
||||
txtMaxdebt.setFocusable(false);
|
||||
txtMaxdebt.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
txtMaxdebt.setRequestFocusEnabled(false);
|
||||
|
||||
txtPrePay.setForeground(new java.awt.Color(0, 204, 255));
|
||||
txtPrePay.setToolTipText(bundle.getString("tooltip.customerpay.prepay")); // NOI18N
|
||||
txtPrePay.setEnabled(false);
|
||||
txtPrePay.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
|
||||
txtPrePay.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
txtTaxId.setEditable(false);
|
||||
txtTaxId.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtTaxId.setFocusable(false);
|
||||
txtTaxId.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
txtTaxId.setRequestFocusEnabled(false);
|
||||
|
||||
jLabel7.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel7.setText(AppLocal.getIntString("label.taxid")); // NOI18N
|
||||
jLabel7.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel4.setText(AppLocal.getIntString("label.prepay")); // NOI18N
|
||||
jLabel4.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
|
||||
txtNotes.setToolTipText(bundle.getString("tooltip.customerpay.notes")); // NOI18N
|
||||
txtNotes.setEnabled(false);
|
||||
txtNotes.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtNotes.setPreferredSize(new java.awt.Dimension(250, 100));
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(txtCard, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(txtTaxId, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtPrePay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtNotes, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(txtMaxdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtCurdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtCurdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtTaxId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtNotes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPrePay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(30, 30, 30)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2, 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))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtCurdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtMaxdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtCurdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
add(jPanel1, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
|
||||
readCustomer();
|
||||
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
private void m_jKeysActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jKeysActionPerformed
|
||||
|
||||
readCustomer();
|
||||
|
||||
}//GEN-LAST:event_m_jKeysActionPerformed
|
||||
|
||||
private void btnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCustomerActionPerformed
|
||||
|
||||
JCustomerFinder finder = JCustomerFinder.getCustomerFinder(this, dlcustomers);
|
||||
finder.search(null);
|
||||
finder.setVisible(true);
|
||||
CustomerInfo customer = finder.getSelectedCustomer();
|
||||
if (customer != null) {
|
||||
try {
|
||||
CustomerInfoExt c = dlsales.loadCustomerExt(customer.getId());
|
||||
if (c == null) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"));
|
||||
msg.show(this);
|
||||
} else {
|
||||
editCustomer(c);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
}
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
|
||||
}//GEN-LAST:event_btnCustomerActionPerformed
|
||||
|
||||
private void btnPayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPayActionPerformed
|
||||
|
||||
paymentdialog.setPrintSelected(true);
|
||||
|
||||
if (paymentdialog.showDialog(customerext.getAccdebt(), null)) {
|
||||
|
||||
// Save the ticket
|
||||
TicketInfo ticket = new TicketInfo();
|
||||
ticket.setTicketType(TicketInfo.RECEIPT_PAYMENT);
|
||||
|
||||
List<PaymentInfo> payments = paymentdialog.getSelectedPayments();
|
||||
|
||||
double total = 0.0;
|
||||
for (PaymentInfo p : payments) {
|
||||
total += p.getTotal();
|
||||
}
|
||||
|
||||
payments.add(new PaymentInfoTicket(-total, "debtpaid"));
|
||||
|
||||
ticket.setPayments(payments);
|
||||
|
||||
ticket.setUser(app.getAppUserView().getUser().getUserInfo());
|
||||
ticket.setActiveCash(app.getActiveCashIndex());
|
||||
ticket.setDate(new Date());
|
||||
ticket.setCustomer(customerext);
|
||||
|
||||
try {
|
||||
dlsales.saveTicket(ticket, app.getInventoryLocation());
|
||||
} catch (BasicException eData) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.nosaveticket"), eData);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
|
||||
// reload customer
|
||||
CustomerInfoExt c;
|
||||
try {
|
||||
c = dlsales.loadCustomerExt(customerext.getId());
|
||||
if (c == null) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"));
|
||||
msg.show(this);
|
||||
} else {
|
||||
editCustomer(c);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
c = null;
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
printTicket(paymentdialog.isPrintSelected()
|
||||
? "Printer.CustomerPaid"
|
||||
: "Printer.CustomerPaid2",
|
||||
ticket, c);
|
||||
}
|
||||
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
|
||||
}//GEN-LAST:event_btnPayActionPerformed
|
||||
|
||||
private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
|
||||
|
||||
if (dirty.isDirty()) {
|
||||
save();
|
||||
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_btnSaveActionPerformed
|
||||
|
||||
private void btnPrePayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrePayActionPerformed
|
||||
|
||||
txtPrePay.setFocusable(true);
|
||||
txtPrePay.requestFocusInWindow();
|
||||
|
||||
if (txtPrePay.getText() != null) {
|
||||
double prepay = Double.parseDouble(txtPrePay.getText());
|
||||
Formats.CURRENCY.formatValue(RoundUtils.getValue(prepay));
|
||||
paymentdialog.setPrintSelected(true);
|
||||
|
||||
if (paymentdialog.showDialog(prepay, null)) {
|
||||
|
||||
TicketInfo ticket = new TicketInfo();
|
||||
ticket.setTicketType(TicketInfo.RECEIPT_PAYMENT);
|
||||
List<PaymentInfo> payments = paymentdialog.getSelectedPayments();
|
||||
|
||||
double total = 0.0;
|
||||
for (PaymentInfo p : payments) {
|
||||
total += p.getTotal();
|
||||
}
|
||||
|
||||
total = Double.parseDouble(txtPrePay.getText());
|
||||
|
||||
payments.add(new PaymentInfoTicket(-total, "debtpaid"));
|
||||
|
||||
ticket.setPayments(payments);
|
||||
|
||||
ticket.setUser(app.getAppUserView().getUser().getUserInfo());
|
||||
ticket.setActiveCash(app.getActiveCashIndex());
|
||||
ticket.setDate(new Date());
|
||||
ticket.setCustomer(customerext);
|
||||
|
||||
try {
|
||||
dlsales.saveTicket(ticket, app.getInventoryLocation());
|
||||
} catch (BasicException eData) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.nosaveticket"), eData);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
CustomerInfoExt c;
|
||||
try {
|
||||
c = dlsales.loadCustomerExt(customerext.getId());
|
||||
if (c == null) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"));
|
||||
msg.show(this);
|
||||
} else {
|
||||
editCustomer(c);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
c = null;
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
printTicket(paymentdialog.isPrintSelected()
|
||||
? "Printer.CustomerPaid"
|
||||
: "Printer.CustomerPaid2",
|
||||
ticket, c);
|
||||
}
|
||||
|
||||
editorcard.reset();
|
||||
editorcard.activate();
|
||||
}
|
||||
}//GEN-LAST:event_btnPrePayActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnCustomer;
|
||||
private javax.swing.JButton btnPay;
|
||||
private javax.swing.JButton btnPrePay;
|
||||
private javax.swing.JButton btnSave;
|
||||
private com.unicenta.editor.JEditorString editorcard;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel12;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JSeparator jSeparator1;
|
||||
private com.unicenta.editor.JEditorKeys m_jKeys;
|
||||
private javax.swing.JTextField txtCard;
|
||||
private javax.swing.JTextField txtCurdate;
|
||||
private javax.swing.JTextField txtCurdebt;
|
||||
private javax.swing.JTextField txtMaxdebt;
|
||||
private javax.swing.JTextField txtName;
|
||||
private com.unicenta.editor.JEditorString txtNotes;
|
||||
private com.unicenta.editor.JEditorString txtPrePay;
|
||||
private javax.swing.JTextField txtTaxId;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,381 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.*;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.BeanFactoryDataSingle;
|
||||
import com.unicenta.pos.voucher.VoucherInfo;
|
||||
|
||||
/**
|
||||
* @author JG uniCenta
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class DataLogicCustomers extends BeanFactoryDataSingle {
|
||||
|
||||
/**
|
||||
* Main Method for customer object
|
||||
*/
|
||||
protected Session s;
|
||||
private TableDefinition tcustomers;
|
||||
private static final Datas[] customerdatas = new Datas[] {
|
||||
Datas.STRING,
|
||||
Datas.TIMESTAMP,
|
||||
Datas.TIMESTAMP,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.INT,
|
||||
Datas.BOOLEAN,
|
||||
Datas.STRING};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
*/
|
||||
@Override
|
||||
public void init(Session s){
|
||||
// JG 03 Oct - Added Customer Image
|
||||
this.s = s;
|
||||
tcustomers = new TableDefinition(s
|
||||
, "customers"
|
||||
, new String[] {
|
||||
"ID",
|
||||
"SEARCHKEY",
|
||||
"TAXID",
|
||||
"NAME",
|
||||
"TAXCATEGORY",
|
||||
"CARD",
|
||||
"MAXDEBT",
|
||||
"ADDRESS",
|
||||
"ADDRESS2",
|
||||
"POSTAL",
|
||||
"CITY",
|
||||
"REGION",
|
||||
"COUNTRY",
|
||||
"FIRSTNAME",
|
||||
"LASTNAME",
|
||||
"EMAIL",
|
||||
"PHONE",
|
||||
"PHONE2",
|
||||
"FAX",
|
||||
"NOTES",
|
||||
"VISIBLE",
|
||||
"CURDATE",
|
||||
"CURDEBT",
|
||||
"IMAGE",
|
||||
"ISVIP",
|
||||
"DISCOUNT",
|
||||
"MEMODATE"
|
||||
}
|
||||
, new String[] {
|
||||
"ID",
|
||||
AppLocal.getIntString("label.searchkey"),
|
||||
AppLocal.getIntString("label.taxid"),
|
||||
AppLocal.getIntString("label.name"),
|
||||
"TAXCATEGORY",
|
||||
"CARD",
|
||||
AppLocal.getIntString("label.maxdebt"),
|
||||
AppLocal.getIntString("label.address"),
|
||||
AppLocal.getIntString("label.address2"),
|
||||
AppLocal.getIntString("label.postal"),
|
||||
AppLocal.getIntString("label.city"),
|
||||
AppLocal.getIntString("label.region"),
|
||||
AppLocal.getIntString("label.country"),
|
||||
AppLocal.getIntString("label.firstname"),
|
||||
AppLocal.getIntString("label.lastname"),
|
||||
AppLocal.getIntString("label.email"),
|
||||
AppLocal.getIntString("label.phone"),
|
||||
AppLocal.getIntString("label.phone2"),
|
||||
AppLocal.getIntString("label.fax"),
|
||||
AppLocal.getIntString("label.notes"),
|
||||
"VISIBLE",
|
||||
AppLocal.getIntString("label.curdate"),
|
||||
AppLocal.getIntString("label.curdebt"),
|
||||
"IMAGE",
|
||||
"ISVIP",
|
||||
"DISCOUNT",
|
||||
"MEMODATE"
|
||||
}
|
||||
, new Datas[] {
|
||||
Datas.STRING, //id
|
||||
Datas.STRING, //searchkey
|
||||
Datas.STRING, //taxid
|
||||
Datas.STRING, //name
|
||||
Datas.STRING, //taxcat
|
||||
Datas.STRING, //card
|
||||
Datas.DOUBLE, //maxdebt
|
||||
Datas.STRING, //add
|
||||
Datas.STRING, //add2
|
||||
Datas.STRING, //postal
|
||||
Datas.STRING, //city
|
||||
Datas.STRING, //region
|
||||
Datas.STRING, //cntry
|
||||
Datas.STRING, //fname
|
||||
Datas.STRING, //lname
|
||||
Datas.STRING, //email
|
||||
Datas.STRING, //phone
|
||||
Datas.STRING, //phone2
|
||||
Datas.STRING, //fax
|
||||
Datas.STRING, //notes
|
||||
Datas.BOOLEAN, //visible
|
||||
Datas.TIMESTAMP, //curdate
|
||||
Datas.DOUBLE, //curdebt
|
||||
Datas.IMAGE, //image
|
||||
Datas.BOOLEAN, //isvip
|
||||
Datas.DOUBLE, //discount
|
||||
Datas.TIMESTAMP //memodate
|
||||
}
|
||||
, new Formats[] {
|
||||
Formats.STRING, //id
|
||||
Formats.STRING, //searchkey
|
||||
Formats.STRING, //taxid
|
||||
Formats.STRING, //name
|
||||
Formats.STRING, //taxcat
|
||||
Formats.STRING, //card
|
||||
Formats.CURRENCY, //maxdebt
|
||||
Formats.STRING, //add
|
||||
Formats.STRING, //add2
|
||||
Formats.STRING, //postal
|
||||
Formats.STRING, //city
|
||||
Formats.STRING, //region
|
||||
Formats.STRING, //cntry
|
||||
Formats.STRING, //fname
|
||||
Formats.STRING, //lname
|
||||
Formats.STRING, //email
|
||||
Formats.STRING, //phone
|
||||
Formats.STRING, //phone2
|
||||
Formats.STRING, //fax
|
||||
Formats.STRING, //notes
|
||||
Formats.BOOLEAN, //visible
|
||||
Formats.TIMESTAMP, //curdate
|
||||
Formats.CURRENCY, //curdebt
|
||||
Formats.NULL, //image
|
||||
Formats.BOOLEAN, //isvip
|
||||
Formats.DOUBLE, //discount
|
||||
Formats.TIMESTAMP //memodate
|
||||
}
|
||||
, new int[] {0}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* called from Find Customer
|
||||
* @return customer data
|
||||
*/
|
||||
public SentenceList getCustomerList() {
|
||||
return new StaticSentence(s
|
||||
, new QBFBuilder("SELECT "
|
||||
+ "ID, TAXID, SEARCHKEY, NAME, "
|
||||
+ "POSTAL, EMAIL, PHONE, IMAGE "
|
||||
+ "FROM customers "
|
||||
+ "WHERE VISIBLE = " + s.DB.TRUE() + " AND ?(QBF_FILTER) ORDER BY NAME"
|
||||
, new String[] {"TAXID", "SEARCHKEY", "NAME", "POSTAL", "PHONE", "EMAIL"})
|
||||
, new SerializerWriteBasic(new Datas[] {
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING})
|
||||
, (DataRead dr) -> {
|
||||
CustomerInfo c = new CustomerInfo(dr.getString(1));
|
||||
c.setTaxid(dr.getString(2));
|
||||
c.setSearchkey(dr.getString(3));
|
||||
c.setName(dr.getString(4));
|
||||
c.setPcode(dr.getString(5));
|
||||
c.setPhone1(dr.getString(6));
|
||||
c.setCemail(dr.getString(7));
|
||||
c.setImage(ImageUtils.readImage(dr.getBytes(8)));
|
||||
// c.setCurDebt(dr.getDouble(9));
|
||||
|
||||
return c;
|
||||
});
|
||||
}
|
||||
|
||||
public final CustomerInfo getCustomerInfo(String id) throws BasicException {
|
||||
return (CustomerInfo) new PreparedSentence(s
|
||||
,"SELECT " +
|
||||
"ID, TAXID, SEARCHKEY, NAME, POSTAL " +
|
||||
"FROM customers WHERE VISIBLE = " + s.DB.TRUE() + " " +
|
||||
"AND ID = ?"
|
||||
, SerializerWriteString.INSTANCE , (DataRead dr) -> {
|
||||
CustomerInfo c = new CustomerInfo(dr.getString(1));
|
||||
c.setTaxid(dr.getString(2));
|
||||
c.setSearchkey(dr.getString(3));
|
||||
c.setName(dr.getString(4));
|
||||
c.setPcode(dr.getString(5));
|
||||
// c.setisVip(dr.getBoolean(6));
|
||||
// c.setDiscount(dr.getDouble(7));
|
||||
return c;
|
||||
}).find(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param customer
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public int updateCustomerExt(final CustomerInfoExt customer) throws BasicException {
|
||||
|
||||
return new PreparedSentence(s
|
||||
, "UPDATE customers SET NOTES = ? WHERE ID = ?"
|
||||
, SerializerWriteParams.INSTANCE
|
||||
).exec(new DataParams() {@Override
|
||||
public void writeValues() throws BasicException {
|
||||
setString(1, customer.getNotes());
|
||||
setString(2, customer.getId());
|
||||
}});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer's existing reservation (restaurant mode)
|
||||
*/
|
||||
public final SentenceList getReservationsList() {
|
||||
return new PreparedSentence(s
|
||||
, "SELECT R.ID, R.CREATED, R.DATENEW, C.CUSTOMER, customers.TAXID, customers.SEARCHKEY, COALESCE(customers.NAME, R.TITLE), R.CHAIRS, R.ISDONE, R.DESCRIPTION " +
|
||||
"FROM reservations R LEFT OUTER JOIN reservation_customers C ON R.ID = C.ID LEFT OUTER JOIN customers ON C.CUSTOMER = customers.ID " +
|
||||
"WHERE R.DATENEW >= ? AND R.DATENEW < ?"
|
||||
, new SerializerWriteBasic(new Datas[] {Datas.TIMESTAMP, Datas.TIMESTAMP})
|
||||
, new SerializerReadBasic(customerdatas));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return create/update customer reservation (restaurant mode)
|
||||
*/
|
||||
public final SentenceExec getReservationsUpdate() {
|
||||
return new SentenceExecTransaction(s) {
|
||||
@Override
|
||||
public int execInTransaction(Object params) throws BasicException {
|
||||
|
||||
new PreparedSentence(s
|
||||
, "DELETE FROM reservation_customers WHERE ID = ?"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0})).exec(params);
|
||||
if (((Object[]) params)[3] != null) {
|
||||
new PreparedSentence(s
|
||||
, "INSERT INTO reservation_customers (ID, CUSTOMER) VALUES (?, ?)"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0, 3})).exec(params);
|
||||
}
|
||||
return new PreparedSentence(s
|
||||
, "UPDATE reservations SET ID = ?, CREATED = ?, DATENEW = ?, TITLE = ?, CHAIRS = ?, ISDONE = ?, DESCRIPTION = ? WHERE ID = ?"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0, 1, 2, 6, 7, 8, 9, 0})).exec(params);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return delete customer reservation (restaurant mode)
|
||||
*/
|
||||
public final SentenceExec getReservationsDelete() {
|
||||
return new SentenceExecTransaction(s) {
|
||||
@Override
|
||||
public int execInTransaction(Object params) throws BasicException {
|
||||
|
||||
new PreparedSentence(s
|
||||
, "DELETE FROM reservation_customers WHERE ID = ?"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0})).exec(params);
|
||||
return new PreparedSentence(s
|
||||
, "DELETE FROM reservations WHERE ID = ?"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0})).exec(params);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return insert a new customer reservation (restaurant mode)
|
||||
*/
|
||||
public final SentenceExec getReservationsInsert() {
|
||||
return new SentenceExecTransaction(s) {
|
||||
@Override
|
||||
public int execInTransaction(Object params) throws BasicException {
|
||||
|
||||
int i = new PreparedSentence(s
|
||||
, "INSERT INTO reservations (ID, CREATED, DATENEW, TITLE, CHAIRS, ISDONE, DESCRIPTION) VALUES (?, ?, ?, ?, ?, ?, ?)"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0, 1, 2, 6, 7, 8, 9})).exec(params);
|
||||
|
||||
if (((Object[]) params)[3] != null) {
|
||||
new PreparedSentence(s
|
||||
, "INSERT INTO reservation_customers (ID, CUSTOMER) VALUES (?, ?)"
|
||||
, new SerializerWriteBasicExt(customerdatas, new int[]{0, 3})).exec(params);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return customer table
|
||||
*/
|
||||
public final TableDefinition getTableCustomers() {
|
||||
return tcustomers;
|
||||
}
|
||||
|
||||
public final PreparedSentence getVoucherNumber() {
|
||||
return new PreparedSentence(s,
|
||||
"SELECT SUBSTRING(MAX(VOUCHER_NUMBER),10,3) AS LAST_NUMBER FROM vouchers " +
|
||||
"WHERE SUBSTRING(VOUCHER_NUMBER,1,8) = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, (DataRead dr) -> dr.getString(1));
|
||||
}
|
||||
|
||||
|
||||
/* public final VoucherInfo getVoucherInfo(String id) throws BasicException {
|
||||
return (VoucherInfo) new PreparedSentence(s
|
||||
, "SELECT vouchers.ID, VOUCHER_NUMBER, CUSTOMER, " +
|
||||
"customers.NAME, AMOUNT, STATUS " +
|
||||
"FROM vouchers " +
|
||||
"JOIN customers ON customers.id = vouchers.CUSTOMER " +
|
||||
"WHERE STATUS='A' AND vouchers.ID=?"
|
||||
// "WHERE STATUS='A' "
|
||||
, SerializerWriteString.INSTANCE
|
||||
, VoucherInfo.getSerializerRead()).find(id);
|
||||
}
|
||||
*/
|
||||
|
||||
public final VoucherInfo getVoucherInfo(String id) throws BasicException {
|
||||
return (VoucherInfo) new PreparedSentence(s
|
||||
, "SELECT vouchers.ID, VOUCHER_NUMBER, CUSTOMER, AMOUNT, STATUS " +
|
||||
"FROM vouchers " +
|
||||
"WHERE STATUS='A' AND vouchers.ID=?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, VoucherInfo.getSerializerRead()).find(id);
|
||||
}
|
||||
|
||||
public final VoucherInfo getVoucherInfoAll(String id) throws BasicException {
|
||||
return (VoucherInfo) new PreparedSentence(s
|
||||
, "SELECT vouchers.ID, VOUCHER_NUMBER, CUSTOMER, " +
|
||||
"customers.NAME, AMOUNT, STATUS " +
|
||||
"FROM vouchers " +
|
||||
"JOIN customers ON customers.id = vouchers.CUSTOMER " +
|
||||
"WHERE vouchers.ID=?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, VoucherInfo.getSerializerRead()).find(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,551 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="form.customertitle" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[750, 600]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,122,0,0,2,-10"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Properties>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorKeys" name="m_jKeys">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_m_jKeys"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel8">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Last"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jcmdCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jcmdOK">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="com.unicenta.data.gui.JImageViewerCustomer" name="jImageViewerCustomer">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[450, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblPostal" 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="m_jtxtSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtPostal" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtTaxID" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jLblEmail" max="-2" attributes="0"/>
|
||||
<Component id="jLblPhone" alignment="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtPhone" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblTaxID" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblPostal" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtPostal" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtPhone" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblPhone" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblEmail" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLblTaxID">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtTaxID">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblSearchKey">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.searchkey" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtSearchKey">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblPostal">
|
||||
<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="Postal"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_jLblPostal"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtPostal">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_m_jtxtPostal"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.prodname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName">
|
||||
<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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblPhone">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.companytelephone" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblEmail">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.companyemail" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtPhone">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[450, 140]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 147]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JList" name="jListCustomers">
|
||||
<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.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jListCustomersMouseClicked"/>
|
||||
<EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="jListCustomersValueChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jbtnReset">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/reload.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.reset" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Clear Filter"/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="Reset "/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnResetActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnExecute">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.executefilter" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Execute Filter"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnExecuteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,699 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.QBFCompareEnum;
|
||||
import com.unicenta.data.user.EditorCreator;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.event.KeyEvent; //Jack
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JCustomerFinder extends javax.swing.JDialog implements EditorCreator {
|
||||
|
||||
private CustomerInfo m_ReturnCustomer;
|
||||
private ListProvider lpr;
|
||||
private AppView appView;
|
||||
|
||||
public class Global {
|
||||
// public static String s = "(new SearchKey)";
|
||||
// public static String n = m_jtxtName;
|
||||
|
||||
}
|
||||
|
||||
/* Keyboard Events
|
||||
*/
|
||||
|
||||
public void searchKey() {
|
||||
jbtnExecute.setMnemonic(KeyEvent.VK_E); // Jack
|
||||
executeSearch();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void resetKey() {
|
||||
jbtnReset.setMnemonic(KeyEvent.VK_R); // Jack
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
|
||||
}
|
||||
|
||||
public void setAppView(AppView appView) {
|
||||
this.appView = appView;
|
||||
}
|
||||
|
||||
/** Creates new form JCustomerFinder */
|
||||
private JCustomerFinder(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new form JCustomerFinder
|
||||
*/
|
||||
private JCustomerFinder(java.awt.Dialog parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param dlCustomers
|
||||
* @return
|
||||
*/
|
||||
public static JCustomerFinder getCustomerFinder(Component parent, DataLogicCustomers dlCustomers) {
|
||||
Window window = getWindow(parent);
|
||||
|
||||
JCustomerFinder myMsg;
|
||||
if (window instanceof Frame) {
|
||||
myMsg = new JCustomerFinder((Frame) window, true);
|
||||
} else {
|
||||
myMsg = new JCustomerFinder((Dialog) window, true);
|
||||
}
|
||||
myMsg.init(dlCustomers);
|
||||
myMsg.applyComponentOrientation(parent.getComponentOrientation());
|
||||
|
||||
return myMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public CustomerInfo getSelectedCustomer() {
|
||||
return m_ReturnCustomer;
|
||||
}
|
||||
|
||||
private void init(DataLogicCustomers dlCustomers) {
|
||||
|
||||
initComponents();
|
||||
|
||||
jScrollPane1.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
|
||||
m_jtxtTaxID.addEditorKeys(m_jKeys);
|
||||
m_jtxtSearchKey.addEditorKeys(m_jKeys);
|
||||
m_jtxtName.addEditorKeys(m_jKeys);
|
||||
m_jtxtPostal.addEditorKeys(m_jKeys);
|
||||
m_jtxtPhone.addEditorKeys(m_jKeys);
|
||||
m_jtxtName2.addEditorKeys(m_jKeys);
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
lpr = new ListProviderCreator(dlCustomers.getCustomerList(), this);
|
||||
|
||||
jListCustomers.setCellRenderer(new CustomerRenderer());
|
||||
|
||||
getRootPane().setDefaultButton(jcmdOK);
|
||||
|
||||
m_ReturnCustomer = null;
|
||||
m_jKeys.setCustomerFinder(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param customer
|
||||
*/
|
||||
public void search(CustomerInfo customer) {
|
||||
|
||||
if (customer == null || customer.getName() == null || customer.getName().equals("")) {
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
} else {
|
||||
|
||||
m_jtxtTaxID.setText(customer.getTaxid());
|
||||
m_jtxtSearchKey.setText(customer.getSearchkey());
|
||||
m_jtxtName.setText(customer.getName());
|
||||
m_jtxtPostal.setText(customer.getPcode());
|
||||
m_jtxtPhone.setText(customer.getPhone1());
|
||||
m_jtxtName2.setText(customer.getCemail());
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
executeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanSearch() {
|
||||
m_jtxtTaxID.setText("");
|
||||
m_jtxtSearchKey.setText("");
|
||||
m_jtxtName.setText("");
|
||||
m_jtxtPostal.setText("");
|
||||
m_jtxtPhone.setText("");
|
||||
m_jtxtName2.setText("");
|
||||
|
||||
jListCustomers.setModel(new MyListData(new ArrayList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method actions the customer data search
|
||||
*/
|
||||
public void executeSearch() {
|
||||
|
||||
try {
|
||||
jListCustomers.setModel(new MyListData(lpr.loadData()));
|
||||
if (jListCustomers.getModel().getSize() > 0) {
|
||||
jListCustomers.setSelectedIndex(0);
|
||||
} else {
|
||||
if(!m_jtxtName.getText().equals("")) {
|
||||
|
||||
int n = JOptionPane.showConfirmDialog(
|
||||
null,
|
||||
AppLocal.getIntString("message.customernotfound"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if (n != 1) {
|
||||
CustomerInfoGlobal customerInfoGlobal = CustomerInfoGlobal.getInstance();
|
||||
CustomerInfoExt customerInfoExt = customerInfoGlobal.getCustomerInfoExt();
|
||||
this.setVisible(false);
|
||||
appView.getAppUserView().showTask("com.unicenta.pos.customers.CustomersPanel");
|
||||
JOptionPane.showMessageDialog(null,
|
||||
"You must complete Account and Search Key Then Save to add to Ticket",
|
||||
"Create Customer",JOptionPane.OK_OPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (BasicException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return creates object for search method
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
|
||||
Object[] afilter = new Object[12];
|
||||
|
||||
// TaxID
|
||||
if (m_jtxtTaxID.getText() == null || m_jtxtTaxID.getText().equals("")) {
|
||||
afilter[0] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[1] = null;
|
||||
} else {
|
||||
afilter[0] = QBFCompareEnum.COMP_RE;
|
||||
afilter[1] = "%" + m_jtxtTaxID.getText() + "%";
|
||||
}
|
||||
|
||||
// SearchKey
|
||||
if (m_jtxtSearchKey.getText() == null || m_jtxtSearchKey.getText().equals("")) {
|
||||
afilter[2] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[3] = null;
|
||||
} else {
|
||||
afilter[2] = QBFCompareEnum.COMP_RE;
|
||||
afilter[3] = "%" + m_jtxtSearchKey.getText() + "%";
|
||||
}
|
||||
|
||||
// Name
|
||||
if (m_jtxtName.getText() == null || m_jtxtName.getText().equals("")) {
|
||||
afilter[4] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[5] = null;
|
||||
} else {
|
||||
afilter[4] = QBFCompareEnum.COMP_RE;
|
||||
afilter[5] = "%" + m_jtxtName.getText() + "%";
|
||||
}
|
||||
|
||||
// Added JG 20 Sept 12
|
||||
// Postal
|
||||
if (m_jtxtPostal.getText() == null || m_jtxtPostal.getText().equals("")) {
|
||||
afilter[6] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[7] = null;
|
||||
} else {
|
||||
afilter[6] = QBFCompareEnum.COMP_RE;
|
||||
afilter[7] = "%" + m_jtxtPostal.getText() + "%";
|
||||
}
|
||||
|
||||
// Added JG 20 Sept 12
|
||||
// Phone
|
||||
if (m_jtxtPhone.getText() == null || m_jtxtPhone.getText().equals("")) {
|
||||
afilter[8] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[9] = null;
|
||||
} else {
|
||||
afilter[8] = QBFCompareEnum.COMP_RE;
|
||||
afilter[9] = "%" + m_jtxtPhone.getText() + "%";
|
||||
}
|
||||
|
||||
// Added JG 20 Sept 12
|
||||
// Email
|
||||
if (m_jtxtName2.getText() == null || m_jtxtName2.getText().equals("")) {
|
||||
afilter[10] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[11] = null;
|
||||
} else {
|
||||
afilter[10] = QBFCompareEnum.COMP_RE;
|
||||
afilter[11] = "%" + m_jtxtName2.getText() + "%";
|
||||
}
|
||||
|
||||
return afilter;
|
||||
}
|
||||
|
||||
private static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window) parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyListData extends javax.swing.AbstractListModel {
|
||||
|
||||
private final java.util.List m_data;
|
||||
|
||||
public MyListData(java.util.List data) {
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
return m_data.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return m_data.size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jKeys = new com.unicenta.editor.JEditorKeys();
|
||||
jPanel8 = new javax.swing.JPanel();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jcmdCancel = new javax.swing.JButton();
|
||||
jcmdOK = new javax.swing.JButton();
|
||||
jImageViewerCustomer = new com.unicenta.data.gui.JImageViewerCustomer();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
jPanel7 = new javax.swing.JPanel();
|
||||
jLblTaxID = new javax.swing.JLabel();
|
||||
m_jtxtTaxID = new com.unicenta.editor.JEditorString();
|
||||
jLblSearchKey = new javax.swing.JLabel();
|
||||
m_jtxtSearchKey = new com.unicenta.editor.JEditorString();
|
||||
jLblPostal = new javax.swing.JLabel();
|
||||
m_jtxtPostal = new com.unicenta.editor.JEditorString();
|
||||
jLblName = new javax.swing.JLabel();
|
||||
m_jtxtName = new com.unicenta.editor.JEditorString();
|
||||
jLblPhone = new javax.swing.JLabel();
|
||||
jLblEmail = new javax.swing.JLabel();
|
||||
m_jtxtPhone = new com.unicenta.editor.JEditorString();
|
||||
m_jtxtName2 = new com.unicenta.editor.JEditorString();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jListCustomers = new javax.swing.JList();
|
||||
jPanel6 = new javax.swing.JPanel();
|
||||
jbtnReset = new javax.swing.JButton();
|
||||
jbtnExecute = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("form.customertitle")); // NOI18N
|
||||
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
setPreferredSize(new java.awt.Dimension(750, 600));
|
||||
|
||||
jPanel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);
|
||||
|
||||
jPanel8.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
jcmdCancel.setText(AppLocal.getIntString("button.Cancel")); // NOI18N
|
||||
jcmdCancel.setFocusPainted(false);
|
||||
jcmdCancel.setFocusable(false);
|
||||
jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdCancel.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdCancel.setRequestFocusEnabled(false);
|
||||
jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdCancel);
|
||||
|
||||
jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jcmdOK.setText(AppLocal.getIntString("button.OK")); // NOI18N
|
||||
jcmdOK.setEnabled(false);
|
||||
jcmdOK.setFocusPainted(false);
|
||||
jcmdOK.setFocusable(false);
|
||||
jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdOK.setMaximumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setMinimumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdOK.setRequestFocusEnabled(false);
|
||||
jcmdOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdOK);
|
||||
|
||||
jPanel8.add(jPanel1, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel2.add(jPanel8, java.awt.BorderLayout.PAGE_END);
|
||||
jPanel2.add(jImageViewerCustomer, java.awt.BorderLayout.CENTER);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel3.setPreferredSize(new java.awt.Dimension(450, 0));
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel5.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jLblTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTaxID.setText(AppLocal.getIntString("label.taxid")); // NOI18N
|
||||
jLblTaxID.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblTaxID.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblTaxID.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtTaxID.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblSearchKey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblSearchKey.setText(AppLocal.getIntString("label.searchkey")); // NOI18N
|
||||
jLblSearchKey.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblSearchKey.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblSearchKey.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtSearchKey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtSearchKey.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblPostal.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblPostal.setText("Postal");
|
||||
jLblPostal.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblPostal.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblPostal.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtPostal.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtPostal.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblName.setText(AppLocal.getIntString("label.prodname")); // NOI18N
|
||||
jLblName.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtName.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLblPhone.setText(bundle.getString("label.companytelephone")); // NOI18N
|
||||
jLblPhone.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLblEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblEmail.setText(bundle.getString("label.companyemail")); // NOI18N
|
||||
jLblEmail.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtPhone.setMinimumSize(new java.awt.Dimension(150, 30));
|
||||
m_jtxtPhone.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
m_jtxtName2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtName2.setMinimumSize(new java.awt.Dimension(150, 30));
|
||||
m_jtxtName2.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
||||
jPanel7.setLayout(jPanel7Layout);
|
||||
jPanel7Layout.setHorizontalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPhone, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel7Layout.setVerticalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
m_jtxtName.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
jPanel4.setPreferredSize(new java.awt.Dimension(450, 140));
|
||||
jPanel4.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(400, 147));
|
||||
|
||||
jListCustomers.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jListCustomers.setFocusable(false);
|
||||
jListCustomers.setRequestFocusEnabled(false);
|
||||
jListCustomers.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jListCustomersMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
jListCustomers.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
||||
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
|
||||
jListCustomersValueChanged(evt);
|
||||
}
|
||||
});
|
||||
jScrollPane1.setViewportView(jListCustomers);
|
||||
|
||||
jPanel4.add(jScrollPane1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jbtnReset.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/reload.png"))); // NOI18N
|
||||
jbtnReset.setText(bundle.getString("button.reset")); // NOI18N
|
||||
jbtnReset.setToolTipText("Clear Filter");
|
||||
jbtnReset.setActionCommand("Reset ");
|
||||
jbtnReset.setFocusable(false);
|
||||
jbtnReset.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnReset.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnResetActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jbtnReset);
|
||||
jbtnReset.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jbtnExecute.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnExecute.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jbtnExecute.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
|
||||
jbtnExecute.setToolTipText("Execute Filter");
|
||||
jbtnExecute.setFocusPainted(false);
|
||||
jbtnExecute.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnExecute.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnExecuteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jbtnExecute);
|
||||
jbtnExecute.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jPanel4.add(jPanel6, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
|
||||
|
||||
setSize(new java.awt.Dimension(758, 634));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
private void jcmdOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdOKActionPerformed
|
||||
|
||||
m_ReturnCustomer = (CustomerInfo) jListCustomers.getSelectedValue();
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdOKActionPerformed
|
||||
|
||||
private void jcmdCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdCancelActionPerformed
|
||||
|
||||
private void jbtnExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnExecuteActionPerformed
|
||||
|
||||
m_ReturnCustomer=null;
|
||||
executeSearch();
|
||||
|
||||
}//GEN-LAST:event_jbtnExecuteActionPerformed
|
||||
|
||||
private void jListCustomersValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListCustomersValueChanged
|
||||
|
||||
m_ReturnCustomer = (CustomerInfo) jListCustomers.getSelectedValue();
|
||||
|
||||
if (m_ReturnCustomer != null) {
|
||||
m_ReturnCustomer = (CustomerInfo) jListCustomers.getSelectedValue();
|
||||
|
||||
if (m_ReturnCustomer != null) {
|
||||
jImageViewerCustomer.setImage(m_ReturnCustomer.getImage());
|
||||
}
|
||||
}
|
||||
|
||||
jcmdOK.setEnabled(jListCustomers.getSelectedValue() != null);
|
||||
|
||||
}//GEN-LAST:event_jListCustomersValueChanged
|
||||
|
||||
private void jListCustomersMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jListCustomersMouseClicked
|
||||
|
||||
m_ReturnCustomer = (CustomerInfo) jListCustomers.getSelectedValue();
|
||||
|
||||
if (m_ReturnCustomer != null) {
|
||||
m_ReturnCustomer = (CustomerInfo) jListCustomers.getSelectedValue();
|
||||
|
||||
if (m_ReturnCustomer != null) {
|
||||
jImageViewerCustomer.setImage(m_ReturnCustomer.getImage());
|
||||
}
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jListCustomersMouseClicked
|
||||
|
||||
private void jbtnResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnResetActionPerformed
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
}//GEN-LAST:event_jbtnResetActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private com.unicenta.data.gui.JImageViewerCustomer jImageViewerCustomer;
|
||||
private javax.swing.JLabel jLblEmail;
|
||||
private javax.swing.JLabel jLblName;
|
||||
private javax.swing.JLabel jLblPhone;
|
||||
private javax.swing.JLabel jLblPostal;
|
||||
private javax.swing.JLabel jLblSearchKey;
|
||||
private javax.swing.JLabel jLblTaxID;
|
||||
private javax.swing.JList jListCustomers;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JPanel jPanel7;
|
||||
private javax.swing.JPanel jPanel8;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton jbtnExecute;
|
||||
private javax.swing.JButton jbtnReset;
|
||||
private javax.swing.JButton jcmdCancel;
|
||||
private javax.swing.JButton jcmdOK;
|
||||
private com.unicenta.editor.JEditorKeys m_jKeys;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName2;
|
||||
private com.unicenta.editor.JEditorString m_jtxtPhone;
|
||||
private com.unicenta.editor.JEditorString m_jtxtPostal;
|
||||
private com.unicenta.editor.JEditorString m_jtxtSearchKey;
|
||||
private com.unicenta.editor.JEditorString m_jtxtTaxID;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,582 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.customer" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[610, 430]"/>
|
||||
</Property>
|
||||
<Property name="resizable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-57,0,0,2,-117"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,4,11"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblEmail" alignment="0" max="-2" attributes="1"/>
|
||||
<Component id="jLblTelephone1" alignment="0" max="-2" attributes="1"/>
|
||||
<Component id="jLblTelephone2" alignment="1" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtEmail" alignment="0" max="-2" attributes="2"/>
|
||||
<Component id="txtPhone" max="-2" attributes="2"/>
|
||||
<Component id="txtPhone2" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblFirstName" max="-2" attributes="1"/>
|
||||
<Component id="jLblLastName" alignment="1" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtLastName" max="-2" attributes="2"/>
|
||||
<Component id="txtFirstName" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblName" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblCustTaxCat" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblVIP" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jCategory" alignment="0" min="-2" pref="163" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="m_jVip" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jLblDiscount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtDiscount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLblDiscountpercent" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="m_jSearchkey" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jLblSearchkey" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jLabel1" alignment="0" pref="0" max="32767" attributes="1"/>
|
||||
<Component id="jLblTaxID" alignment="0" pref="140" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtMaxdebt" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="62" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblSearchkey" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jSearchkey" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblTaxID" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jTaxID" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblCustTaxCat" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jCategory" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtMaxdebt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblVIP" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="1" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblDiscount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDiscount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblDiscountpercent" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="m_jVip" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtFirstName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblFirstName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblLastName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLastName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblTelephone1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPhone" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblTelephone2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPhone2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLblName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.namem" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jName">
|
||||
<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="[300, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblSearchkey">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.searchkeym" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jSearchkey">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblTaxID">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jTaxID">
|
||||
<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="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="CustomersView_m_jTaxID"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblCustTaxCat">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.custtaxcategory" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="m_jCategory">
|
||||
<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="jLblVIP">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.vip" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="m_jVip">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="f3" green="bc" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[21, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="m_jVipnone"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblDiscount">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.discount" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[55, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtDiscount">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblDiscountpercent">
|
||||
<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="%"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[12, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblFirstName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.firstname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="alignmentX" type="float" value="0.5"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtFirstName">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblLastName">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.lastname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtLastName">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblEmail">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.email" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtEmail">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblTelephone1">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.phone" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtPhone">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblTelephone2">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.phone2" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtPhone2">
|
||||
<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="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<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" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.maxdebt" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtMaxdebt">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="2"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="m_jBtnOK">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jBtnOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="m_jBtnCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jBtnCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,520 @@
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ComboBoxValModel;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.data.loader.LocalRes;
|
||||
import com.unicenta.data.loader.SentenceExec;
|
||||
import com.unicenta.data.loader.SentenceList;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import com.unicenta.pos.forms.DataLogicSales;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dialog;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Window;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public class JDialogNewCustomer extends javax.swing.JDialog {
|
||||
|
||||
private DataLogicCustomers dlCustomer;
|
||||
private DataLogicSales dlSales;
|
||||
private ComboBoxValModel m_CategoryModel;
|
||||
private SentenceList m_sentcat;
|
||||
private SentenceExec m_sentinsert;
|
||||
private TableDefinition tcustomers;
|
||||
private CustomerInfoExt selectedCustomer;
|
||||
private Object m_oId;
|
||||
|
||||
/** Creates new form quick New Customer
|
||||
* @param parent */
|
||||
protected JDialogNewCustomer(java.awt.Frame parent) {
|
||||
super(parent, true);
|
||||
}
|
||||
|
||||
/** Creates new form quick New Customer
|
||||
* @param parent */
|
||||
protected JDialogNewCustomer(java.awt.Dialog parent) {
|
||||
super(parent, true);
|
||||
}
|
||||
|
||||
private void init(AppView app) {
|
||||
|
||||
try {
|
||||
dlSales = (DataLogicSales) app.getBean("com.unicenta.pos.forms.DataLogicSales");
|
||||
dlCustomer = (DataLogicCustomers) app.getBean("com.unicenta.pos.customers.DataLogicCustomers");
|
||||
m_sentcat = dlSales.getTaxCustCategoriesList();
|
||||
tcustomers = dlCustomer.getTableCustomers();
|
||||
|
||||
initComponents();
|
||||
|
||||
m_CategoryModel = new ComboBoxValModel();
|
||||
List a = m_sentcat.list();
|
||||
a.add(0, null);
|
||||
|
||||
m_CategoryModel = new ComboBoxValModel(a);
|
||||
m_jCategory.setModel(m_CategoryModel);
|
||||
|
||||
getRootPane().setDefaultButton(m_jBtnOK);
|
||||
} catch (BasicException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] customer = new Object[27];
|
||||
customer[0] = m_oId;
|
||||
customer[1] = m_jSearchkey.getText();
|
||||
customer[2] = m_jTaxID.getText();
|
||||
customer[3] = m_jName.getText();
|
||||
customer[4] = m_CategoryModel.getSelectedKey();
|
||||
customer[5] = null;
|
||||
customer[6] = Formats.CURRENCY.parseValue(txtMaxdebt.getText(), 0.0);
|
||||
customer[7] = null;
|
||||
customer[8] = null;
|
||||
customer[9] = null;
|
||||
customer[10] = null;
|
||||
customer[11] = null;
|
||||
customer[12] = null;
|
||||
customer[13] = Formats.STRING.parseValue(txtFirstName.getText());
|
||||
customer[14] = Formats.STRING.parseValue(txtLastName.getText());
|
||||
customer[15] = Formats.STRING.parseValue(txtEmail.getText());
|
||||
customer[16] = Formats.STRING.parseValue(txtPhone.getText());
|
||||
customer[17] = Formats.STRING.parseValue(txtPhone2.getText());
|
||||
customer[18] = null;
|
||||
customer[19] = null;
|
||||
customer[20] = true;
|
||||
customer[21] = null;
|
||||
customer[22] = 0.0;
|
||||
customer[23] = null;
|
||||
customer[24] = m_jVip.isSelected();
|
||||
customer[25] = Formats.DOUBLE.parseValue(txtDiscount.getText());
|
||||
customer[26] = null;
|
||||
|
||||
return customer;
|
||||
}
|
||||
|
||||
|
||||
private void selectedVip(boolean value){
|
||||
m_jVip.setSelected(value);
|
||||
jLblDiscountpercent.setVisible(value);
|
||||
txtDiscount.setVisible(value);
|
||||
|
||||
}
|
||||
|
||||
public static JDialogNewCustomer getDialog(Component parent,AppView app) {
|
||||
|
||||
Window window = getWindow(parent);
|
||||
|
||||
JDialogNewCustomer quicknewcustomer;
|
||||
|
||||
if (window instanceof Frame) {
|
||||
quicknewcustomer = new JDialogNewCustomer((Frame) window);
|
||||
} else {
|
||||
quicknewcustomer = new JDialogNewCustomer((Dialog) window);
|
||||
}
|
||||
|
||||
quicknewcustomer.init(app);
|
||||
|
||||
return quicknewcustomer;
|
||||
}
|
||||
|
||||
protected static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window)parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
public CustomerInfoExt getSelectedCustomer() {
|
||||
return selectedCustomer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jLblName = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
jLblSearchkey = new javax.swing.JLabel();
|
||||
m_jSearchkey = new javax.swing.JTextField();
|
||||
jLblTaxID = new javax.swing.JLabel();
|
||||
m_jTaxID = new javax.swing.JTextField();
|
||||
jLblCustTaxCat = new javax.swing.JLabel();
|
||||
m_jCategory = new javax.swing.JComboBox();
|
||||
jLblVIP = new javax.swing.JLabel();
|
||||
m_jVip = new javax.swing.JCheckBox();
|
||||
jLblDiscount = new javax.swing.JLabel();
|
||||
txtDiscount = new javax.swing.JTextField();
|
||||
jLblDiscountpercent = new javax.swing.JLabel();
|
||||
jLblFirstName = new javax.swing.JLabel();
|
||||
txtFirstName = new javax.swing.JTextField();
|
||||
jLblLastName = new javax.swing.JLabel();
|
||||
txtLastName = new javax.swing.JTextField();
|
||||
jLblEmail = new javax.swing.JLabel();
|
||||
txtEmail = new javax.swing.JTextField();
|
||||
jLblTelephone1 = new javax.swing.JLabel();
|
||||
txtPhone = new javax.swing.JTextField();
|
||||
jLblTelephone2 = new javax.swing.JLabel();
|
||||
txtPhone2 = new javax.swing.JTextField();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
txtMaxdebt = new javax.swing.JTextField();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jBtnOK = new javax.swing.JButton();
|
||||
m_jBtnCancel = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("label.customer")); // NOI18N
|
||||
setPreferredSize(new java.awt.Dimension(610, 430));
|
||||
setResizable(false);
|
||||
|
||||
jPanel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
|
||||
jLblName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblName.setText(AppLocal.getIntString("label.namem")); // NOI18N
|
||||
jLblName.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
jLblName.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLblName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(300, 30));
|
||||
|
||||
jLblSearchkey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblSearchkey.setText(AppLocal.getIntString("label.searchkeym")); // NOI18N
|
||||
jLblSearchkey.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jSearchkey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jSearchkey.setHorizontalAlignment(javax.swing.JTextField.LEFT);
|
||||
m_jSearchkey.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLblTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTaxID.setText(AppLocal.getIntString("label.taxid")); // NOI18N
|
||||
jLblTaxID.setMaximumSize(new java.awt.Dimension(150, 30));
|
||||
jLblTaxID.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLblTaxID.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
m_jTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jTaxID.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
jLblCustTaxCat.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblCustTaxCat.setText(AppLocal.getIntString("label.custtaxcategory")); // NOI18N
|
||||
jLblCustTaxCat.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
jLblCustTaxCat.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLblCustTaxCat.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jCategory.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jCategory.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLblVIP.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblVIP.setText(AppLocal.getIntString("label.vip")); // NOI18N
|
||||
jLblVIP.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jVip.setForeground(new java.awt.Color(0, 188, 243));
|
||||
m_jVip.setPreferredSize(new java.awt.Dimension(21, 30));
|
||||
m_jVip.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
m_jVipnone(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLblDiscount.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblDiscount.setText(AppLocal.getIntString("label.discount")); // NOI18N
|
||||
jLblDiscount.setPreferredSize(new java.awt.Dimension(55, 30));
|
||||
|
||||
txtDiscount.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtDiscount.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
|
||||
txtDiscount.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
|
||||
jLblDiscountpercent.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblDiscountpercent.setText("%");
|
||||
jLblDiscountpercent.setPreferredSize(new java.awt.Dimension(12, 30));
|
||||
|
||||
jLblFirstName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblFirstName.setText(AppLocal.getIntString("label.firstname")); // NOI18N
|
||||
jLblFirstName.setAlignmentX(0.5F);
|
||||
jLblFirstName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtFirstName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtFirstName.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblLastName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblLastName.setText(AppLocal.getIntString("label.lastname")); // NOI18N
|
||||
jLblLastName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtLastName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtLastName.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblEmail.setText(AppLocal.getIntString("label.email")); // NOI18N
|
||||
jLblEmail.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtEmail.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblTelephone1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTelephone1.setText(AppLocal.getIntString("label.phone")); // NOI18N
|
||||
jLblTelephone1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtPhone.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblTelephone2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTelephone2.setText(AppLocal.getIntString("label.phone2")); // NOI18N
|
||||
jLblTelephone2.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtPhone2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtPhone2.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.maxdebt")); // NOI18N
|
||||
jLabel1.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
jLabel1.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtMaxdebt.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtMaxdebt.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
|
||||
txtMaxdebt.setPreferredSize(new java.awt.Dimension(100, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTelephone1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTelephone2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblLastName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtLastName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblCustTaxCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblVIP, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jCategory, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addComponent(m_jVip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLblDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLblDiscountpercent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(m_jSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(jLblSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtMaxdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblCustTaxCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jCategory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtMaxdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblVIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblDiscountpercent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(m_jVip, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblTelephone1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblTelephone2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.NORTH);
|
||||
jPanel3.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
|
||||
|
||||
m_jBtnOK.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jBtnOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
m_jBtnOK.setText(AppLocal.getIntString("Button.OK")); // NOI18N
|
||||
m_jBtnOK.setFocusPainted(false);
|
||||
m_jBtnOK.setFocusable(false);
|
||||
m_jBtnOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
m_jBtnOK.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
m_jBtnOK.setRequestFocusEnabled(false);
|
||||
m_jBtnOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jBtnOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(m_jBtnOK);
|
||||
|
||||
m_jBtnCancel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jBtnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
m_jBtnCancel.setText(AppLocal.getIntString("Button.Cancel")); // NOI18N
|
||||
m_jBtnCancel.setFocusPainted(false);
|
||||
m_jBtnCancel.setFocusable(false);
|
||||
m_jBtnCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
m_jBtnCancel.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
m_jBtnCancel.setRequestFocusEnabled(false);
|
||||
m_jBtnCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jBtnCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(m_jBtnCancel);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
setSize(new java.awt.Dimension(651, 455));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void m_jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnOKActionPerformed
|
||||
|
||||
if ("".equals(m_jSearchkey.getText())
|
||||
|| "".equals(m_jName.getText())) {
|
||||
JOptionPane.showMessageDialog(
|
||||
null,
|
||||
AppLocal.getIntString("message.customercheck"),
|
||||
"Customer check",
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
} else {
|
||||
try {
|
||||
m_oId = UUID.randomUUID().toString();
|
||||
Object customer = createValue();
|
||||
|
||||
int status = tcustomers.getInsertSentence().exec(customer);
|
||||
|
||||
if (status>0){
|
||||
selectedCustomer = dlSales.loadCustomerExt(m_oId.toString());
|
||||
dispose();
|
||||
} else {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE,
|
||||
LocalRes.getIntString("message.nosave"), "Error save");
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE,
|
||||
LocalRes.getIntString("message.nosave"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_m_jBtnOKActionPerformed
|
||||
|
||||
private void m_jBtnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_m_jBtnCancelActionPerformed
|
||||
|
||||
private void m_jVipnone(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_m_jVipnone
|
||||
|
||||
}//GEN-LAST:event_m_jVipnone
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLblCustTaxCat;
|
||||
private javax.swing.JLabel jLblDiscount;
|
||||
private javax.swing.JLabel jLblDiscountpercent;
|
||||
private javax.swing.JLabel jLblEmail;
|
||||
private javax.swing.JLabel jLblFirstName;
|
||||
private javax.swing.JLabel jLblLastName;
|
||||
private javax.swing.JLabel jLblName;
|
||||
private javax.swing.JLabel jLblSearchkey;
|
||||
private javax.swing.JLabel jLblTaxID;
|
||||
private javax.swing.JLabel jLblTelephone1;
|
||||
private javax.swing.JLabel jLblTelephone2;
|
||||
private javax.swing.JLabel jLblVIP;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JButton m_jBtnCancel;
|
||||
private javax.swing.JButton m_jBtnOK;
|
||||
private javax.swing.JComboBox m_jCategory;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JTextField m_jSearchkey;
|
||||
private javax.swing.JTextField m_jTaxID;
|
||||
private javax.swing.JCheckBox m_jVip;
|
||||
private javax.swing.JTextField txtDiscount;
|
||||
private javax.swing.JTextField txtEmail;
|
||||
private javax.swing.JTextField txtFirstName;
|
||||
private javax.swing.JTextField txtLastName;
|
||||
private javax.swing.JTextField txtMaxdebt;
|
||||
private javax.swing.JTextField txtPhone;
|
||||
private javax.swing.JTextField txtPhone2;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[256, 560]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[256, 560]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,1,44"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelCustomers">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,360 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.pos.catalog.JCatalogTab;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import com.unicenta.pos.sales.DataLogicReceipts;
|
||||
import com.unicenta.pos.sales.SharedTicketInfo;
|
||||
import com.unicenta.pos.sales.TicketsEditor;
|
||||
import com.unicenta.pos.ticket.TicketInfo;
|
||||
import com.unicenta.pos.util.ThumbNailBuilder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.EventListenerList;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author JG uniCenta - outline/prep for uniCenta mobile + eCommerce connector
|
||||
*/
|
||||
@Slf4j
|
||||
public class OrderCustomerList extends JPanel implements TicketSelector {
|
||||
|
||||
/**
|
||||
* Source origin and Ticket
|
||||
*/
|
||||
protected AppView application;
|
||||
private String currentTicket;
|
||||
|
||||
/**
|
||||
* This instance interface
|
||||
*/
|
||||
protected TicketsEditor panelticket;
|
||||
|
||||
/**
|
||||
* Set listeners for new/change Customer/Receipt events
|
||||
*/
|
||||
protected EventListenerList listeners = new EventListenerList();
|
||||
private final DataLogicCustomers dataLogicCustomers;
|
||||
private final DataLogicReceipts dataLogicReceipts;
|
||||
private final ThumbNailBuilder tnbbutton;
|
||||
|
||||
/**
|
||||
* Creates new form CustomersList
|
||||
*
|
||||
* @param dlCustomers
|
||||
* @param app
|
||||
* @param panelticket
|
||||
*/
|
||||
public OrderCustomerList(DataLogicCustomers dlCustomers, AppView app, TicketsEditor panelticket) {
|
||||
this.application = app;
|
||||
this.panelticket = panelticket;
|
||||
this.dataLogicCustomers = dlCustomers;
|
||||
this.dataLogicReceipts = (DataLogicReceipts) application.getBean("com.unicenta.pos.sales.DataLogicReceipts");
|
||||
tnbbutton = new ThumbNailBuilder(90, 98);
|
||||
|
||||
// orderSynchroniseHelper = new OrdersSynchroniseHelper(application, dataLogicReceipts, panelticket.getActiveTicket());
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void reloadCustomers() throws BasicException {
|
||||
// synchroniseData();
|
||||
loadCustomers();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void loadCustomers() throws BasicException {
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
jPanelCustomers.removeAll();
|
||||
|
||||
JCatalogTab flowTab = new JCatalogTab();
|
||||
jPanelCustomers.add(flowTab);
|
||||
|
||||
List<CustomerInfoExt> customers = null;
|
||||
List<SharedTicketInfo> ticketList = null;
|
||||
try {
|
||||
|
||||
// customers = dataLogicCustomers.getCustomers();
|
||||
log.info("Time of getCustomersWithOutImage {}", (System.currentTimeMillis() - time));
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
ticketList = dataLogicReceipts.getSharedTicketList();
|
||||
log.info("Time of getSharedTicketList {}", (System.currentTimeMillis() - time));
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
|
||||
} catch (BasicException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
HashMap<SharedTicketInfo, CustomerInfoExt> orderMap = new HashMap<>();
|
||||
|
||||
for (SharedTicketInfo sharedTicketInfo : ticketList) {
|
||||
|
||||
String ticketName = sharedTicketInfo.getName().trim();
|
||||
|
||||
if (ticketName.contains("[") && ticketName.contains("]")) {
|
||||
|
||||
// found order
|
||||
if (ticketName.startsWith("[")) {
|
||||
// order without customer
|
||||
orderMap.put(sharedTicketInfo, null);
|
||||
} else if (!customers.isEmpty()) {
|
||||
// find customer to ticket
|
||||
for (CustomerInfoExt customer : customers) {
|
||||
if (customer != null) {
|
||||
String name = customer.getName().trim();
|
||||
if (ticketName.startsWith(name)) {
|
||||
orderMap.put(sharedTicketInfo, customer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// sort
|
||||
CustomerComparator bvc = new CustomerComparator(orderMap);
|
||||
TreeMap<SharedTicketInfo, CustomerInfoExt> sortedMap = new TreeMap<>(bvc);
|
||||
sortedMap.putAll(orderMap);
|
||||
|
||||
log.info("Time of orderMap {}", (System.currentTimeMillis() - time));
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
// set button list
|
||||
for (Map.Entry<SharedTicketInfo, CustomerInfoExt> entry : sortedMap.entrySet()) {
|
||||
SharedTicketInfo ticket = entry.getKey();
|
||||
CustomerInfoExt customer = entry.getValue();
|
||||
|
||||
String name = ticket.getName();
|
||||
BufferedImage image = null;
|
||||
|
||||
// if (customer != null) {
|
||||
// try {
|
||||
// image = dataLogicCustomers.getCustomerImage(customer.getId());
|
||||
// } catch (BasicException ex) {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
if (image == null) {
|
||||
try {
|
||||
InputStream is = getClass().getResourceAsStream("/com/unicenta/images/no_image.png");
|
||||
if (is != null) {
|
||||
image = ImageIO.read(is);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
}
|
||||
String username;
|
||||
if (name.indexOf("[") != 0) {
|
||||
username = name.substring(0, name.indexOf("[") - 1);
|
||||
username = username.replace("-", "");
|
||||
} else {
|
||||
username = "unknown";
|
||||
}
|
||||
String orderId = name.substring(name.indexOf("["), name.indexOf("]") + 1);
|
||||
String text = "<html><center>" + username.trim() + "<br/>" + orderId.trim() + "</center></html>";
|
||||
|
||||
ImageIcon icon = new ImageIcon(tnbbutton.getThumbNailText(image, text));
|
||||
// flowTab.addButton(icon, new SelectedCustomerAction(ticket.getId()));
|
||||
}
|
||||
log.info("Time of finished loadCustomerOrders {}", (System.currentTimeMillis() - time));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void setComponentEnabled(boolean value) {
|
||||
jPanelCustomers.setEnabled(value);
|
||||
|
||||
synchronized (jPanelCustomers.getTreeLock()) {
|
||||
int compCount = jPanelCustomers.getComponentCount();
|
||||
for (int i = 0; i < compCount; i++) {
|
||||
jPanelCustomers.getComponent(i).setEnabled(value);
|
||||
}
|
||||
}
|
||||
this.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param l
|
||||
*/
|
||||
@Override
|
||||
public void addActionListener(ActionListener l) {
|
||||
listeners.add(ActionListener.class, l);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param l
|
||||
*/
|
||||
@Override
|
||||
public void removeActionListener(ActionListener l) {
|
||||
listeners.remove(ActionListener.class, l);
|
||||
}
|
||||
|
||||
private void setActiveTicket(String id) throws BasicException {
|
||||
|
||||
currentTicket = panelticket.getActiveTicket().getId();
|
||||
|
||||
// save current ticket
|
||||
// if (currentTicket != null) {
|
||||
// try {
|
||||
// dataLogicReceipts.insertSharedTicket(currentTicket, panelticket.getActiveTicket());
|
||||
// } catch (BasicException e) {
|
||||
// new MessageInf(e).show(this);
|
||||
// }
|
||||
// }
|
||||
// set ticket
|
||||
// BEGIN TRANSACTION
|
||||
TicketInfo ticket = dataLogicReceipts.getSharedTicket(id);
|
||||
if (ticket == null) {
|
||||
// Does not exists ???
|
||||
throw new BasicException(AppLocal.getIntString("message.noticket"));
|
||||
} else {
|
||||
dataLogicReceipts.deleteSharedTicket(id);
|
||||
currentTicket = id;
|
||||
panelticket.setActiveTicket(ticket, null);
|
||||
fireTicketSelectionChanged(ticket.getId());
|
||||
}
|
||||
// END TRANSACTION
|
||||
}
|
||||
|
||||
// private void synchroniseData() {
|
||||
// try {
|
||||
// get tickets only from selected customer or show all
|
||||
// add newest tickets from provider
|
||||
// orderSynchroniseHelper.synchSharedTickets(panelticket.getActiveTicket());
|
||||
// } catch (Exception e) {
|
||||
// }
|
||||
// }
|
||||
|
||||
private void fireTicketSelectionChanged(String ticketId) {
|
||||
EventListener[] l = listeners.getListeners(ActionListener.class);
|
||||
ActionEvent e = null;
|
||||
for (EventListener l1 : l) {
|
||||
if (e == null) {
|
||||
e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ticketId);
|
||||
}
|
||||
((ActionListener) l1).actionPerformed(e);
|
||||
}
|
||||
}
|
||||
|
||||
private class SelectedCustomerAction implements ActionListener {
|
||||
|
||||
private final String ticketId;
|
||||
|
||||
public SelectedCustomerAction(String ticketId) {
|
||||
this.ticketId = ticketId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
if (ticketId != null) {
|
||||
setActiveTicket(ticketId);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
new MessageInf(ex).show(OrderCustomerList.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CustomerComparator implements Comparator<SharedTicketInfo> {
|
||||
|
||||
Map<SharedTicketInfo, CustomerInfoExt> base;
|
||||
|
||||
public CustomerComparator(Map<SharedTicketInfo, CustomerInfoExt> base) {
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
// Note: this comparator imposes orderings that are inconsistent with equals.
|
||||
@Override
|
||||
public int compare(SharedTicketInfo a, SharedTicketInfo b) {
|
||||
String nameA = base.get(a).getName();
|
||||
String nameB = base.get(b).getName();
|
||||
|
||||
if (nameA.compareToIgnoreCase(nameB) < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanelCustomers = new javax.swing.JPanel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(256, 560));
|
||||
setPreferredSize(new java.awt.Dimension(256, 560));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanelCustomers.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jPanelCustomers.setLayout(new java.awt.CardLayout());
|
||||
add(jPanelCustomers, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel jPanelCustomers;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.unicenta.pos.customers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta - outline/prep for uniCenta mobile + eCommerce connector
|
||||
*/
|
||||
public interface TicketSelector {
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void loadCustomers() throws BasicException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setComponentEnabled(boolean value);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void addActionListener(ActionListener l);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void removeActionListener(ActionListener l);
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class Break {
|
||||
|
||||
private String m_sId;
|
||||
private String m_sName;
|
||||
private String m_sNotes;
|
||||
private boolean m_sVisible;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
* @param notes
|
||||
* @param visible
|
||||
*/
|
||||
public Break(String id, String name, String notes, boolean visible) {
|
||||
m_sId = id;
|
||||
m_sName = name;
|
||||
m_sNotes = notes;
|
||||
m_sVisible = visible;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getId() {
|
||||
return m_sId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Id
|
||||
*/
|
||||
public void setId(String Id) {
|
||||
this.m_sId = Id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Name
|
||||
*/
|
||||
public void setName(String Name) {
|
||||
this.m_sName = Name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getNotes() {
|
||||
return m_sNotes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Notes
|
||||
*/
|
||||
public void setNotes(String Notes) {
|
||||
this.m_sNotes = Notes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isVisible() {
|
||||
return m_sVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Visible
|
||||
*/
|
||||
public void setVisible(boolean Visible) {
|
||||
this.m_sVisible = Visible;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class BreaksInfo implements IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 8936482715929L;
|
||||
private String m_sID;
|
||||
private String m_sName;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
public BreaksInfo(String id, String name) {
|
||||
m_sID = id;
|
||||
m_sName = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sID
|
||||
*/
|
||||
public void setID(String sID) {
|
||||
m_sID = sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getID() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sName
|
||||
*/
|
||||
public void setName(String sName) {
|
||||
m_sName = sName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class BreaksPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tbreaks;
|
||||
private BreaksView jeditor;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public BreaksPanel() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicPresenceManagement dlPresenceManagement = (DataLogicPresenceManagement) app.getBean("com.unicenta.pos.epm.DataLogicPresenceManagement");
|
||||
tbreaks = dlPresenceManagement.getTableBreaks();
|
||||
jeditor = new BreaksView(app, dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
|
||||
jeditor.activate();
|
||||
super.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tbreaks);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tbreaks, new int[] {0, 1, 2, 3});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tbreaks.getVectorerBasic(new int[]{1, 2});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tbreaks.getComparatorCreator(new int[] {1, 2});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tbreaks.getRenderStringBasic(new int[]{1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Breaks");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="jLabel1" alignment="0" pref="126" max="32767" attributes="1"/>
|
||||
<Component id="m_Name3" alignment="0" pref="126" max="32767" attributes="1"/>
|
||||
<Component id="m_Ncx" alignment="0" pref="126" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="m_jVisible" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jBreakName" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="jScrollPane1" alignment="0" min="-2" pref="223" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="214" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="m_jBreakName" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="m_Ncx" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_Name3" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="m_jVisible" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="138" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="35" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextField" name="m_jBreakName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="m_jBreakDescription">
|
||||
<Properties>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JCheckBox" name="m_jVisible">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="m_Ncx">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.visible" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="m_Name3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.notes" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.employee" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,239 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.SentenceList;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import java.awt.Component;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public final class BreaksView extends javax.swing.JPanel implements EditorRecord {
|
||||
|
||||
private Object m_oId;
|
||||
private SentenceList m_sentcat;
|
||||
private DirtyManager m_Dirty;
|
||||
|
||||
/** Creates new form BreaksView
|
||||
* @param app
|
||||
* @param dirty */
|
||||
public BreaksView(AppView app, DirtyManager dirty) {
|
||||
|
||||
DataLogicPresenceManagement dlPresenceManagement = (DataLogicPresenceManagement) app.getBean("com.unicenta.pos.epm.DataLogicPresenceManagement");
|
||||
initComponents();
|
||||
m_sentcat = dlPresenceManagement.getBreaksList();
|
||||
m_Dirty = dirty;
|
||||
m_jBreakName.getDocument().addDocumentListener(dirty);
|
||||
m_jVisible.addActionListener(dirty);
|
||||
m_jBreakDescription.getDocument().addDocumentListener(dirty);
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
void activate() throws BasicException {
|
||||
List a = m_sentcat.list();
|
||||
a.add(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
m_oId = null;
|
||||
m_jBreakName.setText(null);
|
||||
m_jBreakDescription.setText(null);
|
||||
m_jVisible.setSelected(false);
|
||||
m_jBreakName.setEditable(false);
|
||||
m_jBreakDescription.setEnabled(false);
|
||||
m_jVisible.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
m_oId = null;
|
||||
m_jBreakName.setText(null);
|
||||
m_jBreakDescription.setText(null);
|
||||
m_jVisible.setSelected(true);
|
||||
m_jBreakName.setEditable(true);
|
||||
m_jBreakDescription.setEnabled(true);
|
||||
m_jVisible.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
Object[] breaks = (Object[]) value;
|
||||
m_oId = breaks[0];
|
||||
m_jBreakName.setText((String) breaks[1]);
|
||||
m_jBreakDescription.setText((String) breaks[2]);
|
||||
m_jVisible.setSelected(((Boolean) breaks[3]).booleanValue());
|
||||
m_jBreakName.setEditable(true);
|
||||
m_jBreakDescription.setEnabled(true);
|
||||
m_jVisible.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
Object[] breaks = (Object[]) value;
|
||||
m_oId = breaks[0];
|
||||
m_jBreakName.setText((String) breaks[1]);
|
||||
m_jBreakDescription.setText((String) breaks[2]);
|
||||
m_jVisible.setSelected(((Boolean) breaks[3]).booleanValue());
|
||||
m_jBreakName.setEditable(false);
|
||||
m_jBreakDescription.setEnabled(false);
|
||||
m_jVisible.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] breaks = new Object[4];
|
||||
breaks[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
|
||||
breaks[1] = m_jBreakName.getText();
|
||||
breaks[2] = m_jBreakDescription.getText();
|
||||
breaks[3] = Boolean.valueOf(m_jVisible.isSelected());
|
||||
|
||||
return breaks;
|
||||
}
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
m_jBreakName = new javax.swing.JTextField();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
m_jBreakDescription = new javax.swing.JTextArea();
|
||||
m_jVisible = new javax.swing.JCheckBox();
|
||||
m_Ncx = new javax.swing.JLabel();
|
||||
m_Name3 = new javax.swing.JLabel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
|
||||
m_jBreakName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
|
||||
m_jBreakDescription.setColumns(20);
|
||||
m_jBreakDescription.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jBreakDescription.setLineWrap(true);
|
||||
m_jBreakDescription.setRows(5);
|
||||
jScrollPane1.setViewportView(m_jBreakDescription);
|
||||
|
||||
m_jVisible.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
|
||||
m_Ncx.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_Ncx.setText(AppLocal.getIntString("label.epm.visible")); // NOI18N
|
||||
|
||||
m_Name3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_Name3.setText(AppLocal.getIntString("label.epm.notes")); // NOI18N
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLabel1.setText(bundle.getString("label.epm.employee")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(m_Name3, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(m_Ncx, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(m_jVisible)
|
||||
.addComponent(m_jBreakName)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(214, 214, 214))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_jBreakName, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(m_Ncx, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_Name3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(m_jVisible, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(35, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JLabel m_Name3;
|
||||
private javax.swing.JLabel m_Ncx;
|
||||
private javax.swing.JTextArea m_jBreakDescription;
|
||||
private javax.swing.JTextField m_jBreakName;
|
||||
private javax.swing.JCheckBox m_jVisible;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,450 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.*;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.BeanFactoryDataSingle;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class DataLogicPresenceManagement extends BeanFactoryDataSingle {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected Session s;
|
||||
|
||||
private SentenceExec m_checkin;
|
||||
private SentenceExec m_checkout;
|
||||
private SentenceFind m_checkdate;
|
||||
|
||||
private SentenceList m_breaksvisible;
|
||||
private SentenceExec m_startbreak;
|
||||
private SentenceExec m_endbreak;
|
||||
|
||||
private SentenceFind m_isonbreak;
|
||||
private SentenceFind m_isonleave;
|
||||
private SentenceFind m_shiftid;
|
||||
|
||||
private SentenceFind m_lastcheckin;
|
||||
private SentenceFind m_lastcheckout;
|
||||
private SentenceFind m_startbreaktime;
|
||||
|
||||
private SentenceFind m_lastbreakid;
|
||||
private SentenceFind m_breakname;
|
||||
|
||||
private SerializerRead breakread;
|
||||
private TableDefinition tbreaks;
|
||||
private TableDefinition tleaves;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public DataLogicPresenceManagement() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
*/
|
||||
@Override
|
||||
public void init(Session s){
|
||||
|
||||
this.s = s;
|
||||
breakread = new SerializerRead() {
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
return new Break(
|
||||
dr.getString(1),
|
||||
dr.getString(2),
|
||||
dr.getString(3),
|
||||
dr.getBoolean(4));
|
||||
}
|
||||
};
|
||||
|
||||
tbreaks = new TableDefinition(s
|
||||
, "breaks"
|
||||
, new String[] { "ID", "NAME", "NOTES", "VISIBLE"}
|
||||
, new String[] { "ID", AppLocal.getIntString("label.epm.employee"), AppLocal.getIntString("label.epm.notes"), "VISIBLE"}
|
||||
, new Datas[] { Datas.STRING, Datas.STRING, Datas.STRING, Datas.BOOLEAN}
|
||||
, new Formats[] { Formats.STRING, Formats.STRING, Formats.STRING, Formats.BOOLEAN}
|
||||
, new int[] {0}
|
||||
);
|
||||
|
||||
tleaves = new TableDefinition(s
|
||||
, "leaves"
|
||||
, new String[] { "ID", "PPLID", "NAME", "STARTDATE", "ENDDATE", "NOTES"}
|
||||
, new String[] { "ID", AppLocal.getIntString("label.epm.employee.id"), AppLocal.getIntString("label.epm.employee"), AppLocal.getIntString("label.StartDate"), AppLocal.getIntString("label.EndDate"), AppLocal.getIntString("label.notes")}
|
||||
, new Datas[] { Datas.STRING, Datas.STRING, Datas.STRING, Datas.TIMESTAMP, Datas.TIMESTAMP, Datas.STRING}
|
||||
, new Formats[] { Formats.STRING, Formats.STRING, Formats.STRING, Formats.TIMESTAMP, Formats.TIMESTAMP, Formats.STRING}
|
||||
, new int[] {0}
|
||||
);
|
||||
|
||||
m_breaksvisible = new StaticSentence(s
|
||||
, "SELECT ID, NAME, NOTES, VISIBLE FROM breaks WHERE VISIBLE = " + s.DB.TRUE()
|
||||
, null
|
||||
, breakread);
|
||||
|
||||
m_checkin = new PreparedSentence(s
|
||||
, "INSERT INTO shifts(ID, STARTSHIFT, PPLID) VALUES (?, ?, ?)"
|
||||
, new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.TIMESTAMP, Datas.STRING}));
|
||||
|
||||
m_checkout = new StaticSentence(s
|
||||
, "UPDATE shifts SET ENDSHIFT = ? WHERE ENDSHIFT IS NULL AND PPLID = ?"
|
||||
,new SerializerWriteBasic(new Datas[] {Datas.TIMESTAMP, Datas.STRING}));
|
||||
|
||||
m_checkdate = new StaticSentence(s
|
||||
, "SELECT COUNT(*) FROM shifts WHERE ENDSHIFT IS NULL AND PPLID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadString.INSTANCE);
|
||||
|
||||
m_startbreak = new PreparedSentence(s
|
||||
, "INSERT INTO shift_breaks(ID, SHIFTID, BREAKID, STARTTIME) VALUES (?, ?, ?, ?)"
|
||||
, new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.TIMESTAMP}));
|
||||
|
||||
m_endbreak = new StaticSentence(s
|
||||
, "UPDATE shift_breaks SET ENDTIME = ? WHERE ENDTIME IS NULL AND SHIFTID = ?"
|
||||
,new SerializerWriteBasic(new Datas[] {Datas.TIMESTAMP, Datas.STRING}));
|
||||
|
||||
m_isonbreak = new StaticSentence(s
|
||||
// , "SELECT COUNT(*) FROM shift_breaks WHERE ENDTIME IS NULL AND SHIFTID = ?"
|
||||
, "SELECT COUNT(*) FROM shift_breaks WHERE ENDTIME IS NULL"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadString.INSTANCE);
|
||||
|
||||
m_shiftid = new StaticSentence(s
|
||||
, "SELECT ID FROM shifts WHERE ENDSHIFT IS NULL AND PPLID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadString.INSTANCE);
|
||||
|
||||
m_isonleave = new StaticSentence(s
|
||||
, "SELECT COUNT(*) FROM leaves WHERE STARTDATE < ? AND ENDDATE > ? AND PPLID = ?"
|
||||
, new SerializerWriteBasic(new Datas[] {Datas.TIMESTAMP, Datas.TIMESTAMP, Datas.STRING})
|
||||
, SerializerReadString.INSTANCE);
|
||||
|
||||
m_lastcheckin = new StaticSentence(s
|
||||
, "SELECT STARTSHIFT FROM shifts WHERE ENDSHIFT IS NULL AND PPLID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadDate.INSTANCE);
|
||||
|
||||
m_lastcheckout = new StaticSentence(s
|
||||
, "SELECT MAX(ENDSHIFT) FROM shifts WHERE PPLID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadDate.INSTANCE);
|
||||
|
||||
m_startbreaktime = new StaticSentence(s
|
||||
, "SELECT STARTTIME FROM shift_breaks WHERE ENDTIME IS NULL AND SHIFTID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadDate.INSTANCE);
|
||||
|
||||
m_lastbreakid = new StaticSentence(s
|
||||
, "SELECT BREAKID FROM shift_breaks WHERE ENDTIME IS NULL AND SHIFTID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadString.INSTANCE);
|
||||
|
||||
m_breakname = new StaticSentence(s
|
||||
, "SELECT NAME FROM breaks WHERE ID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, SerializerReadString.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final SentenceList getBreaksList() {
|
||||
return new StaticSentence(s
|
||||
, "SELECT ID, NAME FROM breaks ORDER BY NAME"
|
||||
, null
|
||||
, new SerializerRead() {@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
return new BreaksInfo(dr.getString(1), dr.getString(2));
|
||||
}});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final SentenceList getLeavesList() {
|
||||
return new StaticSentence(s
|
||||
, "SELECT ID, PPLID, NAME, STARTDATE, ENDDATE, NOTES FROM leaves ORDER BY NAME"
|
||||
, null
|
||||
, new SerializerRead() {@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
return new LeavesInfo(dr.getString(1), dr.getString(2), dr.getString(3), dr.getString(4), dr.getString(5), dr.getString(6));
|
||||
}});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final List listBreaksVisible()throws BasicException {
|
||||
return m_breaksvisible.list();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final void CheckIn(String user) throws BasicException {
|
||||
Object[] value = new Object[] {UUID.randomUUID().toString(), new Date(), user};
|
||||
m_checkin.exec(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final void CheckOut(String user) throws BasicException {
|
||||
Object[] value = new Object[] {new Date(), user};
|
||||
m_checkout.exec(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final boolean IsCheckedIn(String user) throws BasicException {
|
||||
String Data = (String) m_checkdate.find(user);
|
||||
// "0" rows shows user is not checked in
|
||||
if (Data.equals("0")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param UserID
|
||||
* @param BreakID
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final void StartBreak(String UserID, String BreakID) throws BasicException {
|
||||
String ShiftID = GetShiftID(UserID);
|
||||
Object[] value = new Object[] {UUID.randomUUID().toString(), ShiftID, BreakID, new Date()};
|
||||
m_startbreak.exec(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param UserID
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final void EndBreak(String UserID) throws BasicException {
|
||||
String ShiftID = GetShiftID(UserID);
|
||||
Object[] value = new Object[] {new Date(), ShiftID};
|
||||
m_endbreak.exec(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final boolean IsOnBreak(String user) throws BasicException {
|
||||
String ShiftID = GetShiftID(user);
|
||||
String Data = (String) m_isonbreak.find(ShiftID);
|
||||
// "0" rows shows user is not on break
|
||||
if (Data.equals("0")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final String GetShiftID(String user) throws BasicException {
|
||||
return (String) m_shiftid.find(user);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final Date GetLastCheckIn(String user) throws BasicException {
|
||||
return (Date) m_lastcheckin.find(user);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final Date GetLastCheckOut(String user) throws BasicException {
|
||||
return (Date) m_lastcheckout.find(user);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ShiftID
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final Date GetStartBreakTime(String ShiftID) throws BasicException {
|
||||
return (Date) m_startbreaktime.find(ShiftID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ShiftID
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final String GetLastBreakID(String ShiftID) throws BasicException {
|
||||
return (String) m_lastbreakid.find(ShiftID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ShiftID
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final String GetLastBreakName(String ShiftID) throws BasicException {
|
||||
String BreakID = GetLastBreakID(ShiftID);
|
||||
return (String) m_breakname.find(BreakID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final Object [] GetLastBreak(String user) throws BasicException {
|
||||
String ShiftID = GetShiftID(user);
|
||||
Date StartBreakTime = GetStartBreakTime(ShiftID);
|
||||
String BreakName = GetLastBreakName(ShiftID);
|
||||
return new Object[] {BreakName, StartBreakTime};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public final boolean IsOnLeave(String user) throws BasicException {
|
||||
Object[] value = new Object[] {new Date(), new Date(), user};
|
||||
String Data = (String) m_isonleave.find(value);
|
||||
// "0" rows shows user is not on leave
|
||||
if (Data.equals("0")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// EmployeeList list
|
||||
// Changed ='4' to !='0' --it lists all the users except admin who doesn´t clock in
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SentenceList getEmployeeList() {
|
||||
return new StaticSentence(s
|
||||
, new QBFBuilder("SELECT ID, NAME FROM people WHERE ROLE != '0' AND VISIBLE = " + s.DB.TRUE() + " AND ?(QBF_FILTER) ORDER BY NAME", new String[] {"NAME"})
|
||||
, new SerializerWriteBasic(new Datas[] {Datas.OBJECT, Datas.STRING})
|
||||
, new SerializerRead() {
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
EmployeeInfo c = new EmployeeInfo(dr.getString(1));
|
||||
c.setName(dr.getString(2));
|
||||
return c;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void BlockEmployee(String user) throws BasicException {
|
||||
boolean isOnBreak = IsOnBreak(user);
|
||||
if (isOnBreak) {
|
||||
EndBreak(user);
|
||||
}
|
||||
CheckOut(user);
|
||||
}
|
||||
|
||||
TableDefinition getTableBreaks() {
|
||||
return tbreaks;
|
||||
}
|
||||
|
||||
TableDefinition getTableLeaves() {
|
||||
return tleaves;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public EmployeeInfoExt loadEmployeeExt(String id) throws BasicException {
|
||||
return (EmployeeInfoExt) new PreparedSentence(s
|
||||
, "SELECT ID, NAME FROM people WHERE ID = ?"
|
||||
, SerializerWriteString.INSTANCE
|
||||
, new EmployeeExtRead()).find(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected static class EmployeeExtRead implements SerializerRead {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dr
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
EmployeeInfoExt c = new EmployeeInfoExt(dr.getString(1));
|
||||
c.setName(dr.getString(2));
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.pos.util.StringUtils;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class EmployeeInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9083257536541L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected String name;
|
||||
|
||||
/** Creates a new instance of EmployeeInfo
|
||||
* @param id */
|
||||
public EmployeeInfo(String id) {
|
||||
this.id = id;
|
||||
this.name = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String printName() {
|
||||
return StringUtils.encodeXML(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safadr and Aneeqa Baber
|
||||
*/
|
||||
public class EmployeeInfoExt extends EmployeeInfo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected boolean visible;
|
||||
|
||||
/** Creates a new instance of EmployeeInfoExt
|
||||
* @param id */
|
||||
public EmployeeInfoExt(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param visible
|
||||
*/
|
||||
public void setVisible(boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import java.awt.Component;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class EmployeeRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private Icon icoemployee;
|
||||
|
||||
/** Creates a new instance of EmployeeRenderer */
|
||||
public EmployeeRenderer() {
|
||||
icoemployee = new ImageIcon(getClass().getClassLoader().getResource("com/unicenta/images/user.png"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
|
||||
setText(value.toString());
|
||||
setIcon(icoemployee);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="form.customertitle" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-17,0,0,2,-85"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorKeys" name="m_jKeys">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Last"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jcmdCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jcmdOK">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" min="-2" pref="126" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" pref="220" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel5" alignment="0" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" alignment="0" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.employee" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/reload.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.clean" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.executefilter" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JList" name="jListEmployees">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jListEmployeesMouseClicked"/>
|
||||
<EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="jListEmployeesValueChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel8">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,383 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.QBFCompareEnum;
|
||||
import com.unicenta.data.user.EditorCreator;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class JEmployeeFinder extends javax.swing.JDialog implements EditorCreator {
|
||||
|
||||
private EmployeeInfo selectedEmployee;
|
||||
private ListProvider lpr;
|
||||
|
||||
/** Creates new form JEmployeeFinder */
|
||||
private JEmployeeFinder(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/** Creates new form JEmployeeFinder */
|
||||
private JEmployeeFinder(java.awt.Dialog parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param dlPresenceManagement
|
||||
* @return
|
||||
*/
|
||||
public static JEmployeeFinder getEmployeeFinder(Component parent, DataLogicPresenceManagement dlPresenceManagement) {
|
||||
Window window = getWindow(parent);
|
||||
JEmployeeFinder myMsg;
|
||||
if (window instanceof Frame) {
|
||||
myMsg = new JEmployeeFinder((Frame) window, true);
|
||||
} else {
|
||||
myMsg = new JEmployeeFinder((Dialog) window, true);
|
||||
}
|
||||
myMsg.init(dlPresenceManagement);
|
||||
myMsg.applyComponentOrientation(parent.getComponentOrientation());
|
||||
return myMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public EmployeeInfo getSelectedEmployee() {
|
||||
return selectedEmployee;
|
||||
}
|
||||
|
||||
private void init(DataLogicPresenceManagement dlPresenceManagement) {
|
||||
initComponents();
|
||||
jScrollPane1.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
m_jtxtName.addEditorKeys(m_jKeys);
|
||||
m_jtxtName.reset();
|
||||
lpr = new ListProviderCreator(dlPresenceManagement.getEmployeeList(), this);
|
||||
jListEmployees.setCellRenderer(new EmployeeRenderer());
|
||||
getRootPane().setDefaultButton(jcmdOK);
|
||||
selectedEmployee = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param employee
|
||||
*/
|
||||
public void search(EmployeeInfo employee) {
|
||||
if (employee == null || employee.getName() == null || employee.getName().equals("")) {
|
||||
m_jtxtName.reset();
|
||||
cleanSearch();
|
||||
} else {
|
||||
m_jtxtName.setText(employee.getName());
|
||||
executeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanSearch() {
|
||||
jListEmployees.setModel(new MyListData(new ArrayList()));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void executeSearch() {
|
||||
try {
|
||||
jListEmployees.setModel(new MyListData(lpr.loadData()));
|
||||
if (jListEmployees.getModel().getSize() > 0) {
|
||||
jListEmployees.setSelectedIndex(0);
|
||||
}
|
||||
} catch (BasicException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] afilter = new Object[2];
|
||||
// Name
|
||||
if (m_jtxtName.getText() == null || m_jtxtName.getText().equals("")) {
|
||||
afilter[0] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[1] = null;
|
||||
} else {
|
||||
afilter[0] = QBFCompareEnum.COMP_RE;
|
||||
afilter[1] = "%" + m_jtxtName.getText() + "%";
|
||||
}
|
||||
return afilter;
|
||||
}
|
||||
|
||||
private static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window) parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyListData extends javax.swing.AbstractListModel {
|
||||
private java.util.List m_data;
|
||||
public MyListData(java.util.List data) {
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
return m_data.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return m_data.size();
|
||||
}
|
||||
}
|
||||
|
||||
/** 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 Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jKeys = new com.unicenta.editor.JEditorKeys();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jcmdCancel = new javax.swing.JButton();
|
||||
jcmdOK = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
jPanel7 = new javax.swing.JPanel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
m_jtxtName = new com.unicenta.editor.JEditorString();
|
||||
jPanel6 = new javax.swing.JPanel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jListEmployees = new javax.swing.JList();
|
||||
jPanel8 = new javax.swing.JPanel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("form.customertitle")); // NOI18N
|
||||
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);
|
||||
|
||||
jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
jcmdCancel.setText(AppLocal.getIntString("button.cancel")); // NOI18N
|
||||
jcmdCancel.setFocusPainted(false);
|
||||
jcmdCancel.setFocusable(false);
|
||||
jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdCancel.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdCancel.setRequestFocusEnabled(false);
|
||||
jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdCancel);
|
||||
|
||||
jcmdOK.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jcmdOK.setText(AppLocal.getIntString("button.OK")); // NOI18N
|
||||
jcmdOK.setEnabled(false);
|
||||
jcmdOK.setFocusPainted(false);
|
||||
jcmdOK.setFocusable(false);
|
||||
jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdOK.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdOK.setRequestFocusEnabled(false);
|
||||
jcmdOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdOK);
|
||||
|
||||
jPanel2.add(jPanel1, java.awt.BorderLayout.PAGE_END);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel5.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jLabel5.setText(AppLocal.getIntString("label.epm.employee")); // NOI18N
|
||||
|
||||
m_jtxtName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
||||
jPanel7.setLayout(jPanel7Layout);
|
||||
jPanel7Layout.setHorizontalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel7Layout.setVerticalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jButton1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/reload.png"))); // NOI18N
|
||||
jButton1.setText(AppLocal.getIntString("button.clean")); // NOI18N
|
||||
jButton1.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jButton1);
|
||||
|
||||
jButton3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jButton3.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
|
||||
jButton3.setFocusPainted(false);
|
||||
jButton3.setFocusable(false);
|
||||
jButton3.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jButton3.setRequestFocusEnabled(false);
|
||||
jButton3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton3ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jButton3);
|
||||
|
||||
jPanel5.add(jPanel6, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
jPanel4.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jListEmployees.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jListEmployees.setFocusable(false);
|
||||
jListEmployees.setRequestFocusEnabled(false);
|
||||
jListEmployees.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jListEmployeesMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
jListEmployees.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
||||
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
|
||||
jListEmployeesValueChanged(evt);
|
||||
}
|
||||
});
|
||||
jScrollPane1.setViewportView(jListEmployees);
|
||||
|
||||
jPanel4.add(jScrollPane1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel8.setLayout(new java.awt.BorderLayout());
|
||||
jPanel3.add(jPanel8, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
|
||||
|
||||
setSize(new java.awt.Dimension(683, 495));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
private void jcmdOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdOKActionPerformed
|
||||
|
||||
selectedEmployee = (EmployeeInfo) jListEmployees.getSelectedValue();
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdOKActionPerformed
|
||||
|
||||
private void jcmdCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdCancelActionPerformed
|
||||
|
||||
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
|
||||
|
||||
executeSearch();
|
||||
|
||||
}//GEN-LAST:event_jButton3ActionPerformed
|
||||
|
||||
private void jListEmployeesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListEmployeesValueChanged
|
||||
|
||||
jcmdOK.setEnabled(jListEmployees.getSelectedValue() != null);
|
||||
|
||||
}//GEN-LAST:event_jListEmployeesValueChanged
|
||||
|
||||
private void jListEmployeesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jListEmployeesMouseClicked
|
||||
|
||||
if (evt.getClickCount() == 2) {
|
||||
selectedEmployee = (EmployeeInfo) jListEmployees.getSelectedValue();
|
||||
dispose();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jListEmployeesMouseClicked
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
|
||||
m_jtxtName.reset();
|
||||
cleanSearch();
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JButton jButton3;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JList jListEmployees;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JPanel jPanel7;
|
||||
private javax.swing.JPanel jPanel8;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton jcmdCancel;
|
||||
private javax.swing.JButton jcmdOK;
|
||||
private com.unicenta.editor.JEditorKeys m_jKeys;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="btnCheckIn" min="-2" pref="256" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="btnCheckOut" min="-2" pref="248" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="message" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="message" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="btnCheckIn" alignment="3" min="-2" pref="49" max="-2" attributes="0"/>
|
||||
<Component id="btnCheckOut" alignment="3" min="-2" pref="49" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="80" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="btnCheckIn">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Check In"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[85, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCheckInActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnCheckOut">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Check Out"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCheckOutActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[570, 120]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="message">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" id="white" palette="0" red="ff" type="palette"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<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="64" green="6f" id="Button.darkShadow" palette="3" red="71" type="palette"/>
|
||||
</LineBorder>
|
||||
</Border>
|
||||
<Border PropertyName="inside" info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="1" left="4" right="4" top="1"/>
|
||||
</Border>
|
||||
</CompoundBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[160, 25]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,327 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.beans.JFlowPanel;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Date;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class JPanelEmployeePresence extends javax.swing.JPanel implements JPanelView, BeanFactoryApp {
|
||||
|
||||
private AppView app;
|
||||
private DataLogicPresenceManagement dlpresencemanagement;
|
||||
private JFlowPanel jBreaks;
|
||||
|
||||
/** Creates new form JPanelEmployeePresence */
|
||||
public JPanelEmployeePresence() {
|
||||
initComponents();
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
@Override
|
||||
public void init(AppView app) throws BeanFactoryException {
|
||||
this.app = app;
|
||||
dlpresencemanagement = (DataLogicPresenceManagement) app.getBean("com.unicenta.pos.epm.DataLogicPresenceManagement");
|
||||
}
|
||||
|
||||
private void listBreaks()
|
||||
{
|
||||
try {
|
||||
jScrollPane1.getViewport().setView(null);
|
||||
jBreaks = new JFlowPanel();
|
||||
jBreaks.applyComponentOrientation(getComponentOrientation());
|
||||
java.util.List breaks = dlpresencemanagement.listBreaksVisible();
|
||||
for (int i = 0; i < breaks.size(); i++) {
|
||||
|
||||
Break m_break = (Break) breaks.get(i);
|
||||
|
||||
JButton btn = new JButton(new BreakAction(m_break));
|
||||
btn.applyComponentOrientation(getComponentOrientation());
|
||||
btn.setFocusPainted(false);
|
||||
btn.setFocusable(false);
|
||||
btn.setRequestFocusEnabled(false);
|
||||
btn.setHorizontalAlignment(SwingConstants.LEADING);
|
||||
btn.setMaximumSize(new Dimension(190, 50));
|
||||
btn.setPreferredSize(new Dimension(190, 50));
|
||||
btn.setMinimumSize(new Dimension(190, 50));
|
||||
|
||||
jBreaks.add(btn);
|
||||
}
|
||||
jScrollPane1.getViewport().setView(jBreaks);
|
||||
|
||||
} catch (BasicException ee) {
|
||||
}
|
||||
}
|
||||
|
||||
private class BreakAction extends AbstractAction {
|
||||
|
||||
private Break m_break;
|
||||
|
||||
public BreakAction(Break aBreak) {
|
||||
m_break = aBreak;
|
||||
putValue(Action.NAME, m_break.getName());
|
||||
}
|
||||
|
||||
public Break getBreak() {
|
||||
return m_break;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
try {
|
||||
dlpresencemanagement.StartBreak(app.getAppUserView().getUser().getId(), m_break.getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.leavefor")+" "+ m_break.getName()+" "+AppLocal.getIntString("message.at")+" "+Formats.TIMESTAMP.formatValue(new Date()));
|
||||
BreakAction();
|
||||
} catch (BasicException ex) {
|
||||
message.setText(AppLocal.getIntString("message.probleminbreak"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.CheckInCheckOut");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
boolean isOnLeave = dlpresencemanagement.IsOnLeave(app.getAppUserView().getUser().getId());
|
||||
listBreaks();
|
||||
if (isOnLeave) {
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.leavecontrol"));
|
||||
LeaveAction();
|
||||
} else {
|
||||
boolean isCheckedIn = dlpresencemanagement.IsCheckedIn(app.getAppUserView().getUser().getId());
|
||||
if (isCheckedIn) {
|
||||
Date lastCheckIn = dlpresencemanagement.GetLastCheckIn(app.getAppUserView().getUser().getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedin")+" "+Formats.TIMESTAMP.formatValue(lastCheckIn));
|
||||
CheckInAction();
|
||||
} else {
|
||||
Date lastCheckOut = dlpresencemanagement.GetLastCheckOut(app.getAppUserView().getUser().getId());
|
||||
if (lastCheckOut != null) {
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedout")+" "+Formats.TIMESTAMP.formatValue(lastCheckOut));
|
||||
} else {
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.noshift"));
|
||||
}
|
||||
CheckOutAction();
|
||||
}
|
||||
boolean isOnBreak = dlpresencemanagement.IsOnBreak(app.getAppUserView().getUser().getId());
|
||||
if (isOnBreak) {
|
||||
Object[] LastBreak = (Object[]) dlpresencemanagement.GetLastBreak(app.getAppUserView().getUser().getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.leavefor")+" "+(String) LastBreak[0] +" "+AppLocal.getIntString("message.at")+" "+ Formats.TIMESTAMP.formatValue((Date) LastBreak[1]));
|
||||
BreakAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getBean() {
|
||||
return this;
|
||||
}
|
||||
|
||||
private void CheckInAction() {
|
||||
btnCheckIn.setEnabled(false);
|
||||
btnCheckOut.setEnabled(true);
|
||||
jBreaks.setEnabled(true);
|
||||
}
|
||||
|
||||
private void CheckOutAction() {
|
||||
btnCheckIn.setEnabled(true);
|
||||
btnCheckOut.setEnabled(false);
|
||||
jBreaks.setEnabled(false);
|
||||
}
|
||||
|
||||
private void BreakAction() {
|
||||
btnCheckIn.setEnabled(true);
|
||||
btnCheckOut.setEnabled(true);
|
||||
jBreaks.setEnabled(false);
|
||||
}
|
||||
|
||||
private void LeaveAction() {
|
||||
btnCheckIn.setEnabled(false);
|
||||
btnCheckOut.setEnabled(false);
|
||||
jBreaks.setEnabled(false);
|
||||
}
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
btnCheckIn = new javax.swing.JButton();
|
||||
btnCheckOut = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
message = new javax.swing.JLabel();
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(0, 45));
|
||||
|
||||
btnCheckIn.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
btnCheckIn.setText("Check In");
|
||||
btnCheckIn.setMaximumSize(new java.awt.Dimension(85, 23));
|
||||
btnCheckIn.setPreferredSize(new java.awt.Dimension(0, 45));
|
||||
btnCheckIn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnCheckInActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnCheckOut.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
btnCheckOut.setText("Check Out");
|
||||
btnCheckOut.setPreferredSize(new java.awt.Dimension(0, 45));
|
||||
btnCheckOut.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnCheckOutActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
jScrollPane1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(570, 120));
|
||||
|
||||
message.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
message.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
message.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
|
||||
message.setOpaque(true);
|
||||
message.setPreferredSize(new java.awt.Dimension(160, 25));
|
||||
message.setRequestFocusEnabled(false);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(btnCheckIn, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(btnCheckOut, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(message, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(message, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnCheckIn, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnCheckOut, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(80, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void btnCheckInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheckInActionPerformed
|
||||
try {
|
||||
boolean isOnBreak = dlpresencemanagement.IsOnBreak(app.getAppUserView().getUser().getId());
|
||||
if (isOnBreak) {
|
||||
dlpresencemanagement.EndBreak(app.getAppUserView().getUser().getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+AppLocal.getIntString("message.breakoverandcheckedin")+" "+Formats.TIMESTAMP.formatValue(new Date()));
|
||||
} else {
|
||||
dlpresencemanagement.CheckIn(app.getAppUserView().getUser().getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedin")+" "+Formats.TIMESTAMP.formatValue(new Date()));
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotcheckin"));
|
||||
msg.show(this);
|
||||
}
|
||||
CheckInAction();
|
||||
}//GEN-LAST:event_btnCheckInActionPerformed
|
||||
|
||||
private void btnCheckOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheckOutActionPerformed
|
||||
try {
|
||||
boolean isOnBreak = dlpresencemanagement.IsOnBreak(app.getAppUserView().getUser().getId());
|
||||
if (isOnBreak) {
|
||||
dlpresencemanagement.EndBreak(app.getAppUserView().getUser().getId());
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.breakoverandcheckedout")+" "+Formats.TIMESTAMP.formatValue(new Date()));
|
||||
} else {
|
||||
message.setText(app.getAppUserView().getUser().getName()+" "+AppLocal.getIntString("message.checkedout")+" "+Formats.TIMESTAMP.formatValue(new Date()));
|
||||
}
|
||||
dlpresencemanagement.CheckOut(app.getAppUserView().getUser().getId());
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotcheckout"));
|
||||
msg.show(this);
|
||||
}
|
||||
CheckOutAction();
|
||||
}//GEN-LAST:event_btnCheckOutActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnCheckIn;
|
||||
private javax.swing.JButton btnCheckOut;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JLabel message;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class LeavesInfo implements IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 8936482715929L;
|
||||
private String m_sID;
|
||||
private String m_sName;
|
||||
private String m_sEmployeeID;
|
||||
private String m_sStartDate;
|
||||
private String m_sEndDate;
|
||||
private String m_sNotes;
|
||||
|
||||
|
||||
/** Creates new LeavesInfo
|
||||
* @param id
|
||||
* @param name
|
||||
* @param notes
|
||||
* @param startdate
|
||||
* @param employeeid
|
||||
* @param enddate */
|
||||
public LeavesInfo(String id, String name, String employeeid, String startdate, String enddate, String notes) {
|
||||
m_sID = id;
|
||||
m_sName = name;
|
||||
m_sEmployeeID = employeeid;
|
||||
m_sStartDate = startdate;
|
||||
m_sEndDate = enddate;
|
||||
m_sNotes = notes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sID
|
||||
*/
|
||||
public void setID(String sID) {
|
||||
m_sID = sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getID() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sName
|
||||
*/
|
||||
public void setName(String sName) {
|
||||
m_sName = sName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getEmployeeID() {
|
||||
return m_sEmployeeID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param EmployeeID
|
||||
*/
|
||||
public void setEmployeeID(String EmployeeID) {
|
||||
this.m_sEmployeeID = EmployeeID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getStartDate() {
|
||||
return m_sStartDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param StartDate
|
||||
*/
|
||||
public void setStartDate(String StartDate) {
|
||||
this.m_sStartDate = StartDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getEndDate() {
|
||||
return m_sEndDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param EndDate
|
||||
*/
|
||||
public void setEndDate(String EndDate) {
|
||||
this.m_sEndDate = EndDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getNotes() {
|
||||
return m_sNotes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Notes
|
||||
*/
|
||||
public void setNotes(String Notes) {
|
||||
this.m_sNotes = Notes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public class LeavesPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tleaves;
|
||||
private LeavesView jeditor;
|
||||
|
||||
/** Creates a new instance of LeavesPanel */
|
||||
public LeavesPanel() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicPresenceManagement dlPresenceManagement = (DataLogicPresenceManagement) app.getBean("com.unicenta.pos.epm.DataLogicPresenceManagement");
|
||||
tleaves = dlPresenceManagement.getTableLeaves();
|
||||
jeditor = new LeavesView(app, dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
jeditor.activate();
|
||||
super.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tleaves);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tleaves, new int[] {0, 1, 2, 3, 4, 5});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tleaves.getVectorerBasic(new int[]{2, 5});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tleaves.getComparatorCreator(new int[] {2, 3, 4, 5});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tleaves.getRenderStringBasic(new int[]{2}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Leaves");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="m_Notes" alignment="1" pref="126" max="32767" attributes="1"/>
|
||||
<Component id="m_EndDate" pref="126" max="32767" attributes="1"/>
|
||||
<Component id="m_StartDate" alignment="0" pref="126" max="32767" attributes="1"/>
|
||||
<Component id="m_Name" alignment="0" pref="126" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="m_jEndDate" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="m_jStartDate" max="32767" attributes="1"/>
|
||||
<Component id="m_jEmployeeName" alignment="0" pref="172" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnStartDate" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="btnEmployee" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="btnEndDate" alignment="0" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" pref="258" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="77" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="m_Name" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jEmployeeName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="btnEmployee" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="m_StartDate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jStartDate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="btnStartDate" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnEndDate" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="m_EndDate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jEndDate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_Notes" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="141" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextField" name="m_jEmployeeName">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="m_jLeaveNote">
|
||||
<Properties>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Monospaced" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="m_Name">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.employee" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</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="m_StartDate">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.startdate" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</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="m_EndDate">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.enddate" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</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.JTextField" name="m_jStartDate">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" 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="m_Notes">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.epm.notes" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</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.JButton" name="btnEmployee">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/user_sml.png"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[57, 33]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[57, 33]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnEmployeeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnEndDate">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/date.png"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnEndDateActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnStartDate">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/date.png"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnStartDateActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jEndDate">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,432 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.epm;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.beans.JCalendarDialog;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.data.loader.SentenceList;
|
||||
import com.unicenta.data.user.DirtyManager;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import java.awt.Component;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ali Safdar and Aneeqa Baber
|
||||
*/
|
||||
public final class LeavesView extends javax.swing.JPanel implements EditorRecord {
|
||||
|
||||
private Object m_oId;
|
||||
private Object m_employeeid;
|
||||
private SentenceList m_sentcat;
|
||||
|
||||
private DirtyManager m_Dirty;
|
||||
private DataLogicPresenceManagement dlPresenceManagement;
|
||||
|
||||
/** Creates new form LeavesView
|
||||
* @param app
|
||||
* @param dirty */
|
||||
public LeavesView(AppView app, DirtyManager dirty) {
|
||||
|
||||
dlPresenceManagement = (DataLogicPresenceManagement) app.getBean("com.unicenta.pos.epm.DataLogicPresenceManagement");
|
||||
initComponents();
|
||||
|
||||
m_sentcat = dlPresenceManagement.getLeavesList();
|
||||
m_Dirty = dirty;
|
||||
m_jEmployeeName.getDocument().addDocumentListener(dirty);
|
||||
m_jStartDate.getDocument().addDocumentListener(dirty);
|
||||
m_jEndDate.getDocument().addDocumentListener(dirty);
|
||||
m_jLeaveNote.getDocument().addDocumentListener(dirty);
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
void activate() throws BasicException {
|
||||
List a = m_sentcat.list();
|
||||
a.add(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
m_oId = null;
|
||||
m_jEmployeeName.setText(null);
|
||||
m_jStartDate.setText(null);
|
||||
m_jEndDate.setText(null);
|
||||
m_jLeaveNote.setText(null);
|
||||
m_jEmployeeName.setEditable(false);
|
||||
m_jStartDate.setEnabled(false);
|
||||
m_jEndDate.setEnabled(false);
|
||||
m_jLeaveNote.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
m_oId = null;
|
||||
m_jEmployeeName.setText(null);
|
||||
m_jStartDate.setText(null);
|
||||
m_jEndDate.setText(null);
|
||||
m_jLeaveNote.setText(null);
|
||||
m_jEmployeeName.setEditable(true);
|
||||
m_jStartDate.setEnabled(true);
|
||||
m_jEndDate.setEnabled(true);
|
||||
m_jLeaveNote.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
Object[] leaves = (Object[]) value;
|
||||
m_oId = leaves[0];
|
||||
m_employeeid = leaves[1];
|
||||
m_jEmployeeName.setText((String) leaves[2]);
|
||||
m_jStartDate.setText(Formats.TIMESTAMP.formatValue((Date) leaves[3]));
|
||||
m_jEndDate.setText(Formats.TIMESTAMP.formatValue((Date) leaves[4]));
|
||||
m_jLeaveNote.setText((String) leaves[5]);
|
||||
m_jEmployeeName.setEditable(true);
|
||||
m_jStartDate.setEnabled(true);
|
||||
m_jEndDate.setEnabled(true);
|
||||
m_jLeaveNote.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
Object[] leaves = (Object[]) value;
|
||||
m_oId = leaves[0];
|
||||
m_employeeid = leaves[1];
|
||||
m_jEmployeeName.setText((String) leaves[2]);
|
||||
m_jStartDate.setText(Formats.TIMESTAMP.formatValue((Date) leaves[3]));
|
||||
m_jEndDate.setText(Formats.TIMESTAMP.formatValue((Date) leaves[4]));
|
||||
m_jLeaveNote.setText((String) leaves[5]);
|
||||
m_jEmployeeName.setEditable(false);
|
||||
m_jStartDate.setEnabled(false);
|
||||
m_jEndDate.setEnabled(false);
|
||||
m_jLeaveNote.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] leaves = new Object[6];
|
||||
leaves[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
|
||||
leaves[1] = m_employeeid;
|
||||
leaves[2] = m_jEmployeeName.getText();
|
||||
leaves[3] = (Date) Formats.TIMESTAMP.parseValue(m_jStartDate.getText());
|
||||
leaves[4] = (Date) Formats.TIMESTAMP.parseValue(m_jEndDate.getText());
|
||||
leaves[5] = m_jLeaveNote.getText();
|
||||
boolean isCheckedIn = dlPresenceManagement.IsCheckedIn((String) m_employeeid);
|
||||
Date startDate = (Date) Formats.TIMESTAMP.parseValue(m_jStartDate.getText());
|
||||
Date endDate = (Date) Formats.TIMESTAMP.parseValue(m_jEndDate.getText());
|
||||
Date systemDate = new Date();
|
||||
if (isCheckedIn && startDate.before(systemDate) && endDate.after(systemDate)) {
|
||||
dlPresenceManagement.BlockEmployee((String) m_employeeid);
|
||||
}
|
||||
return leaves;
|
||||
}
|
||||
// TODO - rewrite IsValidEndDate using Apache commons or Calendar
|
||||
|
||||
private boolean IsValidEndDate(Date date) {
|
||||
Date systemDate = new Date();
|
||||
if (! m_jStartDate.getText().equals("")) {
|
||||
Date startdate;
|
||||
try {
|
||||
startdate = (Date) Formats.TIMESTAMP.parseValue(m_jStartDate.getText());
|
||||
return (startdate.before(date)
|
||||
|| (startdate.getDate() == date.getDate()
|
||||
&& startdate.getMonth() == date.getMonth()
|
||||
&& startdate.getYear() == date.getYear()));
|
||||
|
||||
} catch (BasicException ex) {
|
||||
}
|
||||
}
|
||||
return (systemDate.before(date)
|
||||
|| (systemDate.getDate() == date.getDate()
|
||||
&& systemDate.getMonth() == date.getMonth()
|
||||
&& systemDate.getYear() == date.getYear()));
|
||||
}
|
||||
|
||||
// TODO - rewrite IsValidStartDate using Apache commons or Calendar
|
||||
|
||||
private boolean IsValidStartDate(Date date) {
|
||||
Date systemDate = new Date();
|
||||
boolean validEndDate = true;
|
||||
if (! m_jEndDate.getText().equals("")) {
|
||||
try {
|
||||
Date enddate = (Date) Formats.TIMESTAMP.parseValue(m_jEndDate.getText());
|
||||
validEndDate = (enddate.after(date)
|
||||
|| (enddate.getDate() == date.getDate()
|
||||
&& enddate.getMonth() == date.getMonth()
|
||||
&& enddate.getYear() == date.getYear()));
|
||||
} catch (BasicException ex) {
|
||||
}
|
||||
}
|
||||
return validEndDate && (systemDate.before(date)
|
||||
|| (systemDate.getDate() == date.getDate()
|
||||
&& systemDate.getMonth() == date.getMonth()
|
||||
&& systemDate.getYear() == date.getYear()));
|
||||
}
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
m_jEmployeeName = new javax.swing.JTextField();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
m_jLeaveNote = new javax.swing.JTextArea();
|
||||
m_Name = new javax.swing.JLabel();
|
||||
m_StartDate = new javax.swing.JLabel();
|
||||
m_EndDate = new javax.swing.JLabel();
|
||||
m_jStartDate = new javax.swing.JTextField();
|
||||
m_Notes = new javax.swing.JLabel();
|
||||
btnEmployee = new javax.swing.JButton();
|
||||
btnEndDate = new javax.swing.JButton();
|
||||
btnStartDate = new javax.swing.JButton();
|
||||
m_jEndDate = new javax.swing.JTextField();
|
||||
|
||||
m_jEmployeeName.setEditable(false);
|
||||
m_jEmployeeName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jEmployeeName.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jLeaveNote.setColumns(20);
|
||||
m_jLeaveNote.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N
|
||||
m_jLeaveNote.setLineWrap(true);
|
||||
m_jLeaveNote.setRows(5);
|
||||
jScrollPane1.setViewportView(m_jLeaveNote);
|
||||
|
||||
m_Name.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
m_Name.setText(bundle.getString("label.epm.employee")); // NOI18N
|
||||
m_Name.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_StartDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_StartDate.setText(AppLocal.getIntString("label.epm.startdate")); // NOI18N
|
||||
m_StartDate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_EndDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_EndDate.setText(AppLocal.getIntString("label.epm.enddate")); // NOI18N
|
||||
m_EndDate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jStartDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jStartDate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_Notes.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_Notes.setText(AppLocal.getIntString("label.epm.notes")); // NOI18N
|
||||
m_Notes.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
btnEmployee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/user_sml.png"))); // NOI18N
|
||||
btnEmployee.setFocusPainted(false);
|
||||
btnEmployee.setFocusable(false);
|
||||
btnEmployee.setMaximumSize(new java.awt.Dimension(57, 33));
|
||||
btnEmployee.setMinimumSize(new java.awt.Dimension(57, 33));
|
||||
btnEmployee.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
btnEmployee.setRequestFocusEnabled(false);
|
||||
btnEmployee.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnEmployeeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnEndDate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/date.png"))); // NOI18N
|
||||
btnEndDate.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
btnEndDate.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnEndDateActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnStartDate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/date.png"))); // NOI18N
|
||||
btnStartDate.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
btnStartDate.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnStartDateActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
m_jEndDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
m_jEndDate.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(m_Notes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(m_EndDate, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(m_StartDate, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(m_Name, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(m_jEndDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(m_jStartDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(m_jEmployeeName, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnStartDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(btnEmployee, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(btnEndDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE))
|
||||
.addGap(77, 77, 77))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jEmployeeName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(btnEmployee, 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.LEADING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_StartDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(btnStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_EndDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_Notes, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void btnEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEmployeeActionPerformed
|
||||
|
||||
JEmployeeFinder finder = JEmployeeFinder.getEmployeeFinder(this, dlPresenceManagement);
|
||||
finder.search(null);
|
||||
finder.setVisible(true);
|
||||
|
||||
try {
|
||||
m_jEmployeeName.setText(finder.getSelectedEmployee() == null
|
||||
? null
|
||||
: dlPresenceManagement.loadEmployeeExt(finder.getSelectedEmployee().getId()).toString());
|
||||
m_employeeid = finder.getSelectedEmployee() == null
|
||||
? null
|
||||
:finder.getSelectedEmployee().getId();
|
||||
} catch (BasicException e) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindemployee"), e);
|
||||
msg.show(this);
|
||||
}
|
||||
}//GEN-LAST:event_btnEmployeeActionPerformed
|
||||
|
||||
private void btnEndDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEndDateActionPerformed
|
||||
Date date;
|
||||
try {
|
||||
date = (Date) Formats.TIMESTAMP.parseValue(m_jEndDate.getText());
|
||||
} catch (BasicException e) {
|
||||
date = null;
|
||||
}
|
||||
date = JCalendarDialog.showCalendarTimeHours(this, date);
|
||||
if (date != null) {
|
||||
if (IsValidEndDate(date)) {
|
||||
m_jEndDate.setText(Formats.TIMESTAMP.formatValue(date));
|
||||
} else {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.invalidenddate"));
|
||||
msg.show(this);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_btnEndDateActionPerformed
|
||||
|
||||
private void btnStartDateActionPerformed(java.awt.event.ActionEvent evt) {
|
||||
Date date;
|
||||
try {
|
||||
date = (Date) Formats.TIMESTAMP.parseValue(m_jStartDate.getText());
|
||||
} catch (BasicException e) {
|
||||
date = null;
|
||||
}
|
||||
date = JCalendarDialog.showCalendarTimeHours(this, date);
|
||||
if (date != null) {
|
||||
if (IsValidStartDate(date)) {
|
||||
m_jStartDate.setText(Formats.TIMESTAMP.formatValue(date));
|
||||
} else {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.invalidstartdate"));
|
||||
msg.show(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnEmployee;
|
||||
private javax.swing.JButton btnEndDate;
|
||||
private javax.swing.JButton btnStartDate;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JLabel m_EndDate;
|
||||
private javax.swing.JLabel m_Name;
|
||||
private javax.swing.JLabel m_Notes;
|
||||
private javax.swing.JLabel m_StartDate;
|
||||
private javax.swing.JTextField m_jEmployeeName;
|
||||
private javax.swing.JTextField m_jEndDate;
|
||||
private javax.swing.JTextArea m_jLeaveNote;
|
||||
private javax.swing.JTextField m_jStartDate;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,400 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
/**
|
||||
* Creation and Editing of stored settings
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
@Slf4j
|
||||
public class AppConfig implements AppProperties {
|
||||
|
||||
private static AppConfig m_instance = null;
|
||||
private Properties properties;
|
||||
private File configfile;
|
||||
|
||||
/**
|
||||
* Set configuration array
|
||||
*
|
||||
* @param args array strings
|
||||
*/
|
||||
public AppConfig(String[] args) {
|
||||
if (args.length == 0) {
|
||||
init(getDefaultConfig());
|
||||
} else {
|
||||
init(new File(args[0]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* unicenta resources file
|
||||
*
|
||||
* @param configfile resource file
|
||||
*/
|
||||
public AppConfig(File configfile) {
|
||||
init(configfile);
|
||||
this.configfile = configfile;
|
||||
properties = new Properties();
|
||||
load();
|
||||
//log.debug("Reading configuration file: {}", configfile.getAbsolutePath());
|
||||
}
|
||||
|
||||
private void init(File configfile) {
|
||||
this.configfile = configfile;
|
||||
properties = new Properties();
|
||||
//log.debug("Reading configuration file: {}", configfile.getAbsolutePath());
|
||||
}
|
||||
|
||||
private File getDefaultConfig() {
|
||||
return new File(new File(System.getProperty("user.home"))
|
||||
, AppLocal.APP_ID + ".properties");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get key pair value from properties resource
|
||||
*
|
||||
* @param sKey key pair value
|
||||
* @return key pair from .properties filename
|
||||
*/
|
||||
@Override
|
||||
public String getProperty(String sKey) {
|
||||
return properties.getProperty(sKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Machine name
|
||||
*/
|
||||
@Override
|
||||
public String getHost() {
|
||||
return getProperty("machine.hostname");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return .properties filename
|
||||
*/
|
||||
@Override
|
||||
public File getConfigFile() {
|
||||
return configfile;
|
||||
}
|
||||
|
||||
|
||||
public String getTicketHeaderLine1() {
|
||||
return getProperty("tkt.header1");
|
||||
}
|
||||
|
||||
public String getTicketHeaderLine2() {
|
||||
return getProperty("tkt.header2");
|
||||
}
|
||||
|
||||
public String getTicketHeaderLine3() {
|
||||
return getProperty("tkt.header3");
|
||||
}
|
||||
|
||||
public String getTicketHeaderLine4() {
|
||||
return getProperty("tkt.header4");
|
||||
}
|
||||
|
||||
public String getTicketHeaderLine5() {
|
||||
return getProperty("tkt.header5");
|
||||
}
|
||||
|
||||
public String getTicketHeaderLine6() {
|
||||
return getProperty("tkt.header6");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine1() {
|
||||
return getProperty("tkt.footer1");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine2() {
|
||||
return getProperty("tkt.footer2");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine3() {
|
||||
return getProperty("tkt.footer3");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine4() {
|
||||
return getProperty("tkt.footer4");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine5() {
|
||||
return getProperty("tkt.footer5");
|
||||
}
|
||||
|
||||
public String getTicketFooterLine6() {
|
||||
return getProperty("tkt.footer6");
|
||||
}
|
||||
|
||||
/**
|
||||
* Update .properties resource key pair values
|
||||
*
|
||||
* @param sKey key pair left side
|
||||
* @param sValue key pair right side value
|
||||
*/
|
||||
public void setProperty(String sKey, String sValue) {
|
||||
if (sValue == null) {
|
||||
properties.remove(sKey);
|
||||
} else {
|
||||
properties.setProperty(sKey, sValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Local machine identity
|
||||
*
|
||||
* @return Machine name from OS
|
||||
*/
|
||||
private String getLocalHostName() {
|
||||
try {
|
||||
return java.net.InetAddress.getLocalHost().getHostName();
|
||||
} catch (java.net.UnknownHostException eUH) {
|
||||
return "localhost";
|
||||
}
|
||||
}
|
||||
|
||||
public static AppConfig getInstance() {
|
||||
|
||||
if (m_instance == null) {
|
||||
m_instance = new AppConfig(new File(System.getProperty("user.home")
|
||||
, AppLocal.APP_ID + ".properties"));
|
||||
}
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
public Boolean getBoolean(String sKey) {
|
||||
return Boolean.valueOf(properties.getProperty(sKey));
|
||||
}
|
||||
|
||||
public void setBoolean(String sKey, Boolean sValue) {
|
||||
if (sValue == null) {
|
||||
properties.remove(sKey);
|
||||
} else if (sValue) {
|
||||
properties.setProperty(sKey, "true");
|
||||
} else {
|
||||
properties.setProperty(sKey, "false");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Delete .properties filename
|
||||
*/
|
||||
public boolean delete() {
|
||||
loadDefault();
|
||||
return configfile.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get instance settings
|
||||
*/
|
||||
public void load() {
|
||||
|
||||
loadDefault();
|
||||
|
||||
try {
|
||||
InputStream in = new FileInputStream(configfile);
|
||||
if (in != null) {
|
||||
properties.load(in);
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
loadDefault();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void refreshProperties() {
|
||||
try {
|
||||
InputStream in = new FileInputStream(configfile);
|
||||
if (in != null) {
|
||||
properties.load(in);
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
loadDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 0 or 00 number keypad boolean true/false
|
||||
*/
|
||||
public Boolean isPriceWith00() {
|
||||
String prop = getProperty("pricewith00");
|
||||
if (prop == null) {
|
||||
return false;
|
||||
} else {
|
||||
return prop.equals("true");
|
||||
}
|
||||
}
|
||||
|
||||
public void saveWithExistingProperties() throws IOException {
|
||||
|
||||
refreshProperties();
|
||||
|
||||
OutputStream out = new FileOutputStream(configfile);
|
||||
if (out != null) {
|
||||
properties.store(out, AppLocal.APP_NAME + ". Configuration file.");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save values to properties file
|
||||
*
|
||||
* @throws java.io.IOException explicit on OS
|
||||
*/
|
||||
public void save() throws IOException {
|
||||
|
||||
OutputStream out = new FileOutputStream(configfile);
|
||||
if (out != null) {
|
||||
properties.store(out, AppLocal.APP_NAME + ". Configuration file.");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void loadDefault() {
|
||||
|
||||
properties = new Properties();
|
||||
String dirname = System.getProperty("dirname.path");
|
||||
dirname = dirname == null ? "./" : dirname;
|
||||
|
||||
setDatabaseProperties(properties, dirname);
|
||||
setPrinterProperties(properties);
|
||||
setLocalProperties(properties);
|
||||
setPaymentProperties(properties);
|
||||
setDeviceProperties(properties);
|
||||
setTableProperties(properties);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void setTableProperties(Properties properties){
|
||||
properties.setProperty("table.showcustomerdetails", "true");
|
||||
properties.setProperty("table.customercolour", "#58B000");
|
||||
properties.setProperty("table.showwaiterdetails", "true");
|
||||
properties.setProperty("table.waitercolour", "#258FB0");
|
||||
properties.setProperty("table.tablecolour", "#D62E52");
|
||||
properties.setProperty("till.amountattop", "true");
|
||||
properties.setProperty("till.hideinfo", "true");
|
||||
}
|
||||
|
||||
private void setDeviceProperties(Properties properties) {
|
||||
properties.setProperty("machine.display", "screen");
|
||||
properties.setProperty("machine.scale", "Not defined");
|
||||
properties.setProperty("machine.screenmode", "fullscreen");
|
||||
properties.setProperty("machine.ticketsbag", "standard");
|
||||
properties.setProperty("machine.scanner", "Not defined");
|
||||
properties.setProperty("machine.iButton", "false");
|
||||
properties.setProperty("machine.iButtonResponse", "5");
|
||||
properties.setProperty("machine.uniqueinstance", "true");
|
||||
|
||||
properties.setProperty("machine.hostname", getLocalHostName());
|
||||
properties.setProperty("swing.defaultlaf", System.getProperty("swing.defaultlaf","javax.swing.plaf.metal.MetalLookAndFeel"));
|
||||
}
|
||||
|
||||
private void setPaymentProperties(Properties properties) {
|
||||
properties.setProperty("payment.gateway", "external");
|
||||
properties.setProperty("payment.magcardreader", "Not defined");
|
||||
properties.setProperty("payment.testmode", "true");
|
||||
properties.setProperty("payment.commerceid", "");
|
||||
properties.setProperty("payment.commercepassword", "password");
|
||||
}
|
||||
|
||||
private void setLocalProperties(Properties properties) {
|
||||
Locale l = Locale.getDefault();
|
||||
properties.setProperty("user.language", l.getLanguage());
|
||||
properties.setProperty("user.country", l.getCountry());
|
||||
properties.setProperty("user.variant", l.getVariant());
|
||||
}
|
||||
|
||||
private void setPrinterProperties(Properties properties) {
|
||||
// Receipt printer paper set to 72mmx200mm
|
||||
properties.setProperty("paper.receipt.x", "10");
|
||||
properties.setProperty("paper.receipt.y", "10");
|
||||
properties.setProperty("paper.receipt.width", "190");
|
||||
properties.setProperty("paper.receipt.height", "546");
|
||||
properties.setProperty("paper.receipt.mediasizename", "A4");
|
||||
|
||||
// Normal printer paper for A4
|
||||
properties.setProperty("paper.standard.x", "72");
|
||||
properties.setProperty("paper.standard.y", "72");
|
||||
properties.setProperty("paper.standard.width", "451");
|
||||
properties.setProperty("paper.standard.height", "698");
|
||||
properties.setProperty("paper.standard.mediasizename", "A4");
|
||||
|
||||
properties.setProperty("tkt.header1", "uniCenta oPOS");
|
||||
properties.setProperty("tkt.header2", "Touch Friendly Point Of Sale");
|
||||
properties.setProperty("tkt.header3", "Copyright (c) 2009-2018 uniCenta");
|
||||
properties.setProperty("tkt.header4", "Change header text in Configuration");
|
||||
|
||||
properties.setProperty("tkt.footer1", "Change footer text in Configuration");
|
||||
properties.setProperty("tkt.footer2", "Thank you for your custom");
|
||||
properties.setProperty("tkt.footer3", "Please Call Again");
|
||||
|
||||
properties.setProperty("machine.printer", "screen");
|
||||
properties.setProperty("machine.printer.2", "Not defined");
|
||||
properties.setProperty("machine.printer.3", "Not defined");
|
||||
properties.setProperty("machine.printer.4", "Not defined");
|
||||
properties.setProperty("machine.printer.5", "Not defined");
|
||||
properties.setProperty("machine.printer.6", "Not defined");
|
||||
|
||||
properties.setProperty("machine.printername", "(Default)");
|
||||
properties.setProperty("screen.receipt.columns", "42");
|
||||
}
|
||||
|
||||
private void setDatabaseProperties(Properties properties, String dirname) {
|
||||
|
||||
properties.setProperty("db.multi", "false");
|
||||
properties.setProperty("override.check", "false");
|
||||
properties.setProperty("override.pin", "");
|
||||
|
||||
// Default database
|
||||
properties.setProperty("db.driverlib", new File(new File(dirname), "derby-10.14.2.0.jar").getAbsolutePath());
|
||||
properties.setProperty("db.engine", "Derby");
|
||||
properties.setProperty("db.driver", "org.apache.derby.jdbc.EmbeddedDriver");
|
||||
|
||||
properties.setProperty("db.name", "Main DB");
|
||||
properties.setProperty("db.URL", "jdbc:derby:" + System.getProperty("user.home")+"/.unicenta/");
|
||||
properties.setProperty("db.schema", "unicentaopos-database;create=true");
|
||||
properties.setProperty("db.options", "");
|
||||
properties.setProperty("db.user", "");
|
||||
properties.setProperty("db.password", "");
|
||||
|
||||
|
||||
// secondary DB
|
||||
properties.setProperty("db1.name", "");
|
||||
properties.setProperty("db1.URL", "jdbc:mysql://localhost:3306/");
|
||||
properties.setProperty("db1.schema", "unicentaopos");
|
||||
properties.setProperty("db1.options", "?zeroDateTimeBehavior=convertToNull");
|
||||
properties.setProperty("db1.user", "");
|
||||
properties.setProperty("db1.password", "");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import com.unicenta.beans.LocaleResources;
|
||||
|
||||
/**
|
||||
* @author Jack Gerrard
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class AppLocal {
|
||||
|
||||
|
||||
public static final String APP_NAME = "uniCenta oPOS";
|
||||
public static final String APP_ID = "unicentaopos";
|
||||
public static final String APP_VERSION = "5.0";
|
||||
|
||||
private static final LocaleResources m_resources;
|
||||
|
||||
static {
|
||||
m_resources = new LocaleResources();
|
||||
m_resources.addBundleName("pos_messages");
|
||||
m_resources.addBundleName("erp_messages");
|
||||
}
|
||||
|
||||
/** Creates a new instance of AppLocal */
|
||||
private AppLocal() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sKey local values
|
||||
* @return string values
|
||||
*/
|
||||
public static String getIntString(String sKey) {
|
||||
return m_resources.getString(sKey);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sKey local values
|
||||
* @param sValues string values
|
||||
* @return string values
|
||||
*/
|
||||
public static String getIntString(String sKey, Object ... sValues) {
|
||||
return m_resources.getString(sKey, sValues);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface AppProperties {
|
||||
|
||||
/**
|
||||
* Gets the configuration properties settings
|
||||
* @return config file
|
||||
*/
|
||||
public File getConfigFile();
|
||||
|
||||
/**
|
||||
* Gets the Host machine name
|
||||
* @return host name
|
||||
*/
|
||||
public String getHost();
|
||||
|
||||
/**
|
||||
* Read the property from the key pair
|
||||
* @param sKey key pair value
|
||||
* @return key pair property
|
||||
*/
|
||||
public String getProperty(String sKey);
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import com.unicenta.data.loader.LocalRes;
|
||||
import com.unicenta.pos.ticket.UserInfo;
|
||||
import com.unicenta.pos.util.Hashcypher;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author adrianromero
|
||||
*/
|
||||
@Slf4j
|
||||
public class AppUser {
|
||||
|
||||
private static SAXParser m_sp = null;
|
||||
private static HashMap<String, String> m_oldclasses; // This is for backwards compatibility purposes
|
||||
|
||||
private final String m_sId;
|
||||
private final String m_sName;
|
||||
private final String m_sCard;
|
||||
private String m_sPassword;
|
||||
private final String m_sRole;
|
||||
private final Icon m_Icon;
|
||||
|
||||
private Set<String> m_apermissions;
|
||||
|
||||
static {
|
||||
initOldClasses();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance of AppUser
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
* @param card
|
||||
* @param password
|
||||
* @param icon
|
||||
* @param role
|
||||
*/
|
||||
public AppUser(String id, String name, String password, String card, String role, Icon icon) {
|
||||
m_sId = id;
|
||||
m_sName = name;
|
||||
m_sPassword = password;
|
||||
m_sCard = card;
|
||||
m_sRole = role;
|
||||
m_Icon = icon;
|
||||
m_apermissions = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the User's button icon
|
||||
*/
|
||||
public Icon getIcon() {
|
||||
return m_Icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user's ID
|
||||
*/
|
||||
public String getId() {
|
||||
return m_sId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User's Name
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the User's Password
|
||||
*/
|
||||
public void setPassword(String sValue) {
|
||||
m_sPassword = sValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User's Password
|
||||
*/
|
||||
public String getPassword() {
|
||||
return m_sPassword;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User's Role
|
||||
*/
|
||||
public String getRole() {
|
||||
return m_sRole;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User's Card
|
||||
*/
|
||||
public String getCard() {
|
||||
return m_sCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate User's Password
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean authenticate() {
|
||||
return m_sPassword == null || m_sPassword.equals("") || m_sPassword.startsWith("empty:");
|
||||
}
|
||||
|
||||
/**
|
||||
* Eval User's Password
|
||||
*
|
||||
* @param sPwd
|
||||
* @return
|
||||
*/
|
||||
public boolean authenticate(String sPwd) {
|
||||
return Hashcypher.authenticate(sPwd, m_sPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load User's Permissions
|
||||
*
|
||||
* @param dlSystem
|
||||
*/
|
||||
public void fillPermissions(DataLogicSystem dlSystem) {
|
||||
|
||||
// JG 16 May use diamond inference
|
||||
m_apermissions = new HashSet<>();
|
||||
// Y lo que todos tienen permisos
|
||||
m_apermissions.add("com.unicenta.pos.forms.JPanelMenu");
|
||||
m_apermissions.add("Menu.Exit");
|
||||
|
||||
String sRolePermisions = dlSystem.findRolePermissions(m_sRole);
|
||||
|
||||
if (sRolePermisions != null) {
|
||||
try {
|
||||
if (m_sp == null) {
|
||||
SAXParserFactory spf = SAXParserFactory.newInstance();
|
||||
m_sp = spf.newSAXParser();
|
||||
}
|
||||
m_sp.parse(new InputSource(new StringReader(sRolePermisions)), new ConfigurationHandler());
|
||||
|
||||
} catch (ParserConfigurationException ePC) {
|
||||
log.error(LocalRes.getIntString("exception.parserconfig"), ePC);
|
||||
} catch (SAXException eSAX) {
|
||||
log.error(LocalRes.getIntString("exception.xmlfile"), eSAX);
|
||||
} catch (IOException eIO) {
|
||||
log.error(LocalRes.getIntString("exception.iofile"), eIO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate User's Permissions
|
||||
*
|
||||
* @param classname
|
||||
* @return
|
||||
*/
|
||||
public boolean hasPermission(String classname) {
|
||||
|
||||
return (m_apermissions == null) ? false : m_apermissions.contains(classname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User's ID/Name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public UserInfo getUserInfo() {
|
||||
return new UserInfo(m_sId, m_sName);
|
||||
}
|
||||
|
||||
private static String mapNewClass(String classname) {
|
||||
String newclass = m_oldclasses.get(classname);
|
||||
return newclass == null
|
||||
? classname
|
||||
: newclass;
|
||||
}
|
||||
|
||||
private static void initOldClasses() {
|
||||
// JG 16 May use diamond inference
|
||||
m_oldclasses = new HashMap<>();
|
||||
|
||||
// update permissions from 0.0.24 to 2.20
|
||||
m_oldclasses.put("net.adrianromero.tpv.panelsales.JPanelTicketSales", "com.unicenta.pos.sales.JPanelTicketSales");
|
||||
m_oldclasses.put("net.adrianromero.tpv.panelsales.JPanelTicketEdits", "com.unicenta.pos.sales.JPanelTicketEdits");
|
||||
m_oldclasses.put("net.adrianromero.tpv.panels.JPanelPayments", "com.unicenta.pos.panels.JPanelPayments");
|
||||
m_oldclasses.put("net.adrianromero.tpv.panels.JPanelCloseMoney", "com.unicenta.pos.panels.JPanelCloseMoney");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportClosedPos", "/com/unicenta/reports/closedpos.bs");
|
||||
|
||||
m_oldclasses.put("Menu.StockManagement", "com.unicenta.pos.forms.MenuStockManagement");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.ProductsPanel", "com.unicenta.pos.inventory.ProductsPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.ProductsWarehousePanel", "com.unicenta.pos.inventory.ProductsWarehousePanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.CategoriesPanel", "com.unicenta.pos.inventory.CategoriesPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.panels.JPanelTax", "com.unicenta.pos.inventory.TaxPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.StockDiaryPanel", "com.unicenta.pos.inventory.StockDiaryPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.StockManagement", "com.unicenta.pos.inventory.StockManagement");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportProducts", "/com/unicenta/reports/products.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportCatalog", "/com/unicenta/reports/productscatalog.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportInventory", "/com/unicenta/reports/inventory.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportInventory2", "/com/unicenta/reports/inventoryb.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportInventoryBroken", "/com/unicenta/reports/inventorybroken.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportInventoryDiff", "/com/unicenta/reports/inventorydiff.bs");
|
||||
|
||||
m_oldclasses.put("Menu.SalesManagement", "com.unicenta.pos.forms.MenuSalesManagement");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportUserSales", "/com/unicenta/reports/usersales.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportClosedProducts", "/com/unicenta/reports/closedproducts.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JReportTaxes", "/com/unicenta/reports/taxes.bs");
|
||||
m_oldclasses.put("net.adrianromero.tpv.reports.JChartSales", "/com/unicenta/reports/chartsales.bs");
|
||||
|
||||
m_oldclasses.put("Menu.Maintenance", "com.unicenta.pos.forms.MenuMaintenance");
|
||||
m_oldclasses.put("net.adrianromero.tpv.admin.PeoplePanel", "com.unicenta.pos.admin.PeoplePanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.admin.RolesPanel", "com.unicenta.pos.admin.RolesPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.admin.ResourcesPanel", "com.unicenta.pos.admin.ResourcesPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.inventory.LocationsPanel", "com.unicenta.pos.inventory.LocationsPanel");
|
||||
m_oldclasses.put("net.adrianromero.tpv.mant.JPanelFloors", "com.unicenta.pos.mant.JPanelFloors");
|
||||
m_oldclasses.put("net.adrianromero.tpv.mant.JPanelPlaces", "com.unicenta.pos.mant.JPanelPlaces");
|
||||
m_oldclasses.put("com.unicenta.possync.ProductsSync", "com.unicenta.possync.ProductsSyncCreate");
|
||||
m_oldclasses.put("com.unicenta.possync.OrdersSync", "com.unicenta.possync.OrdersSyncCreate");
|
||||
|
||||
m_oldclasses.put("Menu.ChangePassword", "Menu.ChangePassword");
|
||||
m_oldclasses.put("net.adrianromero.tpv.panels.JPanelPrinter", "com.unicenta.pos.panels.JPanelPrinter");
|
||||
m_oldclasses.put("net.adrianromero.tpv.config.JPanelConfiguration", "com.unicenta.pos.config.JPanelConfiguration");
|
||||
|
||||
// update permissions from 2.00 to 2.20
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportCustomers", "/com/unicenta/reports/customers.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportCustomersB", "/com/unicenta/reports/customersb.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportClosedPos", "/com/unicenta/reports/closedpos.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportClosedProducts", "/com/unicenta/reports/closedproducts.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JChartSales", "/com/unicenta/reports/chartsales.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportInventory", "/com/unicenta/reports/inventory.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportInventory2", "/com/unicenta/reports/inventoryb.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportInventoryBroken", "/com/unicenta/reports/inventorybroken.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportInventoryDiff", "/com/unicenta/reports/inventorydiff.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportPeople", "/com/unicenta/reports/people.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportTaxes", "/com/unicenta/reports/taxes.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportUserSales", "/com/unicenta/reports/usersales.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportProducts", "/com/unicenta/reports/products.bs");
|
||||
m_oldclasses.put("com.unicenta.pos.reports.JReportCatalog", "/com/unicenta/reports/productscatalog.bs");
|
||||
|
||||
// update permissions from 2.10 to 2.20
|
||||
m_oldclasses.put("com.unicenta.pos.panels.JPanelTax", "com.unicenta.pos.inventory.TaxPanel");
|
||||
|
||||
}
|
||||
|
||||
private class ConfigurationHandler extends DefaultHandler {
|
||||
@Override
|
||||
public void startDocument() throws SAXException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endDocument() throws SAXException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||
if ("class".equals(qName)) {
|
||||
m_apermissions.add(mapNewClass(attributes.getValue("name")));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void characters(char[] ch, int start, int length) throws SAXException {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface AppUserView {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String ACTION_TASKNAME = "taskname";
|
||||
|
||||
// Acciones de la aplicacion
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public AppUser getUser(); // Usuario logado
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sTaskClass
|
||||
*/
|
||||
public void showTask(String sTaskClass);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sTaskClass
|
||||
*/
|
||||
public void executeTask(String sTaskClass);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import com.unicenta.data.loader.Session;
|
||||
import com.unicenta.pos.printer.DeviceTicket;
|
||||
import com.unicenta.pos.scale.DeviceScale;
|
||||
import com.unicenta.pos.scanpal2.DeviceScanner;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface AppView {
|
||||
|
||||
public DeviceScale getDeviceScale();
|
||||
public DeviceTicket getDeviceTicket();
|
||||
public DeviceScanner getDeviceScanner();
|
||||
public Session getSession();
|
||||
public AppProperties getProperties();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param beanfactory
|
||||
* @return
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
public Object getBean(String beanfactory) throws BeanFactoryException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
* @param iSeq
|
||||
* @param dStart
|
||||
* @param dEnd
|
||||
*/
|
||||
public void setActiveCash(String value, int iSeq, Date dStart, Date dEnd);
|
||||
public String getActiveCashIndex();
|
||||
public int getActiveCashSequence();
|
||||
public Date getActiveCashDateStart();
|
||||
public Date getActiveCashDateEnd();
|
||||
|
||||
public void setClosedCash(String value, int iSeq, Date dStart, Date dEnd);
|
||||
public String getClosedCashIndex();
|
||||
public int getClosedCashSequence();
|
||||
public Date getClosedCashDateStart();
|
||||
public Date getClosedCashDateEnd();
|
||||
|
||||
public String getInventoryLocation();
|
||||
|
||||
public void waitCursorBegin();
|
||||
public void waitCursorEnd();
|
||||
public AppUserView getAppUserView();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.Session;
|
||||
import com.unicenta.pos.util.AltEncrypter;
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.sql.Driver;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class AppViewConnection {
|
||||
|
||||
/** Creates a new instance of AppViewConnection */
|
||||
private AppViewConnection() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param props
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public static Session createSession(AppProperties props) throws BasicException {
|
||||
try {
|
||||
String dbURL=null;
|
||||
String sDBUser=null;
|
||||
String sDBPassword=null;
|
||||
String sUserPath = System.getProperty("user.home");
|
||||
String filePath = sUserPath + "\\open.db";
|
||||
|
||||
if (isJavaWebStart()) {
|
||||
Class.forName(props.getProperty("db.driver"), true, Thread.currentThread().getContextClassLoader());
|
||||
} else {
|
||||
URL[] urls = {new File(props.getProperty("db.driverlib")).toURI().toURL()};
|
||||
ClassLoader cloader = new URLClassLoader(urls);
|
||||
String driver = props.getProperty("db.driver");
|
||||
DriverWrapper driverWrapper = new DriverWrapper((Driver) Class.forName(driver, true, cloader).newInstance());
|
||||
DriverManager.registerDriver(driverWrapper);
|
||||
}
|
||||
if("true".equals(props.getProperty("db.multi"))) {
|
||||
if (!Files.exists(Paths.get(filePath))) {
|
||||
ImageIcon icon = new ImageIcon("/com/unicenta/images/unicentaopos.png");
|
||||
Object[] dbs = {
|
||||
"0 - " + props.getProperty("db.name"),
|
||||
"1 - " + props.getProperty("db1.name")};
|
||||
|
||||
Object s = (Object)JOptionPane.showInputDialog(
|
||||
null, AppLocal.getIntString("message.databasechoose"),
|
||||
"Selection", JOptionPane.OK_OPTION,
|
||||
icon, dbs, props.getProperty("db.name"));
|
||||
|
||||
if (s.toString().startsWith("1")) {
|
||||
sDBUser = props.getProperty("db1.user");
|
||||
sDBPassword = props.getProperty("db1.password");
|
||||
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
|
||||
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
|
||||
}
|
||||
dbURL = props.getProperty("db1.URL") +
|
||||
props.getProperty("db1.schema") +
|
||||
props.getProperty("db1.options");
|
||||
} else {
|
||||
sDBUser = props.getProperty("db.user");
|
||||
sDBPassword = props.getProperty("db.password");
|
||||
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
|
||||
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
|
||||
}
|
||||
dbURL = props.getProperty("db.URL") +
|
||||
props.getProperty("db.schema") +
|
||||
props.getProperty("db.options");
|
||||
}
|
||||
} else {
|
||||
sDBUser = props.getProperty("db.user");
|
||||
sDBPassword = props.getProperty("db.password");
|
||||
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
|
||||
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
|
||||
}
|
||||
dbURL = props.getProperty("db.URL") +
|
||||
props.getProperty("db.schema") +
|
||||
props.getProperty("db.options");
|
||||
}
|
||||
|
||||
} else {
|
||||
sDBUser = props.getProperty("db.user");
|
||||
sDBPassword = props.getProperty("db.password");
|
||||
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
|
||||
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
|
||||
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
|
||||
}
|
||||
|
||||
dbURL = props.getProperty("db.URL") +
|
||||
props.getProperty("db.schema") +
|
||||
props.getProperty("db.options");
|
||||
}
|
||||
return new Session(dbURL, sDBUser,sDBPassword);
|
||||
|
||||
} catch (InstantiationException | IllegalAccessException | MalformedURLException | ClassNotFoundException e) {
|
||||
throw new BasicException(AppLocal.getIntString("message.databasedrivererror"), e);
|
||||
} catch (SQLException eSQL) {
|
||||
throw new BasicException(AppLocal.getIntString("message.databaseconnectionerror"), eSQL);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isJavaWebStart() {
|
||||
|
||||
try {
|
||||
Class.forName("javax.jnlp.ServiceManager");
|
||||
return true;
|
||||
} catch (ClassNotFoundException ue) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface BeanFactory {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Object getBean();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public interface BeanFactoryApp extends BeanFactory {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
public void init(AppView app) throws BeanFactoryException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public abstract class BeanFactoryCache implements BeanFactoryApp {
|
||||
|
||||
private Object bean = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @return
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
public abstract Object constructBean(AppView app) throws BeanFactoryException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
@Override
|
||||
public void init(AppView app) throws BeanFactoryException {
|
||||
bean = constructBean(app);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getBean() {
|
||||
return bean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class BeanFactoryData implements BeanFactoryApp {
|
||||
|
||||
private BeanFactoryApp bf;
|
||||
|
||||
/** Creates a new instance of BeanFactoryData */
|
||||
public BeanFactoryData() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
@Override
|
||||
public void init(AppView app) throws BeanFactoryException {
|
||||
|
||||
try {
|
||||
|
||||
String sfactoryname = this.getClass().getName();
|
||||
if (sfactoryname.endsWith("Create")) {
|
||||
sfactoryname = sfactoryname.substring(0, sfactoryname.length() - 6);
|
||||
}
|
||||
bf = (BeanFactoryApp) Class.forName(sfactoryname + app.getSession().DB.getName()).newInstance();
|
||||
bf.init(app);
|
||||
// JG 16 May use multicatch
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | BeanFactoryException ex) {
|
||||
throw new BeanFactoryException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getBean() {
|
||||
return bf.getBean();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.forms;
|
||||
|
||||
import com.unicenta.data.loader.Session;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public abstract class BeanFactoryDataSingle implements BeanFactoryApp {
|
||||
|
||||
/** Creates a new instance of BeanFactoryData */
|
||||
public BeanFactoryDataSingle() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
*/
|
||||
public abstract void init(Session s);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param app
|
||||
* @throws BeanFactoryException
|
||||
*/
|
||||
@Override
|
||||
public void init(AppView app) throws BeanFactoryException {
|
||||
init(app.getSession());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getBean() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user