5.0 Source Code
Committing 5.0 Source Code
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.unicenta.pos.mant;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jack
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "applications", catalog = "unicentaopos", schema = "")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "Applications.findAll", query = "SELECT a FROM Applications a"),
|
||||
@NamedQuery(name = "Applications.findById", query = "SELECT a FROM Applications a WHERE a.id = :id"),
|
||||
@NamedQuery(name = "Applications.findByName", query = "SELECT a FROM Applications a WHERE a.name = :name"),
|
||||
@NamedQuery(name = "Applications.findByVersion", query = "SELECT a FROM Applications a WHERE a.version = :version")})
|
||||
public class Applications implements Serializable {
|
||||
@Transient
|
||||
private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private String id;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "NAME")
|
||||
private String name;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "VERSION")
|
||||
private String version;
|
||||
|
||||
public Applications() {
|
||||
}
|
||||
|
||||
public Applications(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Applications(String id, String name, String version) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
String oldId = this.id;
|
||||
this.id = id;
|
||||
changeSupport.firePropertyChange("id", oldId, id);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
String oldName = this.name;
|
||||
this.name = name;
|
||||
changeSupport.firePropertyChange("name", oldName, name);
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
String oldVersion = this.version;
|
||||
this.version = version;
|
||||
changeSupport.firePropertyChange("version", oldVersion, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof Applications)) {
|
||||
return false;
|
||||
}
|
||||
Applications other = (Applications) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.unicenta.pos.mant.Applications[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.unicenta.pos.mant;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jack
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "floors", catalog = "unicentaopos", schema = "")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "Floors.findAll", query = "SELECT f FROM Floors f"),
|
||||
@NamedQuery(name = "Floors.findById", query = "SELECT f FROM Floors f WHERE f.id = :id"),
|
||||
@NamedQuery(name = "Floors.findByName", query = "SELECT f FROM Floors f WHERE f.name = :name")})
|
||||
public class Floors implements Serializable {
|
||||
@Transient
|
||||
private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private String id;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "NAME")
|
||||
private String name;
|
||||
@Lob
|
||||
@Column(name = "IMAGE")
|
||||
private byte[] image;
|
||||
|
||||
public Floors() {
|
||||
}
|
||||
|
||||
public Floors(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Floors(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
String oldId = this.id;
|
||||
this.id = id;
|
||||
changeSupport.firePropertyChange("id", oldId, id);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
String oldName = this.name;
|
||||
this.name = name;
|
||||
changeSupport.firePropertyChange("name", oldName, name);
|
||||
}
|
||||
|
||||
public byte[] getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(byte[] image) {
|
||||
byte[] oldImage = this.image;
|
||||
this.image = image;
|
||||
changeSupport.firePropertyChange("image", oldImage, image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof Floors)) {
|
||||
return false;
|
||||
}
|
||||
Floors other = (Floors) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.unicenta.pos.mant.Floors[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
<?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="[91, 125]"/>
|
||||
</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,2,12,0,0,2,-121"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 100]"/>
|
||||
</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.DesignAbsoluteLayout">
|
||||
<Property name="useNullLayout" type="boolean" value="true"/>
|
||||
</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="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="20" y="20" width="-1" height="-1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</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="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="130" y="20" width="-1" height="-1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<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="0" 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="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<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>
|
||||
</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>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,197 @@
|
||||
// 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.mant;
|
||||
|
||||
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.awt.image.BufferedImage;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public final class FloorsEditor extends JPanel implements EditorRecord {
|
||||
|
||||
// private DirtyManager m_Dirty = new DirtyManager();
|
||||
private String m_sID;
|
||||
|
||||
/** Creates new form FloorsEditor
|
||||
* @param dirty */
|
||||
public FloorsEditor(DirtyManager dirty) {
|
||||
initComponents();
|
||||
|
||||
m_jName.getDocument().addDocumentListener(dirty);
|
||||
m_jImage.addPropertyChangeListener("image", dirty);
|
||||
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
|
||||
m_sID = null;
|
||||
m_jName.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
|
||||
m_jName.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
|
||||
m_sID = UUID.randomUUID().toString();
|
||||
m_jName.setText(null);
|
||||
m_jImage.setImage(null);
|
||||
|
||||
m_jName.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
|
||||
Object[] floor = (Object[]) value;
|
||||
m_sID = Formats.STRING.formatValue(floor[0]);
|
||||
m_jName.setText(Formats.STRING.formatValue(floor[1]));
|
||||
m_jImage.setImage((BufferedImage) floor[2]);
|
||||
|
||||
m_jName.setEnabled(false);
|
||||
m_jImage.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
|
||||
Object[] floor = (Object[]) value;
|
||||
m_sID = Formats.STRING.formatValue(floor[0]);
|
||||
m_jName.setText(Formats.STRING.formatValue(floor[1]));
|
||||
m_jImage.setImage((BufferedImage) floor[2]);
|
||||
|
||||
m_jName.setEnabled(true);
|
||||
m_jImage.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
|
||||
Object[] floor = new Object[3];
|
||||
|
||||
floor[0] = m_sID;
|
||||
floor[1] = m_jName.getText();
|
||||
floor[2] = m_jImage.getImage();
|
||||
return floor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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() {
|
||||
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
m_jImage = new com.unicenta.data.gui.JImageEditor();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(91, 125));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(150, 100));
|
||||
jPanel1.setLayout(null);
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText(AppLocal.getIntString("label.name")); // NOI18N
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
jPanel1.add(jLabel3);
|
||||
jLabel3.setBounds(20, 20, 110, 30);
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
jPanel1.add(m_jName);
|
||||
m_jName.setBounds(130, 20, 250, 30);
|
||||
|
||||
add(jPanel1, java.awt.BorderLayout.NORTH);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 0));
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
m_jImage.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jPanel3.add(m_jImage, java.awt.BorderLayout.CENTER);
|
||||
|
||||
add(jPanel3, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private com.unicenta.data.gui.JImageEditor m_jImage;
|
||||
private javax.swing.JTextField m_jName;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// 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.mant;
|
||||
|
||||
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 26 de febrero de 2007, 23:49
|
||||
*
|
||||
*/
|
||||
public class FloorsInfo implements SerializableRead, IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 8906929819402L;
|
||||
private String m_sID;
|
||||
private String m_sName;
|
||||
|
||||
/** Creates a new instance of FloorsInfo */
|
||||
public FloorsInfo() {
|
||||
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 sName
|
||||
*/
|
||||
public void setName(String sName) {
|
||||
m_sName = sName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// 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.mant;
|
||||
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.Datas;
|
||||
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.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPanelFloors extends JPanelTable {
|
||||
|
||||
private TableDefinition tfloors;
|
||||
private FloorsEditor jeditor;
|
||||
|
||||
/** Creates a new instance of JPanelFloors */
|
||||
public JPanelFloors() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
tfloors = new TableDefinition(app.getSession(),
|
||||
"floors"
|
||||
, new String[] {"ID", "NAME", "IMAGE"}
|
||||
, new String[] {"ID", AppLocal.getIntString("label.name"), "IMAGE"}
|
||||
, new Datas[] {Datas.STRING, Datas.STRING, Datas.IMAGE}
|
||||
, new Formats[] {Formats.NULL, Formats.STRING}
|
||||
, new int[] {0}
|
||||
);
|
||||
jeditor = new FloorsEditor(dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tfloors);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tfloors.getVectorerBasic(new int[]{1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tfloors.getRenderStringBasic(new int[]{1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tfloors);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Floors");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// 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.mant;
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.Datas;
|
||||
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.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.DataLogicSales;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JPanelPlaces extends JPanelTable {
|
||||
|
||||
private TableDefinition tplaces;
|
||||
private PlacesEditor jeditor;
|
||||
|
||||
/** Creates a new instance of JPanelPlaces */
|
||||
public JPanelPlaces() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicSales dlSales = null;
|
||||
dlSales = (DataLogicSales) app.getBean("com.unicenta.pos.forms.DataLogicSales");
|
||||
|
||||
tplaces = new TableDefinition(app.getSession(),
|
||||
"places"
|
||||
, new String[] {"ID", "NAME", "SEATS", "X", "Y", "FLOOR", "WIDTH", "HEIGHT"}
|
||||
, new String[] {"ID", AppLocal.getIntString("label.name"),
|
||||
AppLocal.getIntString("label.seats"), "X", "Y",
|
||||
AppLocal.getIntString("label.placefloor")}
|
||||
, new Datas[] {
|
||||
Datas.STRING, Datas.STRING, Datas.STRING,
|
||||
Datas.INT, Datas.INT,
|
||||
Datas.STRING,
|
||||
Datas.INT, Datas.INT }
|
||||
, new Formats[] {
|
||||
Formats.STRING, Formats.STRING, Formats.STRING,
|
||||
Formats.INT, Formats.INT,
|
||||
Formats.NULL,
|
||||
Formats.INT, Formats.INT }
|
||||
, new int[] {0}
|
||||
);
|
||||
jeditor = new PlacesEditor(dlSales, dirty);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tplaces);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tplaces);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tplaces.getVectorerBasic(new int[]{1});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tplaces.getRenderStringBasic(new int[]{1}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.Tables");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
jeditor.activate();
|
||||
super.activate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.unicenta.pos.mant;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jack
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "places", catalog = "unicentaopos", schema = "")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "Places.findAll", query = "SELECT p FROM Places p"),
|
||||
@NamedQuery(name = "Places.findById", query = "SELECT p FROM Places p WHERE p.id = :id"),
|
||||
@NamedQuery(name = "Places.findByName", query = "SELECT p FROM Places p WHERE p.name = :name"),
|
||||
@NamedQuery(name = "Places.findByX", query = "SELECT p FROM Places p WHERE p.x = :x"),
|
||||
@NamedQuery(name = "Places.findByY", query = "SELECT p FROM Places p WHERE p.y = :y"),
|
||||
@NamedQuery(name = "Places.findByFloor", query = "SELECT p FROM Places p WHERE p.floor = :floor"),
|
||||
@NamedQuery(name = "Places.findByCustomer", query = "SELECT p FROM Places p WHERE p.customer = :customer"),
|
||||
@NamedQuery(name = "Places.findByWaiter", query = "SELECT p FROM Places p WHERE p.waiter = :waiter"),
|
||||
@NamedQuery(name = "Places.findByTicketid", query = "SELECT p FROM Places p WHERE p.ticketid = :ticketid"),
|
||||
@NamedQuery(name = "Places.findByTablemoved", query = "SELECT p FROM Places p WHERE p.tablemoved = :tablemoved")})
|
||||
public class Places implements Serializable {
|
||||
@Transient
|
||||
private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private String id;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "NAME")
|
||||
private String name;
|
||||
@Column(name = "SEATS")
|
||||
private String seats;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "X")
|
||||
private int x;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "Y")
|
||||
private int y;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "FLOOR")
|
||||
private String floor;
|
||||
@Column(name = "CUSTOMER")
|
||||
private String customer;
|
||||
@Column(name = "WAITER")
|
||||
private String waiter;
|
||||
@Column(name = "TICKETID")
|
||||
private String ticketid;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "TABLEMOVED")
|
||||
private short tablemoved;
|
||||
|
||||
@Column(name = "WIDTH")
|
||||
private int width;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "HEIGHT")
|
||||
private int height;
|
||||
|
||||
public Places() {
|
||||
}
|
||||
|
||||
public Places(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Places(String id, String name, String seats, int x, int y, int width, int height, String floor, short tablemoved) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.seats = seats;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.floor = floor;
|
||||
this.tablemoved = tablemoved;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
String oldId = this.id;
|
||||
this.id = id;
|
||||
changeSupport.firePropertyChange("id", oldId, id);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
String oldName = this.name;
|
||||
this.name = name;
|
||||
changeSupport.firePropertyChange("name", oldName, name);
|
||||
}
|
||||
|
||||
public String getSeats() {
|
||||
return seats;
|
||||
}
|
||||
public void setSeats(String seats) {
|
||||
String oldSeats = this.seats;
|
||||
this.seats = seats;
|
||||
changeSupport.firePropertyChange("seats", oldSeats, seats);
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(int x) {
|
||||
int oldX = this.x;
|
||||
this.x = x;
|
||||
changeSupport.firePropertyChange("x", oldX, x);
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY(int y) {
|
||||
int oldY = this.y;
|
||||
this.y = y;
|
||||
changeSupport.firePropertyChange("y", oldY, y);
|
||||
}
|
||||
|
||||
public String getFloor() {
|
||||
return floor;
|
||||
}
|
||||
|
||||
public void setFloor(String floor) {
|
||||
String oldFloor = this.floor;
|
||||
this.floor = floor;
|
||||
changeSupport.firePropertyChange("floor", oldFloor, floor);
|
||||
}
|
||||
|
||||
public String getCustomer() {
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void setCustomer(String customer) {
|
||||
String oldCustomer = this.customer;
|
||||
this.customer = customer;
|
||||
changeSupport.firePropertyChange("customer", oldCustomer, customer);
|
||||
}
|
||||
|
||||
public String getWaiter() {
|
||||
return waiter;
|
||||
}
|
||||
|
||||
public void setWaiter(String waiter) {
|
||||
String oldWaiter = this.waiter;
|
||||
this.waiter = waiter;
|
||||
changeSupport.firePropertyChange("waiter", oldWaiter, waiter);
|
||||
}
|
||||
|
||||
public String getTicketid() {
|
||||
return ticketid;
|
||||
}
|
||||
|
||||
public void setTicketid(String ticketid) {
|
||||
String oldTicketid = this.ticketid;
|
||||
this.ticketid = ticketid;
|
||||
changeSupport.firePropertyChange("ticketid", oldTicketid, ticketid);
|
||||
}
|
||||
|
||||
public short getTablemoved() {
|
||||
return tablemoved;
|
||||
}
|
||||
|
||||
public void setTablemoved(short tablemoved) {
|
||||
short oldTablemoved = this.tablemoved;
|
||||
this.tablemoved = tablemoved;
|
||||
changeSupport.firePropertyChange("tablemoved", oldTablemoved, tablemoved);
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public void setWidth(int width) {
|
||||
int oldWidth = this.width;
|
||||
this.width = width;
|
||||
changeSupport.firePropertyChange("width", oldWidth, width);
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(int height) {
|
||||
int oldHeight = this.height;
|
||||
this.height = height;
|
||||
changeSupport.firePropertyChange("height", oldHeight, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof Places)) {
|
||||
return false;
|
||||
}
|
||||
Places other = (Places) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.unicenta.pos.mant.Places[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
changeSupport.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" 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>
|
||||
</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" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jName" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jFloor" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jLabel10" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel11" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jHeight" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jY" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="m_jX" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" pref="40" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" pref="384" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jSeats" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jWidth" 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" 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="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jFloor" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jSeats" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jWidth" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jHeight" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jX" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="m_jY" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="52" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" pref="96" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="180" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<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.name" 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="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.placefloor" 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="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.placepositionx" 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="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="Across"/>
|
||||
<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" value="Down"/>
|
||||
<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="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="66" green="66" red="66" type="rgb"/>
|
||||
</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="message.places" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
|
||||
<LineBorder>
|
||||
<Color PropertyName="color" blue="99" green="99" red="99" type="rgb"/>
|
||||
</LineBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[50, 40]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[489, 40]"/>
|
||||
</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.seats" 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="jLabel9">
|
||||
<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.btnwidth" 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="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.placepositiony" 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="jLabel10">
|
||||
<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.btnheight" 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_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_jFloor">
|
||||
<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.JTextField" name="m_jSeats">
|
||||
<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="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jWidth">
|
||||
<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="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jHeight">
|
||||
<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="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jX">
|
||||
<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="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jY">
|
||||
<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="[50, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,418 @@
|
||||
// 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.mant;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ComboBoxValModel;
|
||||
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.DataLogicSales;
|
||||
import java.awt.Component;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public final class PlacesEditor extends JPanel implements EditorRecord {
|
||||
|
||||
private final SentenceList m_sentfloor;
|
||||
private ComboBoxValModel m_FloorModel;
|
||||
|
||||
private String m_sID;
|
||||
|
||||
/** Creates new form PlacesEditor
|
||||
* @param dlSales
|
||||
* @param dirty */
|
||||
public PlacesEditor(DataLogicSales dlSales, DirtyManager dirty) {
|
||||
initComponents();
|
||||
|
||||
m_sentfloor = dlSales.getFloorsList();
|
||||
m_FloorModel = new ComboBoxValModel();
|
||||
|
||||
m_jName.getDocument().addDocumentListener(dirty);
|
||||
m_jSeats.getDocument().addDocumentListener(dirty);
|
||||
m_jFloor.addActionListener(dirty);
|
||||
m_jX.getDocument().addDocumentListener(dirty);
|
||||
m_jY.getDocument().addDocumentListener(dirty);
|
||||
|
||||
m_jWidth.getDocument().addDocumentListener(dirty);
|
||||
m_jHeight.getDocument().addDocumentListener(dirty);
|
||||
|
||||
writeValueEOF();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void activate() throws BasicException {
|
||||
|
||||
m_FloorModel = new ComboBoxValModel(m_sentfloor.list());
|
||||
m_jFloor.setModel(m_FloorModel);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void refresh() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEOF() {
|
||||
|
||||
m_sID = null;
|
||||
m_jName.setText(null);
|
||||
m_jSeats.setText(null);
|
||||
m_FloorModel.setSelectedKey(null);
|
||||
m_jX.setText(null);
|
||||
m_jY.setText(null);
|
||||
|
||||
m_jWidth.setText(null);
|
||||
m_jHeight.setText(null);
|
||||
|
||||
m_jName.setEnabled(false);
|
||||
m_jSeats.setEnabled(false);
|
||||
m_jFloor.setEnabled(false);
|
||||
m_jX.setEnabled(false);
|
||||
m_jY.setEnabled(false);
|
||||
|
||||
m_jWidth.setEnabled(false);
|
||||
m_jHeight.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void writeValueInsert() {
|
||||
|
||||
m_sID = UUID.randomUUID().toString();
|
||||
m_jName.setText(null);
|
||||
m_jSeats.setText(null);
|
||||
m_FloorModel.setSelectedKey(null);
|
||||
m_jX.setText(null);
|
||||
m_jY.setText(null);
|
||||
m_jWidth.setText(null);
|
||||
m_jHeight.setText(null);
|
||||
|
||||
m_jName.setEnabled(true);
|
||||
m_jSeats.setEnabled(true);
|
||||
m_jFloor.setEnabled(true);
|
||||
m_jX.setEnabled(true);
|
||||
m_jY.setEnabled(true);
|
||||
m_jWidth.setEnabled(true);
|
||||
m_jHeight.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueDelete(Object value) {
|
||||
|
||||
Object[] place = (Object[]) value;
|
||||
m_sID = Formats.STRING.formatValue(place[0]);
|
||||
m_jName.setText(Formats.STRING.formatValue(place[1]));
|
||||
m_jSeats.setText(Formats.STRING.formatValue(place[2]));
|
||||
m_jX.setText(Formats.INT.formatValue(place[3]));
|
||||
m_jY.setText(Formats.INT.formatValue(place[4]));
|
||||
m_FloorModel.setSelectedKey(place[5]);
|
||||
m_jWidth.setText(Formats.INT.formatValue(place[6]));
|
||||
m_jHeight.setText(Formats.INT.formatValue(place[7]));
|
||||
|
||||
m_jName.setEnabled(false);
|
||||
m_jSeats.setEnabled(false);
|
||||
m_jFloor.setEnabled(false);
|
||||
m_jX.setEnabled(false);
|
||||
m_jY.setEnabled(false);
|
||||
m_jWidth.setEnabled(false);
|
||||
m_jHeight.setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
@Override
|
||||
public void writeValueEdit(Object value) {
|
||||
|
||||
Object[] place = (Object[]) value;
|
||||
m_sID = Formats.STRING.formatValue(place[0]);
|
||||
m_jName.setText(Formats.STRING.formatValue(place[1]));
|
||||
m_jSeats.setText(Formats.STRING.formatValue(place[2]));
|
||||
m_jX.setText(Formats.INT.formatValue(place[3]));
|
||||
m_jY.setText(Formats.INT.formatValue(place[4]));
|
||||
m_FloorModel.setSelectedKey(place[5]);
|
||||
m_jWidth.setText(Formats.INT.formatValue(place[6]));
|
||||
m_jHeight.setText(Formats.INT.formatValue(place[7]));
|
||||
|
||||
m_jName.setEnabled(true);
|
||||
m_jSeats.setEnabled(true);
|
||||
m_jFloor.setEnabled(true);
|
||||
m_jX.setEnabled(true);
|
||||
m_jY.setEnabled(true);
|
||||
m_jWidth.setEnabled(true);
|
||||
m_jHeight.setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] place = new Object[8];
|
||||
place[0] = m_sID;
|
||||
place[1] = m_jName.getText();
|
||||
place[2] = m_jSeats.getText();
|
||||
place[3] = Formats.INT.parseValue(m_jX.getText());
|
||||
place[4] = Formats.INT.parseValue(m_jY.getText());
|
||||
place[5] = m_FloorModel.getSelectedKey();
|
||||
place[6] = Formats.INT.parseValue(m_jWidth.getText());
|
||||
place[7] = Formats.INT.parseValue(m_jHeight.getText());
|
||||
return place;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
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() {
|
||||
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
jLabel9 = new javax.swing.JLabel();
|
||||
jLabel11 = new javax.swing.JLabel();
|
||||
jLabel10 = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
m_jFloor = new javax.swing.JComboBox();
|
||||
m_jSeats = new javax.swing.JTextField();
|
||||
m_jWidth = new javax.swing.JTextField();
|
||||
m_jHeight = new javax.swing.JTextField();
|
||||
m_jX = new javax.swing.JTextField();
|
||||
m_jY = new javax.swing.JTextField();
|
||||
|
||||
setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel2.setText(AppLocal.getIntString("label.name")); // NOI18N
|
||||
jLabel2.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel1.setText(AppLocal.getIntString("label.placefloor")); // NOI18N
|
||||
jLabel1.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel6.setText(AppLocal.getIntString("label.placepositionx")); // NOI18N
|
||||
jLabel6.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel5.setText("Across");
|
||||
jLabel5.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel3.setText("Down");
|
||||
jLabel3.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
jLabel7.setBackground(new java.awt.Color(255, 255, 255));
|
||||
jLabel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jLabel7.setForeground(new java.awt.Color(102, 102, 102));
|
||||
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLabel7.setText(bundle.getString("message.places")); // NOI18N
|
||||
jLabel7.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
jLabel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
|
||||
jLabel7.setMinimumSize(new java.awt.Dimension(50, 40));
|
||||
jLabel7.setOpaque(true);
|
||||
jLabel7.setPreferredSize(new java.awt.Dimension(489, 40));
|
||||
|
||||
jLabel8.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel8.setText(AppLocal.getIntString("label.seats")); // NOI18N
|
||||
jLabel8.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel9.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel9.setText(AppLocal.getIntString("label.btnwidth")); // NOI18N
|
||||
jLabel9.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel11.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel11.setText(AppLocal.getIntString("label.placepositiony")); // NOI18N
|
||||
jLabel11.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLabel10.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLabel10.setText(AppLocal.getIntString("label.btnheight")); // NOI18N
|
||||
jLabel10.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jFloor.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jFloor.setPreferredSize(new java.awt.Dimension(0, 30));
|
||||
|
||||
m_jSeats.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jSeats.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
|
||||
m_jWidth.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jWidth.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
|
||||
m_jHeight.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jHeight.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
|
||||
m_jX.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jX.setPreferredSize(new java.awt.Dimension(50, 30));
|
||||
|
||||
m_jY.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jY.setPreferredSize(new java.awt.Dimension(50, 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(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(14, 14, 14)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jFloor, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, 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)
|
||||
.addComponent(m_jHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jY, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel6, 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(m_jX, 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, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jSeats, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jWidth, 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(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.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_jFloor, 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(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jSeats, 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(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jHeight, 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(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jX, 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.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_jY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(52, 52, 52)
|
||||
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(180, 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 jLabel10;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JLabel jLabel9;
|
||||
private javax.swing.JComboBox m_jFloor;
|
||||
private javax.swing.JTextField m_jHeight;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JTextField m_jSeats;
|
||||
private javax.swing.JTextField m_jWidth;
|
||||
private javax.swing.JTextField m_jX;
|
||||
private javax.swing.JTextField m_jY;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user