📄 jticketsbagrestaurant.java
字号:
// Tina POS is a point of sales application designed for touch screens.// Copyright (C) 2005 Adrian Romero Corchado.// http://sourceforge.net/projects/tinapos//// This program 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 2 of the License, or// (at your option) any later version.//// This program 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 this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USApackage net.adrianromero.tpv.panelsales.restaurant;import javax.swing.*;import net.adrianromero.tpv.forms.AppLocal;public class JTicketsBagRestaurant extends javax.swing.JPanel { private JTicketsBagRestaurantMap m_restaurant; /** Creates new form JTicketsBagRestaurantMap */ public JTicketsBagRestaurant(JTicketsBagRestaurantMap restaurant) { m_restaurant = restaurant; initComponents(); } public void setTableName(String sValue) { m_jTicketId.setText(sValue); } /** 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(); m_lblTicketId = new javax.swing.JLabel(); m_jTicketId = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); m_jDelTicket = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); setLayout(new java.awt.BorderLayout()); m_lblTicketId.setText(AppLocal.getIntString("label.table")); jPanel1.add(m_lblTicketId); m_jTicketId.setBackground(java.awt.Color.white); m_jTicketId.setFont(new java.awt.Font("Dialog", 1, 14)); m_jTicketId.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTicketId.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jTicketId.setOpaque(true); m_jTicketId.setPreferredSize(new java.awt.Dimension(75, 25)); m_jTicketId.setRequestFocusEnabled(false); jPanel1.add(m_jTicketId); add(jPanel1, java.awt.BorderLayout.WEST); jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); m_jDelTicket.setText(AppLocal.getIntString("Button.DeleteTicket")); m_jDelTicket.setFocusPainted(false); m_jDelTicket.setFocusable(false); m_jDelTicket.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jDelTicket.setRequestFocusEnabled(false); m_jDelTicket.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jDelTicketActionPerformed(evt); } }); jPanel2.add(m_jDelTicket); jButton2.setText(AppLocal.getIntString("button.movetable")); jButton2.setFocusPainted(false); jButton2.setFocusable(false); jButton2.setMargin(new java.awt.Insets(8, 14, 8, 14)); jButton2.setRequestFocusEnabled(false); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel2.add(jButton2); jButton1.setText(AppLocal.getIntString("button.tables")); jButton1.setFocusPainted(false); jButton1.setFocusable(false); jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14)); jButton1.setRequestFocusEnabled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel2.add(jButton1); add(jPanel2, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed m_restaurant.moveTicket(); }//GEN-LAST:event_jButton2ActionPerformed private void m_jDelTicketActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jDelTicketActionPerformed int res = JOptionPane.showConfirmDialog(this, AppLocal.getIntString("message.wannadelete"), AppLocal.getIntString("title.editor"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (res == JOptionPane.YES_OPTION) { m_restaurant.cancelTicket(); } }//GEN-LAST:event_m_jDelTicketActionPerformed private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed m_restaurant.newTicket(); }//GEN-LAST:event_jButton1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JButton m_jDelTicket; private javax.swing.JLabel m_jTicketId; private javax.swing.JLabel m_lblTicketId; // End of variables declaration//GEN-END:variables }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -