List of usage examples for javax.swing SwingConstants LEFT
int LEFT
To view the source code for javax.swing SwingConstants LEFT.
Click Source Link
From source file:com.openbravo.pos.sales.JRetailPanelTakeAway.java
private JPanel getLabelPanel(String msg) { JPanel panel = new JPanel(); Font font = new Font("Verdana", Font.BOLD, 12); panel.setFont(font);//from w w w.j av a2 s.com panel.setOpaque(true); // panel.setBackground(Color.BLUE); JLabel label = new JLabel(msg, JLabel.LEFT); label.setForeground(Color.RED); label.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); panel.add(label); return panel; }
From source file:com.openbravo.pos.sales.JRetailPanelTakeAway.java
/** * This method is called from within the constructor to Tinitialize the * form. WARNING: Do NOT modify this code. The content of this method is * always regenerated by the FormEditor. */// ww w . j a v a 2 s. c o m // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { m_jPanContainer = new javax.swing.JPanel(); m_jOptions = new javax.swing.JPanel(); m_jButtons = new javax.swing.JPanel(); m_jPanelScripts = new javax.swing.JPanel(); m_jButtonsExt = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); m_jbtnScale = new javax.swing.JButton(); m_jLogout = new javax.swing.JButton(); m_jbtnPrintBill = new javax.swing.JButton(); m_jSettleBill = new javax.swing.JButton(); m_jSplitBtn = new javax.swing.JButton(); m_jBtnCancelBill = new javax.swing.JButton(); m_jBtnBillOnHold = new javax.swing.JButton(); m_jBtnDiscount = new javax.swing.JButton(); m_jPanelBag = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); m_jLblUserInfo = new javax.swing.JLabel(); m_jUser = new javax.swing.JLabel(); m_jLblCurrentDate = new javax.swing.JLabel(); m_jLblTime = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); m_jLblBillNo = new javax.swing.JLabel(); m_jPanTicket = new javax.swing.JPanel(); jPanel10 = new javax.swing.JPanel(); jButtonAddon = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); m_jLblItemCode = new javax.swing.JLabel(); m_jTxtItemCode = new javax.swing.JTextField(); m_jLblItemName = new javax.swing.JLabel(); m_jCboItemName = new javax.swing.JComboBox(); m_jPanelCentral = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); m_jPlus = new javax.swing.JButton(); m_jMinus = new javax.swing.JButton(); m_jEditLine = new javax.swing.JButton(); m_jCalculatePromotion = new javax.swing.JButton(); m_jAction = new javax.swing.JButton(); m_jDelete = new javax.swing.JButton(); m_jKot = new javax.swing.JButton(); m_jBtnServed = new javax.swing.JButton(); m_jEraser = new javax.swing.JButton(); m_jContEntries = new javax.swing.JPanel(); m_jPanEntries = new javax.swing.JPanel(); catcontainer = new javax.swing.JPanel(); jPanel12 = new javax.swing.JPanel(); jLayeredPane1 = new javax.swing.JLayeredPane(); jPanel4 = new javax.swing.JPanel(); jPanel7 = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); m_jTxtTotalPaid = new javax.swing.JLabel(); m_jTxtChange = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); m_jTax = new javax.swing.JComboBox(); m_jPor = new javax.swing.JLabel(); m_jaddtax = new javax.swing.JToggleButton(); jLblPrinterStatus = new javax.swing.JLabel(); m_jKeyFactory = new javax.swing.JTextField(); jPanel8 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); m_jSubtotalEuros1 = new javax.swing.JLabel(); m_jLblTotalEuros4 = new javax.swing.JLabel(); m_jTaxesEuros1 = new javax.swing.JLabel(); m_jLblTotalEuros5 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); m_jLblTotalEuros6 = new javax.swing.JLabel(); m_jDiscount1 = new javax.swing.JLabel(); m_jTotalEuros = new javax.swing.JLabel(); jTaxPanel = new javax.swing.JPanel(); m_jServiceTaxLbl = new javax.swing.JLabel(); m_jServiceTax = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); m_jTaxList = new javax.swing.JList(); m_jSwachBharatLbl = new javax.swing.JLabel(); m_jSwachBharat = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); m_jPromoDiscount = new javax.swing.JLabel(); m_jProducts = new javax.swing.JPanel(); setBackground(new java.awt.Color(222, 232, 231)); setPreferredSize(new java.awt.Dimension(1024, 768)); setLayout(new java.awt.CardLayout()); m_jPanContainer.setBackground(new java.awt.Color(222, 232, 231)); m_jPanContainer.setLayout(new java.awt.BorderLayout()); m_jOptions.setBackground(new java.awt.Color(222, 232, 231)); m_jOptions.setLayout(new java.awt.BorderLayout()); m_jButtons.setBackground(new java.awt.Color(222, 232, 231)); m_jButtons.setPreferredSize(new java.awt.Dimension(4, 10)); m_jOptions.add(m_jButtons, java.awt.BorderLayout.LINE_START); m_jPanelScripts.setBackground(new java.awt.Color(222, 232, 231)); m_jPanelScripts.setLayout(new java.awt.BorderLayout()); m_jButtonsExt.setBackground(new java.awt.Color(222, 232, 231)); m_jButtonsExt.setLayout(new javax.swing.BoxLayout(m_jButtonsExt, javax.swing.BoxLayout.LINE_AXIS)); jPanel1.setBackground(new java.awt.Color(222, 232, 231)); jPanel1.setPreferredSize(new java.awt.Dimension(620, 47)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); m_jbtnScale.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ark216.png"))); // NOI18N m_jbtnScale.setText(AppLocal.getIntString("button.scale")); // NOI18N m_jbtnScale.setFocusPainted(false); m_jbtnScale.setFocusable(false); m_jbtnScale.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jbtnScale.setRequestFocusEnabled(false); m_jbtnScale.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jbtnScaleActionPerformed(evt); } }); jPanel1.add(m_jbtnScale, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 5, -1)); m_jLogout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1logout.png"))); // NOI18N m_jLogout.setToolTipText("Logout"); m_jLogout.setFocusable(false); m_jLogout.setPreferredSize(new java.awt.Dimension(40, 40)); m_jLogout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jLogoutActionPerformed(evt); } }); jPanel1.add(m_jLogout, new org.netbeans.lib.awtextra.AbsoluteConstraints(575, 0, -1, -1)); m_jbtnPrintBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Print-Bill.png"))); // NOI18N m_jbtnPrintBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jbtnPrintBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jbtnPrintBillActionPerformed(evt); } }); jPanel1.add(m_jbtnPrintBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(385, 0, -1, -1)); m_jSettleBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Settle-Bill.png"))); // NOI18N m_jSettleBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jSettleBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jSettleBillActionPerformed(evt); } }); jPanel1.add(m_jSettleBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 0, -1, -1)); m_jSplitBtn.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/190-40-BUTTON.png"))); // NOI18N m_jSplitBtn.setMnemonic('f'); m_jSplitBtn.setFocusPainted(false); m_jSplitBtn.setFocusable(false); m_jSplitBtn.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jSplitBtn.setPreferredSize(new java.awt.Dimension(90, 40)); m_jSplitBtn.setRequestFocusEnabled(false); m_jSplitBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jSplitBtnActionPerformed(evt); } }); jPanel1.add(m_jSplitBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1)); m_jBtnCancelBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/pos/templates/can-bill.png"))); // NOI18N m_jBtnCancelBill.setToolTipText("Cancel the Bill"); m_jBtnCancelBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnCancelBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnCancelBillActionPerformed(evt); } }); jPanel1.add(m_jBtnCancelBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 0, -1, -1)); m_jBtnBillOnHold.setBackground(new java.awt.Color(130, 130, 65)); m_jBtnBillOnHold.setForeground(new java.awt.Color(153, 153, 136)); m_jBtnBillOnHold .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/HOLD-BILL.png"))); // NOI18N m_jBtnBillOnHold.setToolTipText(""); m_jBtnBillOnHold.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnBillOnHold.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnBillOnHoldActionPerformed(evt); } }); jPanel1.add(m_jBtnBillOnHold, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 0, 90, 40)); m_jBtnDiscount.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/bill-discount.png"))); // NOI18N m_jBtnDiscount.setMnemonic('i'); m_jBtnDiscount.setToolTipText("Add Discount"); m_jBtnDiscount.setFocusPainted(false); m_jBtnDiscount.setFocusable(false); m_jBtnDiscount.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jBtnDiscount.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnDiscount.setRequestFocusEnabled(false); m_jBtnDiscount.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnDiscountActionPerformed(evt); } }); jPanel1.add(m_jBtnDiscount, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 0, -1, -1)); m_jButtonsExt.add(jPanel1); m_jPanelScripts.add(m_jButtonsExt, java.awt.BorderLayout.LINE_END); m_jOptions.add(m_jPanelScripts, java.awt.BorderLayout.LINE_END); m_jPanelBag.setBackground(new java.awt.Color(222, 232, 231)); m_jPanelBag.setFocusable(false); m_jPanelBag.setPreferredSize(new java.awt.Dimension(800, 35)); m_jPanelBag.setRequestFocusEnabled(false); m_jPanelBag.setLayout(new java.awt.BorderLayout()); m_jOptions.add(m_jPanelBag, java.awt.BorderLayout.CENTER); jPanel6.setBackground(new java.awt.Color(80, 102, 116)); jPanel6.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jPanel6.setPreferredSize(new java.awt.Dimension(1024, 90)); jPanel6.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel3.setBackground(new java.awt.Color(222, 232, 231)); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel3.setIcon(new javax.swing.ImageIcon( getClass().getResource("/com/openbravo/pos/templates/1header-habanero.png"))); // NOI18N jLabel3.setAutoscrolls(true); jLabel3.setFocusable(false); jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); jLabel3.setMaximumSize(new java.awt.Dimension(1450, 61)); jLabel3.setMinimumSize(new java.awt.Dimension(1024, 61)); jLabel3.setPreferredSize(new java.awt.Dimension(1024, 45)); jLabel3.setRequestFocusEnabled(false); jLabel3.setVerticalTextPosition(javax.swing.SwingConstants.TOP); jPanel6.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1551, -1)); m_jLblUserInfo.setBackground(new java.awt.Color(80, 102, 160)); m_jLblUserInfo.setForeground(new java.awt.Color(255, 255, 255)); m_jLblUserInfo.setText(" LOGGED IN USER:"); m_jLblUserInfo.setFocusable(false); m_jLblUserInfo.setPreferredSize(new java.awt.Dimension(340, 16)); m_jLblUserInfo.setRequestFocusEnabled(false); jPanel6.add(m_jLblUserInfo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 140, 50)); m_jUser.setForeground(new java.awt.Color(252, 248, 0)); m_jUser.setText("jLabel6"); jPanel6.add(m_jUser, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 40, 70, 50)); m_jLblCurrentDate.setBackground(new java.awt.Color(80, 102, 160)); m_jLblCurrentDate.setForeground(new java.awt.Color(255, 255, 255)); m_jLblCurrentDate.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jLblCurrentDate .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Date-icon.png"))); // NOI18N m_jLblCurrentDate.setFocusable(false); m_jLblCurrentDate.setPreferredSize(new java.awt.Dimension(300, 16)); m_jLblCurrentDate.setRequestFocusEnabled(false); jPanel6.add(m_jLblCurrentDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 45, 180, 45)); m_jLblTime.setBackground(new java.awt.Color(80, 102, 160)); m_jLblTime.setForeground(new java.awt.Color(255, 255, 255)); m_jLblTime.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jLblTime .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Clock-icon.png"))); // NOI18N m_jLblTime.setText( " jLabel2"); m_jLblTime.setFocusable(false); m_jLblTime.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); m_jLblTime.setPreferredSize(new java.awt.Dimension(300, 16)); m_jLblTime.setRequestFocusEnabled(false); jPanel6.add(m_jLblTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 45, 230, 45)); jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Bill No:"); jPanel6.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 40, 50, 50)); m_jLblBillNo.setForeground(new java.awt.Color(252, 248, 0)); jPanel6.add(m_jLblBillNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 40, 90, 50)); m_jOptions.add(jPanel6, java.awt.BorderLayout.NORTH); m_jPanContainer.add(m_jOptions, java.awt.BorderLayout.NORTH); m_jPanTicket.setBackground(new java.awt.Color(222, 232, 231)); m_jPanTicket.setLayout(new java.awt.BorderLayout()); jPanel10.setBackground(new java.awt.Color(222, 232, 231)); jPanel10.setPreferredSize(new java.awt.Dimension(803, 48)); jPanel10.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButtonAddon .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Add-on.png"))); // NOI18N jButtonAddon.setPreferredSize(new java.awt.Dimension(90, 40)); jButtonAddon.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAddonActionPerformed(evt); } }); jPanel10.add(jButtonAddon, new org.netbeans.lib.awtextra.AbsoluteConstraints(793, 2, 90, 40)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Category.png"))); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel10.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(888, 2, 90, 40)); jButton3.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/subcategory.png"))); // NOI18N jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel10.add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(983, 2, 90, 40)); m_jLblItemCode.setText("ITEM CODE"); jPanel10.add(m_jLblItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 8, 90, 20)); m_jTxtItemCode.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1))); m_jTxtItemCode.setMinimumSize(new java.awt.Dimension(123, 20)); m_jTxtItemCode.setPreferredSize(new java.awt.Dimension(123, 20)); m_jTxtItemCode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jTxtItemCodeActionPerformed(evt); } }); jPanel10.add(m_jTxtItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 10, -1, 20)); m_jLblItemName.setText("ITEM NAME"); jPanel10.add(m_jLblItemName, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 10, -1, 20)); m_jCboItemName.setEditable(true); m_jCboItemName.setAutoscrolls(true); m_jCboItemName.setMaximumSize(new java.awt.Dimension(123, 20)); m_jCboItemName.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { m_jCboItemNameItemStateChanged(evt); } }); m_jCboItemName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jCboItemNameActionPerformed(evt); } }); jPanel10.add(m_jCboItemName, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 10, 340, -1)); m_jPanTicket.add(jPanel10, java.awt.BorderLayout.PAGE_START); m_jPanelCentral.setFocusable(false); m_jPanelCentral.setRequestFocusEnabled(false); m_jPanelCentral.setLayout(new java.awt.BorderLayout()); jPanel5.setLayout(new java.awt.BorderLayout()); jPanel2.setBackground(new java.awt.Color(222, 232, 231)); jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5)); jPanel2.setMinimumSize(new java.awt.Dimension(66, 338)); jPanel2.setPreferredSize(new java.awt.Dimension(61, 400)); m_jPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TPlus.png"))); // NOI18N m_jPlus.setToolTipText("Increase selected item quantity by one"); m_jPlus.setFocusPainted(false); m_jPlus.setFocusable(false); m_jPlus.setMaximumSize(new java.awt.Dimension(51, 42)); m_jPlus.setMinimumSize(new java.awt.Dimension(51, 42)); m_jPlus.setPreferredSize(new java.awt.Dimension(51, 42)); m_jPlus.setRequestFocusEnabled(false); m_jPlus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jPlusActionPerformed(evt); } }); m_jMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TMinus.png"))); // NOI18N m_jMinus.setToolTipText("Decrease selected item's quantity by one"); m_jMinus.setFocusPainted(false); m_jMinus.setFocusable(false); m_jMinus.setMaximumSize(new java.awt.Dimension(51, 42)); m_jMinus.setMinimumSize(new java.awt.Dimension(51, 42)); m_jMinus.setPreferredSize(new java.awt.Dimension(51, 42)); m_jMinus.setRequestFocusEnabled(false); m_jMinus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jMinusActionPerformed(evt); } }); m_jEditLine.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TEdit.png"))); // NOI18N m_jEditLine.setMnemonic('e'); m_jEditLine.setToolTipText("Edit Properties of selected item"); m_jEditLine.setFocusPainted(false); m_jEditLine.setFocusable(false); m_jEditLine.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jEditLine.setRequestFocusEnabled(false); m_jEditLine.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jEditLineActionPerformed(evt); } }); m_jCalculatePromotion .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/pramo.png"))); // NOI18N m_jCalculatePromotion.setMnemonic('f'); m_jCalculatePromotion.setFocusPainted(false); m_jCalculatePromotion.setFocusable(false); m_jCalculatePromotion.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jCalculatePromotion.setPreferredSize(new java.awt.Dimension(51, 42)); m_jCalculatePromotion.setRequestFocusEnabled(false); m_jCalculatePromotion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jCalculatePromotionActionPerformed(evt); } }); m_jAction.setBorder(null); m_jAction.setBorderPainted(false); m_jAction.setPreferredSize(new java.awt.Dimension(10, 2)); m_jAction.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jActionActionPerformed(evt); } }); m_jDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Tclose.png"))); // NOI18N m_jDelete.setMnemonic('d'); m_jDelete.setToolTipText("Remove total quantity of selected item"); m_jDelete.setFocusPainted(false); m_jDelete.setFocusable(false); m_jDelete.setMinimumSize(new java.awt.Dimension(51, 42)); m_jDelete.setPreferredSize(new java.awt.Dimension(51, 42)); m_jDelete.setRequestFocusEnabled(false); m_jDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jDeleteActionPerformed(evt); } }); m_jKot.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TKOT.png"))); // NOI18N m_jKot.setToolTipText("Send All Fresh Items to Kitchen"); m_jKot.setPreferredSize(new java.awt.Dimension(51, 42)); m_jKot.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnKotActionPerformed(evt); } }); m_jBtnServed.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/servedsymbol.png"))); // NOI18N m_jBtnServed.setToolTipText("Serve Selected Item"); m_jBtnServed.setPreferredSize(new java.awt.Dimension(91, 73)); m_jBtnServed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnServedActionPerformed(evt); } }); m_jEraser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TDelete.png"))); // NOI18N m_jEraser.setMnemonic('i'); m_jEraser.setToolTipText("Clear All Non KOT Items"); m_jEraser.setFocusPainted(false); m_jEraser.setFocusable(false); m_jEraser.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jEraser.setRequestFocusEnabled(false); m_jEraser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jEraserActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(5, 5, 5).add(jPanel2Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(m_jPlus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jMinus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(m_jEraser, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jCalculatePromotion, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jKot, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jBtnServed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(112, 112, 112).add(m_jAction, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(m_jEditLine, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(m_jPlus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(5, 5, 5) .add(m_jMinus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(4, 4, 4) .add(m_jDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(4, 4, 4) .add(m_jEditLine, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(61, 61, 61).add(m_jAction, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel2Layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jEraser, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jCalculatePromotion, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jKot, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jBtnServed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(26, Short.MAX_VALUE))); jPanel5.add(jPanel2, java.awt.BorderLayout.NORTH); m_jPanelCentral.add(jPanel5, java.awt.BorderLayout.LINE_END); m_jPanTicket.add(m_jPanelCentral, java.awt.BorderLayout.CENTER); m_jContEntries.setFocusable(false); m_jContEntries.setPreferredSize(new java.awt.Dimension(501, 500)); m_jContEntries.setRequestFocusEnabled(false); m_jContEntries.setLayout(new java.awt.BorderLayout()); m_jPanEntries.setMinimumSize(new java.awt.Dimension(508, 500)); m_jPanEntries.setPreferredSize(new java.awt.Dimension(495, 525)); m_jPanEntries.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); catcontainer.setPreferredSize(new java.awt.Dimension(300, 200)); catcontainer.setLayout(new java.awt.BorderLayout()); m_jPanEntries.add(catcontainer, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 508, 510)); m_jContEntries.add(m_jPanEntries, java.awt.BorderLayout.PAGE_START); m_jPanTicket.add(m_jContEntries, java.awt.BorderLayout.LINE_END); jPanel12.setBackground(new java.awt.Color(222, 232, 231)); jPanel12.setFocusable(false); jPanel12.setPreferredSize(new java.awt.Dimension(600, 5)); jPanel12.setRequestFocusEnabled(false); jPanel12.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLayeredPane1.setPreferredSize(new java.awt.Dimension(300, 402)); jPanel12.add(jLayeredPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, -500, 989, 509)); m_jPanTicket.add(jPanel12, java.awt.BorderLayout.PAGE_END); m_jPanContainer.add(m_jPanTicket, java.awt.BorderLayout.CENTER); jPanel4.setBackground(new java.awt.Color(222, 232, 231)); jPanel4.setPreferredSize(new java.awt.Dimension(1024, 210)); jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPanel7.setBorder( javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(204, 204, 204))); jPanel7.setMaximumSize(new java.awt.Dimension(700, 158)); jPanel7.setPreferredSize(new java.awt.Dimension(320, 158)); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel7.setText("TOTAL PAID"); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel8.setText("CHANGE"); m_jTxtTotalPaid.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N m_jTxtTotalPaid.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTxtTotalPaid.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_jTxtTotalPaid.setFocusable(false); m_jTxtTotalPaid.setOpaque(true); m_jTxtTotalPaid.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTxtTotalPaid.setRequestFocusEnabled(false); m_jTxtChange.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N m_jTxtChange.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTxtChange.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_jTxtChange.setFocusable(false); m_jTxtChange.setOpaque(true); m_jTxtChange.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTxtChange.setRequestFocusEnabled(false); jPanel3.setPreferredSize(new java.awt.Dimension(228, 100)); m_jTax.setFocusable(false); m_jTax.setRequestFocusEnabled(false); m_jPor.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jPor.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_jPor.setFocusable(false); m_jPor.setOpaque(true); m_jPor.setPreferredSize(new java.awt.Dimension(22, 22)); m_jPor.setRequestFocusEnabled(false); m_jaddtax.setText("+"); m_jaddtax.setFocusPainted(false); m_jaddtax.setFocusable(false); m_jaddtax.setRequestFocusEnabled(false); jLblPrinterStatus.setForeground(new java.awt.Color(255, 0, 0)); m_jKeyFactory.setBackground(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setForeground(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setBorder(null); m_jKeyFactory.setCaretColor(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setPreferredSize(new java.awt.Dimension(4, 4)); m_jKeyFactory.setRequestFocusEnabled(false); m_jKeyFactory.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { m_jKeyFactoryKeyTyped(evt); } }); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().addContainerGap() .add(m_jKeyFactory, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 239, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(65, 65, 65).add(jLblPrinterStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 68, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel3Layout.createSequentialGroup().add(20, 20, 20) .add(m_jaddtax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(m_jPor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel3Layout.createSequentialGroup().addContainerGap().add(m_jTax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().add(6, 6, 6).add(jLblPrinterStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(m_jKeyFactory, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jTax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(21, 21, 21) .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(m_jPor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jaddtax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup().add(10, 10, 10) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup() .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3) .add(m_jTxtTotalPaid, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel7Layout.createSequentialGroup() .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(19, 19, 19).add(m_jTxtChange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel7Layout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 392, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel7Layout .setVerticalGroup(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup() .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 89, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(270, 270, 270) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jTxtTotalPaid, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(10, 10, 10) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jTxtChange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))); jPanel4.add(jPanel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(1325, 1, 170, 160)); jPanel8.setBackground(new java.awt.Color(255, 255, 255)); jPanel8.setBorder( javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(204, 204, 204))); jPanel8.setPreferredSize(new java.awt.Dimension(1551, 193)); jPanel8.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Bill Details"); jPanel8.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(15, 12, 188, -1)); m_jSubtotalEuros1.setBackground(new java.awt.Color(255, 255, 255)); m_jSubtotalEuros1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jSubtotalEuros1.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_jSubtotalEuros1.setFocusable(false); m_jSubtotalEuros1.setOpaque(true); m_jSubtotalEuros1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jSubtotalEuros1.setRequestFocusEnabled(false); jPanel8.add(m_jSubtotalEuros1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 40, 80, 23)); m_jLblTotalEuros4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros4.setText("SUB TOTAL"); jPanel8.add(m_jLblTotalEuros4, new org.netbeans.lib.awtextra.AbsoluteConstraints(11, 37, 94, 23)); m_jTaxesEuros1.setBackground(new java.awt.Color(255, 255, 255)); m_jTaxesEuros1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jTaxesEuros1.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_jTaxesEuros1.setFocusable(false); m_jTaxesEuros1.setOpaque(true); m_jTaxesEuros1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTaxesEuros1.setRequestFocusEnabled(false); jPanel8.add(m_jTaxesEuros1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 80, 23)); m_jLblTotalEuros5.setBackground(new java.awt.Color(255, 255, 255)); m_jLblTotalEuros5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros5.setText("TAXES"); jPanel8.add(m_jLblTotalEuros5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 60, 23)); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel5.setText("DISCOUNT"); jPanel8.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 80, 23)); m_jLblTotalEuros6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros6.setText("TOTAL SALES"); jPanel8.add(m_jLblTotalEuros6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 160, 80, 20)); m_jDiscount1.setBackground(new java.awt.Color(255, 255, 255)); m_jDiscount1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jDiscount1.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_jDiscount1.setFocusable(false); m_jDiscount1.setOpaque(true); m_jDiscount1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jDiscount1.setRequestFocusEnabled(false); jPanel8.add(m_jDiscount1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, 80, 23)); m_jTotalEuros.setBackground(new java.awt.Color(255, 255, 255)); m_jTotalEuros.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTotalEuros.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_jTotalEuros.setFocusable(false); m_jTotalEuros.setOpaque(true); m_jTotalEuros.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTotalEuros.setRequestFocusEnabled(false); jPanel8.add(m_jTotalEuros, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 160, 80, 23)); jTaxPanel.setBackground(new java.awt.Color(255, 255, 255)); jTaxPanel.setPreferredSize(new java.awt.Dimension(202, 157)); jTaxPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); m_jServiceTaxLbl.setText("SERVICE TAX"); jTaxPanel.add(m_jServiceTaxLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 100, 23)); m_jServiceTax.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jTaxPanel.add(m_jServiceTax, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 40, 73, 23)); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Tax Breakup"); jTaxPanel.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 11, 194, -1)); jScrollPane1.setBorder(null); jScrollPane1.setViewportView(m_jTaxList); jTaxPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 37, 200, 140)); m_jSwachBharatLbl.setText("SWACHH BHARAT TAX"); jTaxPanel.add(m_jSwachBharatLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 70, 130, 20)); m_jSwachBharat.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jTaxPanel.add(m_jSwachBharat, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 70, 20)); jPanel8.add(jTaxPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(221, 1, -1, 178)); jLabel6.setText("PROMO DISCOUNT"); jPanel8.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 130, 120, 20)); m_jPromoDiscount.setBackground(new java.awt.Color(255, 255, 255)); m_jPromoDiscount.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jPromoDiscount.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_jPromoDiscount.setFocusable(false); m_jPromoDiscount.setOpaque(true); m_jPromoDiscount.setPreferredSize(new java.awt.Dimension(123, 25)); m_jPromoDiscount.setRequestFocusEnabled(false); jPanel8.add(m_jPromoDiscount, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 130, 80, 23)); jPanel4.add(jPanel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(7, 1, 434, -1)); m_jProducts.setBackground(new java.awt.Color(255, 255, 255)); m_jProducts.setLayout(new java.awt.CardLayout()); jPanel4.add(m_jProducts, new org.netbeans.lib.awtextra.AbsoluteConstraints(447, 1, 551, 190)); m_jPanContainer.add(jPanel4, java.awt.BorderLayout.SOUTH); add(m_jPanContainer, "ticket"); }
From source file:op.care.med.structure.PnlMed.java
private java.util.List<Component> addFilters() { java.util.List<Component> list = new ArrayList<Component>(); tbIDs = GUITools.getNiceToggleButton("misc.msg.showIDs"); tbIDs.addItemListener(new ItemListener() { @Override/* w ww .ja v a 2 s .c om*/ public void itemStateChanged(ItemEvent e) { reload(); } }); tbIDs.setHorizontalAlignment(SwingConstants.LEFT); list.add(tbIDs); txtSuche = new JXSearchField("Suchen"); txtSuche.setFont(SYSConst.ARIAL14); txtSuche.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { txtSucheActionPerformed(actionEvent); } }); txtSuche.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent focusEvent) { SYSTools.markAllTxt(txtSuche); } }); list.add(txtSuche); lstPraep = new JList(new DefaultListModel()); lstPraep.setCellRenderer(MedProductsTools.getMedProdukteRenderer()); lstPraep.setFont(SYSConst.ARIAL14); lstPraep.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent listSelectionEvent) { lstPraepValueChanged(listSelectionEvent); } }); lstPraep.setFixedCellWidth(200); list.add(new JScrollPane(lstPraep)); return list; }
From source file:op.care.nursingprocess.PnlSchedule.java
/** * This method is called from within the constructor to * initialize the form./*from w w w . j ava 2 s. c o m*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { panelMain = new JPanel(); splitRegular = new JSplitPane(); pnlTageszeit = new JPanel(); jLabel6 = new JideLabel(); jLabel1 = new JideLabel(); jLabel2 = new JideLabel(); jLabel11 = new JideLabel(); jLabel3 = new JideLabel(); jLabel4 = new JideLabel(); txtNachtMo = new JTextField(); txtMorgens = new JTextField(); txtMittags = new JTextField(); txtNachmittags = new JTextField(); txtAbends = new JTextField(); txtNachtAb = new JTextField(); btnToTime = new JButton(); pnlUhrzeit = new JPanel(); lblUhrzeit = new JideLabel(); btnToTimeOfDay = new JButton(); txtUhrzeit = new JTextField(); cmbUhrzeit = new JComboBox(); tabWdh = new JideTabbedPane(); pnlDaily = new JPanel(); label3 = new JLabel(); spinTaeglich = new JSpinner(); jLabel7 = new JLabel(); btnJedenTag = new JButton(); pnlWeekly = new JPanel(); panel3 = new JPanel(); btnJedeWoche = new JButton(); label2 = new JLabel(); spinWoche = new JSpinner(); jLabel8 = new JLabel(); lblUhrzeit2 = new JideLabel(); lblUhrzeit3 = new JideLabel(); lblUhrzeit4 = new JideLabel(); lblUhrzeit5 = new JideLabel(); lblUhrzeit6 = new JideLabel(); lblUhrzeit7 = new JideLabel(); lblUhrzeit8 = new JideLabel(); cbMon = new JCheckBox(); cbDie = new JCheckBox(); cbMit = new JCheckBox(); cbDon = new JCheckBox(); cbFre = new JCheckBox(); cbSam = new JCheckBox(); cbSon = new JCheckBox(); pnlMonthly = new JPanel(); label4 = new JLabel(); spinMonat = new JSpinner(); label6 = new JLabel(); btnJedenMonat = new JButton(); label5 = new JLabel(); spinMonatTag = new JSpinner(); cmbTag = new JComboBox<>(); panel2 = new JPanel(); jLabel13 = new JLabel(); txtLDate = new JTextField(); lblMinutes = new JLabel(); txtMinutes = new JTextField(); pnlBemerkung = new JPanel(); jScrollPane1 = new JScrollPane(); txtBemerkung = new JTextArea(); btnSave = new JButton(); //======== this ======== setLayout(new BorderLayout()); //======== panelMain ======== { panelMain.setBorder(new LineBorder(Color.black, 2, true)); panelMain.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { panelMainComponentResized(e); } }); panelMain.setLayout(new FormLayout("$rgap, $lcgap, 223dlu:grow, $lcgap, $rgap", "$rgap, $lgap, pref, $lgap, default, $lgap, pref, $lgap, default, $lgap, 72dlu:grow, 2*($lgap, default)")); //======== splitRegular ======== { splitRegular.setDividerSize(0); splitRegular.setEnabled(false); splitRegular.setDividerLocation(150); splitRegular.setDoubleBuffered(true); //======== pnlTageszeit ======== { pnlTageszeit.setFont(new Font("Arial", Font.PLAIN, 14)); pnlTageszeit.setBorder(new EtchedBorder()); pnlTageszeit.setLayout( new FormLayout("6*(28dlu, $lcgap), default", "fill:default, $lgap, fill:default")); //---- jLabel6 ---- jLabel6.setText("Nachts, fr\u00fch morgens"); jLabel6.setOrientation(1); jLabel6.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel6.setClockwise(false); jLabel6.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel6, CC.xy(1, 1)); //---- jLabel1 ---- jLabel1.setForeground(new Color(0, 0, 204)); jLabel1.setText("Morgens"); jLabel1.setOrientation(1); jLabel1.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel1.setClockwise(false); jLabel1.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel1, CC.xy(3, 1)); //---- jLabel2 ---- jLabel2.setForeground(new Color(255, 102, 0)); jLabel2.setText("Mittags"); jLabel2.setOrientation(1); jLabel2.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel2.setClockwise(false); jLabel2.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel2, CC.xy(5, 1)); //---- jLabel11 ---- jLabel11.setForeground(new Color(0, 153, 51)); jLabel11.setText("Nachmittag"); jLabel11.setOrientation(1); jLabel11.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel11.setClockwise(false); jLabel11.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel11, CC.xy(7, 1)); //---- jLabel3 ---- jLabel3.setForeground(new Color(255, 0, 51)); jLabel3.setText("Abends"); jLabel3.setOrientation(1); jLabel3.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel3.setClockwise(false); jLabel3.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel3, CC.xy(9, 1)); //---- jLabel4 ---- jLabel4.setText("Nacht, sp\u00e4t abends"); jLabel4.setOrientation(1); jLabel4.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel4.setClockwise(false); jLabel4.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(jLabel4, CC.xy(11, 1)); //---- txtNachtMo ---- txtNachtMo.setHorizontalAlignment(SwingConstants.RIGHT); txtNachtMo.setText("0.0"); txtNachtMo.setFont(new Font("Arial", Font.PLAIN, 14)); txtNachtMo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtNachtMoActionPerformed(e); } }); txtNachtMo.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtNachtMo, CC.xy(1, 3)); //---- txtMorgens ---- txtMorgens.setHorizontalAlignment(SwingConstants.RIGHT); txtMorgens.setText("1.0"); txtMorgens.setFont(new Font("Arial", Font.PLAIN, 14)); txtMorgens.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtMorgensActionPerformed(e); } }); txtMorgens.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtMorgens, CC.xy(3, 3)); //---- txtMittags ---- txtMittags.setHorizontalAlignment(SwingConstants.RIGHT); txtMittags.setText("0.0"); txtMittags.setFont(new Font("Arial", Font.PLAIN, 14)); txtMittags.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtMittagsActionPerformed(e); } }); txtMittags.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtMittags, CC.xy(5, 3)); //---- txtNachmittags ---- txtNachmittags.setHorizontalAlignment(SwingConstants.RIGHT); txtNachmittags.setText("0.0"); txtNachmittags.setFont(new Font("Arial", Font.PLAIN, 14)); txtNachmittags.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtNachmittagsActionPerformed(e); } }); txtNachmittags.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtNachmittags, CC.xy(7, 3)); //---- txtAbends ---- txtAbends.setHorizontalAlignment(SwingConstants.RIGHT); txtAbends.setText("0.0"); txtAbends.setFont(new Font("Arial", Font.PLAIN, 14)); txtAbends.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtAbendsActionPerformed(e); } }); txtAbends.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtAbends, CC.xy(9, 3)); //---- txtNachtAb ---- txtNachtAb.setHorizontalAlignment(SwingConstants.RIGHT); txtNachtAb.setText("0.0"); txtNachtAb.setFont(new Font("Arial", Font.PLAIN, 14)); txtNachtAb.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtNachtAbActionPerformed(e); } }); txtNachtAb.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlTageszeit.add(txtNachtAb, CC.xy(11, 3)); //---- btnToTime ---- btnToTime.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/1rightarrow.png"))); btnToTime.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnToTimeActionPerformed(e); } }); pnlTageszeit.add(btnToTime, CC.xy(13, 3)); } splitRegular.setLeftComponent(pnlTageszeit); //======== pnlUhrzeit ======== { pnlUhrzeit.setBorder(new EtchedBorder()); pnlUhrzeit.setLayout( new FormLayout("default, $ugap, 75dlu, $ugap, pref", "default:grow, $rgap, default")); //---- lblUhrzeit ---- lblUhrzeit.setText("Anzahl Massnahmen"); lblUhrzeit.setOrientation(2); lblUhrzeit.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit.setClockwise(false); lblUhrzeit.setHorizontalTextPosition(SwingConstants.LEFT); lblUhrzeit.setVerticalAlignment(SwingConstants.BOTTOM); pnlUhrzeit.add(lblUhrzeit, CC.xy(3, 1, CC.DEFAULT, CC.BOTTOM)); //---- btnToTimeOfDay ---- btnToTimeOfDay .setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/1leftarrow.png"))); btnToTimeOfDay.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnToTimeOfDayActionPerformed(e); } }); pnlUhrzeit.add(btnToTimeOfDay, CC.xy(1, 3)); //---- txtUhrzeit ---- txtUhrzeit.setHorizontalAlignment(SwingConstants.RIGHT); txtUhrzeit.setText("0.0"); txtUhrzeit.setFont(new Font("Arial", Font.PLAIN, 14)); txtUhrzeit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtUhrzeitActionPerformed(e); } }); txtUhrzeit.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtIntegerFocusLost(e); } }); pnlUhrzeit.add(txtUhrzeit, CC.xy(3, 3)); //---- cmbUhrzeit ---- cmbUhrzeit.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbUhrzeitItemStateChanged(e); } }); pnlUhrzeit.add(cmbUhrzeit, CC.xy(5, 3)); } splitRegular.setRightComponent(pnlUhrzeit); } panelMain.add(splitRegular, CC.xy(3, 3)); //======== tabWdh ======== { //======== pnlDaily ======== { pnlDaily.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.setLayout(new FormLayout("2*(default), $rgap, $lcgap, 40dlu, $rgap, default", "default, $lgap, pref, $lgap, default")); //---- label3 ---- label3.setText("alle"); label3.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.add(label3, CC.xy(2, 3)); //---- spinTaeglich ---- spinTaeglich.setFont(new Font("Arial", Font.PLAIN, 14)); spinTaeglich.setModel(new SpinnerNumberModel(1, null, null, 1)); pnlDaily.add(spinTaeglich, CC.xy(5, 3)); //---- jLabel7 ---- jLabel7.setText("Tage"); jLabel7.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.add(jLabel7, CC.xy(7, 3)); //---- btnJedenTag ---- btnJedenTag.setText("Jeden Tag"); btnJedenTag.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedenTagActionPerformed(e); } }); pnlDaily.add(btnJedenTag, CC.xywh(2, 5, 6, 1)); } tabWdh.addTab("T\u00e4glich", pnlDaily); //======== pnlWeekly ======== { pnlWeekly.setFont(new Font("Arial", Font.PLAIN, 14)); pnlWeekly.setLayout(new FormLayout("default, 7*(13dlu), $lcgap, default:grow", "$ugap, $lgap, default, $lgap, pref, default:grow, $lgap, $rgap")); //======== panel3 ======== { panel3.setLayout( new FormLayout("default, $rgap, 40dlu, $rgap, 2*(default), $lcgap, default, $lcgap", "default:grow, $lgap, default")); //---- btnJedeWoche ---- btnJedeWoche.setText("Jede Woche"); btnJedeWoche.setFont(new Font("Arial", Font.PLAIN, 14)); btnJedeWoche.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedeWocheActionPerformed(e); } }); panel3.add(btnJedeWoche, CC.xywh(3, 3, 3, 1)); //---- label2 ---- label2.setText("alle"); label2.setFont(new Font("Arial", Font.PLAIN, 14)); panel3.add(label2, CC.xy(1, 1)); panel3.add(spinWoche, CC.xy(3, 1)); //---- jLabel8 ---- jLabel8.setText("Wochen am"); jLabel8.setFont(new Font("Arial", Font.PLAIN, 14)); panel3.add(jLabel8, CC.xy(5, 1)); } pnlWeekly.add(panel3, CC.xywh(2, 3, 9, 1)); //---- lblUhrzeit2 ---- lblUhrzeit2.setText("montags"); lblUhrzeit2.setOrientation(1); lblUhrzeit2.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit2.setClockwise(false); lblUhrzeit2.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit2, CC.xy(2, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit3 ---- lblUhrzeit3.setText("dienstags"); lblUhrzeit3.setOrientation(1); lblUhrzeit3.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit3.setClockwise(false); lblUhrzeit3.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit3, CC.xy(3, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit4 ---- lblUhrzeit4.setText("mittwochs"); lblUhrzeit4.setOrientation(1); lblUhrzeit4.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit4.setClockwise(false); lblUhrzeit4.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit4, CC.xy(4, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit5 ---- lblUhrzeit5.setText("donnerstags"); lblUhrzeit5.setOrientation(1); lblUhrzeit5.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit5.setClockwise(false); lblUhrzeit5.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit5, CC.xy(5, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit6 ---- lblUhrzeit6.setText("freitags"); lblUhrzeit6.setOrientation(1); lblUhrzeit6.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit6.setClockwise(false); lblUhrzeit6.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit6, CC.xy(6, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit7 ---- lblUhrzeit7.setText("samstags"); lblUhrzeit7.setOrientation(1); lblUhrzeit7.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit7.setClockwise(false); lblUhrzeit7.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit7, CC.xy(7, 5, CC.CENTER, CC.BOTTOM)); //---- lblUhrzeit8 ---- lblUhrzeit8.setText("sonntags"); lblUhrzeit8.setOrientation(1); lblUhrzeit8.setFont(new Font("Arial", Font.PLAIN, 14)); lblUhrzeit8.setClockwise(false); lblUhrzeit8.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblUhrzeit8, CC.xy(8, 5, CC.CENTER, CC.BOTTOM)); //---- cbMon ---- cbMon.setBorder(BorderFactory.createEmptyBorder()); cbMon.setMargin(new Insets(0, 0, 0, 0)); cbMon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbMonActionPerformed(e); } }); pnlWeekly.add(cbMon, CC.xy(2, 6, CC.CENTER, CC.DEFAULT)); //---- cbDie ---- cbDie.setBorder(BorderFactory.createEmptyBorder()); cbDie.setMargin(new Insets(0, 0, 0, 0)); cbDie.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbDieActionPerformed(e); } }); pnlWeekly.add(cbDie, CC.xy(3, 6, CC.CENTER, CC.DEFAULT)); //---- cbMit ---- cbMit.setBorder(BorderFactory.createEmptyBorder()); cbMit.setMargin(new Insets(0, 0, 0, 0)); cbMit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbMitActionPerformed(e); } }); pnlWeekly.add(cbMit, CC.xy(4, 6, CC.CENTER, CC.DEFAULT)); //---- cbDon ---- cbDon.setBorder(BorderFactory.createEmptyBorder()); cbDon.setMargin(new Insets(0, 0, 0, 0)); cbDon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbDonActionPerformed(e); } }); pnlWeekly.add(cbDon, CC.xy(5, 6, CC.CENTER, CC.DEFAULT)); //---- cbFre ---- cbFre.setBorder(BorderFactory.createEmptyBorder()); cbFre.setMargin(new Insets(0, 0, 0, 0)); cbFre.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbFreActionPerformed(e); } }); pnlWeekly.add(cbFre, CC.xy(6, 6, CC.CENTER, CC.DEFAULT)); //---- cbSam ---- cbSam.setBorder(BorderFactory.createEmptyBorder()); cbSam.setMargin(new Insets(0, 0, 0, 0)); cbSam.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbSamActionPerformed(e); } }); pnlWeekly.add(cbSam, CC.xy(7, 6, CC.CENTER, CC.DEFAULT)); //---- cbSon ---- cbSon.setBorder(BorderFactory.createEmptyBorder()); cbSon.setMargin(new Insets(0, 0, 0, 0)); cbSon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbSonActionPerformed(e); } }); pnlWeekly.add(cbSon, CC.xy(8, 6, CC.CENTER, CC.DEFAULT)); } tabWdh.addTab("W\u00f6chentlich", pnlWeekly); //======== pnlMonthly ======== { pnlMonthly.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.setLayout( new FormLayout("default, $lcgap, pref, $lcgap, 40dlu, $lcgap, pref, $lcgap, 61dlu", "3*(default, $lgap), default")); //---- label4 ---- label4.setText("jeden"); label4.setFont(new Font("Arial", Font.PLAIN, 14)); label4.setHorizontalAlignment(SwingConstants.TRAILING); pnlMonthly.add(label4, CC.xy(3, 3)); //---- spinMonat ---- spinMonat.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.add(spinMonat, CC.xy(5, 3)); //---- label6 ---- label6.setText("Monat"); label6.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.add(label6, CC.xy(7, 3)); //---- btnJedenMonat ---- btnJedenMonat.setText("Jeden Monat"); btnJedenMonat.setFont(new Font("Arial", Font.PLAIN, 14)); btnJedenMonat.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedenMonatActionPerformed(e); } }); pnlMonthly.add(btnJedenMonat, CC.xywh(3, 5, 5, 1)); //---- label5 ---- label5.setText("jeweils am"); label5.setFont(new Font("Arial", Font.PLAIN, 14)); label5.setHorizontalAlignment(SwingConstants.TRAILING); pnlMonthly.add(label5, CC.xy(3, 7)); //---- spinMonatTag ---- spinMonatTag.setFont(new Font("Arial", Font.PLAIN, 14)); spinMonatTag.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { spinMonatTagStateChanged(e); } }); pnlMonthly.add(spinMonatTag, CC.xy(5, 7)); //---- cmbTag ---- cmbTag.setModel(new DefaultComboBoxModel<>(new String[] { "Tag des Monats", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag" })); cmbTag.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.add(cmbTag, CC.xywh(7, 7, 3, 1)); } tabWdh.addTab("Monatlich", pnlMonthly); } panelMain.add(tabWdh, CC.xy(3, 7, CC.FILL, CC.FILL)); //======== panel2 ======== { panel2.setLayout(new FormLayout( "default, $lcgap, default:grow, $ugap, default, $lcgap, default:grow", "default:grow")); //---- jLabel13 ---- jLabel13.setText("Erst einplanen ab dem"); jLabel13.setFont(new Font("Arial", Font.PLAIN, 14)); panel2.add(jLabel13, CC.xy(1, 1)); //---- txtLDate ---- txtLDate.setFont(new Font("Arial", Font.PLAIN, 14)); txtLDate.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtLDateFocusLost(e); } }); panel2.add(txtLDate, CC.xy(3, 1)); //---- lblMinutes ---- lblMinutes.setText("text"); lblMinutes.setFont(new Font("Arial", Font.PLAIN, 14)); panel2.add(lblMinutes, CC.xy(5, 1)); //---- txtMinutes ---- txtMinutes.setFont(new Font("Arial", Font.PLAIN, 14)); txtMinutes.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtMinutesFocusLost(e); } }); panel2.add(txtMinutes, CC.xy(7, 1)); } panelMain.add(panel2, CC.xy(3, 9)); //======== pnlBemerkung ======== { pnlBemerkung.setBorder(new TitledBorder(null, "Kommentar zur Anwendung (Erscheint im DFN)", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Arial", Font.PLAIN, 14))); pnlBemerkung.setLayout(new BoxLayout(pnlBemerkung, BoxLayout.X_AXIS)); //======== jScrollPane1 ======== { //---- txtBemerkung ---- txtBemerkung.setColumns(20); txtBemerkung.setRows(5); jScrollPane1.setViewportView(txtBemerkung); } pnlBemerkung.add(jScrollPane1); } panelMain.add(pnlBemerkung, CC.xy(3, 11, CC.FILL, CC.FILL)); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveActionPerformed(e); } }); panelMain.add(btnSave, CC.xy(3, 13, CC.RIGHT, CC.DEFAULT)); } add(panelMain, BorderLayout.CENTER); }
From source file:op.care.prescription.PnlPrescription.java
private java.util.List<Component> addFilters() { java.util.List<Component> list = new ArrayList<Component>(); tbClosed = GUITools.getNiceToggleButton("nursingrecords.prescription.showclosed"); tbClosed.addItemListener(new ItemListener() { @Override// w ww .j a va 2 s .c o m public void itemStateChanged(ItemEvent e) { reloadDisplay(); } }); tbClosed.setHorizontalAlignment(SwingConstants.LEFT); list.add(tbClosed); if (!listUsedCommontags.isEmpty()) { JPanel pnlTags = new JPanel(); pnlTags.setLayout(new BoxLayout(pnlTags, BoxLayout.Y_AXIS)); pnlTags.setOpaque(false); for (final Commontags commontag : listUsedCommontags) { final JButton btnTag = GUITools.createHyperlinkButton(commontag.getText(), SYSConst.icon16tagPurple, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { SYSFilesTools.print(PrescriptionTools.getPrescriptionsAsHTML( PrescriptionTools.getPrescriptions4Tags(resident, commontag), true, true, false, tbClosed.isSelected(), true), true); } }); btnTag.setForeground(GUITools.getColor(commontag.getColor())); pnlTags.add(btnTag); } list.add(pnlTags); } return list; }
From source file:op.care.prescription.PnlScheduleDose.java
/** * This method is called from within the constructor to * initialize the form./*from w w w. j av a2s. c o m*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { panelMain = new JPanel(); splitRegular = new JSplitPane(); pnlTageszeit = new JPanel(); lblVeryEarly = new JideLabel(); lblMorning = new JideLabel(); lblNoon = new JideLabel(); lblAfternoon = new JideLabel(); lblEvening = new JideLabel(); lblVeryLate = new JideLabel(); txtVeryEarly = new JTextField(); txtMorning = new JTextField(); txtNoon = new JTextField(); txtAfternoon = new JTextField(); txtEvening = new JTextField(); txtVeryLate = new JTextField(); btnToTime = new JButton(); pnlUhrzeit = new JPanel(); lblTimeDose = new JideLabel(); btnToTimeOfDay = new JButton(); txtTimeDose = new JTextField(); cmbUhrzeit = new JComboBox(); tabWdh = new JideTabbedPane(); pnlDaily = new JPanel(); lblEvery1 = new JLabel(); txtEveryDay = new JTextField(); lblDays = new JLabel(); btnEveryDay = new JideButton(); pnlWeekly = new JPanel(); panel3 = new JPanel(); lblEvery2 = new JLabel(); txtEveryWeek = new JTextField(); lblWeeksAt = new JLabel(); btnEveryWeek = new JideButton(); lblMon = new JideLabel(); lblTue = new JideLabel(); lblWed = new JideLabel(); lblThu = new JideLabel(); lblFri = new JideLabel(); lblSat = new JideLabel(); lblSun = new JideLabel(); cbMon = new JCheckBox(); cbTue = new JCheckBox(); cbWed = new JCheckBox(); cbThu = new JCheckBox(); cbFri = new JCheckBox(); cbSat = new JCheckBox(); cbSun = new JCheckBox(); pnlMonthly = new JPanel(); lblEach = new JLabel(); txtEveryMonth = new JTextField(); lblMonth = new JLabel(); btnEveryMonth = new JideButton(); lblOnThe = new JLabel(); txtEveryWDayOfMonth = new JTextField(); cmbWDay = new JComboBox(); panel2 = new JPanel(); lblLDate = new JLabel(); txtLDate = new JTextField(); btnSave = new JButton(); //======== this ======== setLayout(new BorderLayout()); //======== panelMain ======== { panelMain.setBorder(new LineBorder(Color.black, 2, true)); panelMain.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { panelMainComponentResized(e); } }); panelMain.setLayout(new FormLayout("$rgap, $lcgap, 223dlu, $lcgap, $rgap", "$rgap, 2*($lgap, pref), 2*($lgap, default), $lgap, $rgap")); //======== splitRegular ======== { splitRegular.setDividerSize(0); splitRegular.setEnabled(false); splitRegular.setDividerLocation(300); splitRegular.setDoubleBuffered(true); //======== pnlTageszeit ======== { pnlTageszeit.setFont(new Font("Arial", Font.PLAIN, 14)); pnlTageszeit.setBorder(new EtchedBorder()); pnlTageszeit.setLayout( new FormLayout("6*(28dlu, $lcgap), default", "fill:default, $lgap, fill:default")); //---- lblVeryEarly ---- lblVeryEarly.setText("Nachts, fr\u00fch morgens"); lblVeryEarly.setOrientation(1); lblVeryEarly.setFont(new Font("Arial", Font.PLAIN, 14)); lblVeryEarly.setClockwise(false); lblVeryEarly.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblVeryEarly, CC.xy(1, 1)); //---- lblMorning ---- lblMorning.setForeground(new Color(0, 0, 204)); lblMorning.setText("Morgens"); lblMorning.setOrientation(1); lblMorning.setFont(new Font("Arial", Font.PLAIN, 14)); lblMorning.setClockwise(false); lblMorning.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblMorning, CC.xy(3, 1)); //---- lblNoon ---- lblNoon.setForeground(new Color(255, 102, 0)); lblNoon.setText("Mittags"); lblNoon.setOrientation(1); lblNoon.setFont(new Font("Arial", Font.PLAIN, 14)); lblNoon.setClockwise(false); lblNoon.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblNoon, CC.xy(5, 1)); //---- lblAfternoon ---- lblAfternoon.setForeground(new Color(0, 153, 51)); lblAfternoon.setText("Nachmittag"); lblAfternoon.setOrientation(1); lblAfternoon.setFont(new Font("Arial", Font.PLAIN, 14)); lblAfternoon.setClockwise(false); lblAfternoon.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblAfternoon, CC.xy(7, 1)); //---- lblEvening ---- lblEvening.setForeground(new Color(255, 0, 51)); lblEvening.setText("Abends"); lblEvening.setOrientation(1); lblEvening.setFont(new Font("Arial", Font.PLAIN, 14)); lblEvening.setClockwise(false); lblEvening.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblEvening, CC.xy(9, 1)); //---- lblVeryLate ---- lblVeryLate.setText("Nacht, sp\u00e4t abends"); lblVeryLate.setOrientation(1); lblVeryLate.setFont(new Font("Arial", Font.PLAIN, 14)); lblVeryLate.setClockwise(false); lblVeryLate.setHorizontalTextPosition(SwingConstants.LEFT); pnlTageszeit.add(lblVeryLate, CC.xy(11, 1)); //---- txtVeryEarly ---- txtVeryEarly.setHorizontalAlignment(SwingConstants.RIGHT); txtVeryEarly.setText("0.0"); txtVeryEarly.setFont(new Font("Arial", Font.PLAIN, 14)); txtVeryEarly.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtVeryEarly.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtVeryEarly, CC.xy(1, 3)); //---- txtMorning ---- txtMorning.setHorizontalAlignment(SwingConstants.RIGHT); txtMorning.setText("1.0"); txtMorning.setFont(new Font("Arial", Font.PLAIN, 14)); txtMorning.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtMorning.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtMorning, CC.xy(3, 3)); //---- txtNoon ---- txtNoon.setHorizontalAlignment(SwingConstants.RIGHT); txtNoon.setText("0.0"); txtNoon.setFont(new Font("Arial", Font.PLAIN, 14)); txtNoon.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtNoon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtNoon, CC.xy(5, 3)); //---- txtAfternoon ---- txtAfternoon.setHorizontalAlignment(SwingConstants.RIGHT); txtAfternoon.setText("0.0"); txtAfternoon.setFont(new Font("Arial", Font.PLAIN, 14)); txtAfternoon.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtAfternoon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtAfternoon, CC.xy(7, 3)); //---- txtEvening ---- txtEvening.setHorizontalAlignment(SwingConstants.RIGHT); txtEvening.setText("0.0"); txtEvening.setFont(new Font("Arial", Font.PLAIN, 14)); txtEvening.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtEvening.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtEvening, CC.xy(9, 3)); //---- txtVeryLate ---- txtVeryLate.setHorizontalAlignment(SwingConstants.RIGHT); txtVeryLate.setText("0.0"); txtVeryLate.setFont(new Font("Arial", Font.PLAIN, 14)); txtVeryLate.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); txtVeryLate.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtActionPerformed(e); } }); pnlTageszeit.add(txtVeryLate, CC.xy(11, 3)); //---- btnToTime ---- btnToTime.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/clock.png"))); btnToTime.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnToTimeActionPerformed(e); } }); pnlTageszeit.add(btnToTime, CC.xy(13, 3)); } splitRegular.setLeftComponent(pnlTageszeit); //======== pnlUhrzeit ======== { pnlUhrzeit.setBorder(new EtchedBorder()); pnlUhrzeit.setLayout( new FormLayout("default, $ugap, 28dlu, $ugap, pref", "default:grow, $rgap, default")); //---- lblTimeDose ---- lblTimeDose.setText("Dosis zur Uhrzeit"); lblTimeDose.setOrientation(1); lblTimeDose.setFont(new Font("Arial", Font.PLAIN, 14)); lblTimeDose.setClockwise(false); lblTimeDose.setHorizontalTextPosition(SwingConstants.LEFT); pnlUhrzeit.add(lblTimeDose, CC.xy(3, 1, CC.DEFAULT, CC.BOTTOM)); //---- btnToTimeOfDay ---- btnToTimeOfDay .setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/1rightarrow.png"))); btnToTimeOfDay.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnToTimeOfDayActionPerformed(e); } }); pnlUhrzeit.add(btnToTimeOfDay, CC.xy(1, 3)); //---- txtTimeDose ---- txtTimeDose.setHorizontalAlignment(SwingConstants.RIGHT); txtTimeDose.setText("0.0"); txtTimeDose.setFont(new Font("Arial", Font.PLAIN, 14)); txtTimeDose.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtDoubleFocusLost(e); } }); pnlUhrzeit.add(txtTimeDose, CC.xy(3, 3)); //---- cmbUhrzeit ---- cmbUhrzeit.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbUhrzeitItemStateChanged(e); } }); pnlUhrzeit.add(cmbUhrzeit, CC.xy(5, 3)); } splitRegular.setRightComponent(pnlUhrzeit); } panelMain.add(splitRegular, CC.xy(3, 3)); //======== tabWdh ======== { //======== pnlDaily ======== { pnlDaily.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.setLayout(new FormLayout("2*(default), $rgap, $lcgap, 40dlu, $rgap, default", "default, $lgap, pref, $lgap, default")); //---- lblEvery1 ---- lblEvery1.setText("alle"); lblEvery1.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.add(lblEvery1, CC.xy(2, 3)); //---- txtEveryDay ---- txtEveryDay.setFont(new Font("Arial", Font.PLAIN, 14)); txtEveryDay.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtEveryDayFocusLost(e); } }); pnlDaily.add(txtEveryDay, CC.xy(5, 3)); //---- lblDays ---- lblDays.setText("Tage"); lblDays.setFont(new Font("Arial", Font.PLAIN, 14)); pnlDaily.add(lblDays, CC.xy(7, 3)); //---- btnEveryDay ---- btnEveryDay.setText("Jeden Tag"); btnEveryDay.setButtonStyle(3); btnEveryDay.setFont(new Font("Arial", Font.BOLD, 14)); btnEveryDay.setForeground(Color.blue); btnEveryDay.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedenTagActionPerformed(e); } }); pnlDaily.add(btnEveryDay, CC.xywh(2, 5, 6, 1)); } tabWdh.addTab("T\u00e4glich", pnlDaily); //======== pnlWeekly ======== { pnlWeekly.setFont(new Font("Arial", Font.PLAIN, 14)); pnlWeekly.setLayout(new FormLayout("default, 7*(13dlu), $lcgap, default:grow", "$ugap, $lgap, default, $lgap, pref, $lgap, default:grow, $lgap, $rgap")); //======== panel3 ======== { panel3.setLayout(new FormLayout("default, $rgap, 40dlu, $rgap, 2*(default)", "default:grow, $lgap, default")); //---- lblEvery2 ---- lblEvery2.setText("alle"); lblEvery2.setFont(new Font("Arial", Font.PLAIN, 14)); panel3.add(lblEvery2, CC.xy(1, 1)); //---- txtEveryWeek ---- txtEveryWeek.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtEveryWeekFocusLost(e); } }); panel3.add(txtEveryWeek, CC.xy(3, 1)); //---- lblWeeksAt ---- lblWeeksAt.setText("Wochen am"); lblWeeksAt.setFont(new Font("Arial", Font.PLAIN, 14)); panel3.add(lblWeeksAt, CC.xy(5, 1)); //---- btnEveryWeek ---- btnEveryWeek.setText("Jede Woche"); btnEveryWeek.setFont(new Font("Arial", Font.BOLD, 14)); btnEveryWeek.setButtonStyle(3); btnEveryWeek.setForeground(Color.blue); btnEveryWeek.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedeWocheActionPerformed(e); } }); panel3.add(btnEveryWeek, CC.xywh(1, 3, 5, 1)); } pnlWeekly.add(panel3, CC.xywh(2, 3, 9, 1)); //---- lblMon ---- lblMon.setText("montags"); lblMon.setOrientation(1); lblMon.setFont(new Font("Arial", Font.PLAIN, 14)); lblMon.setClockwise(false); lblMon.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblMon, CC.xy(2, 5, CC.CENTER, CC.BOTTOM)); //---- lblTue ---- lblTue.setText("dienstags"); lblTue.setOrientation(1); lblTue.setFont(new Font("Arial", Font.PLAIN, 14)); lblTue.setClockwise(false); lblTue.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblTue, CC.xy(3, 5, CC.CENTER, CC.BOTTOM)); //---- lblWed ---- lblWed.setText("mittwochs"); lblWed.setOrientation(1); lblWed.setFont(new Font("Arial", Font.PLAIN, 14)); lblWed.setClockwise(false); lblWed.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblWed, CC.xy(4, 5, CC.CENTER, CC.BOTTOM)); //---- lblThu ---- lblThu.setText("donnerstags"); lblThu.setOrientation(1); lblThu.setFont(new Font("Arial", Font.PLAIN, 14)); lblThu.setClockwise(false); lblThu.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblThu, CC.xy(5, 5, CC.CENTER, CC.BOTTOM)); //---- lblFri ---- lblFri.setText("freitags"); lblFri.setOrientation(1); lblFri.setFont(new Font("Arial", Font.PLAIN, 14)); lblFri.setClockwise(false); lblFri.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblFri, CC.xy(6, 5, CC.CENTER, CC.BOTTOM)); //---- lblSat ---- lblSat.setText("samstags"); lblSat.setOrientation(1); lblSat.setFont(new Font("Arial", Font.PLAIN, 14)); lblSat.setClockwise(false); lblSat.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblSat, CC.xy(7, 5, CC.CENTER, CC.BOTTOM)); //---- lblSun ---- lblSun.setText("sonntags"); lblSun.setOrientation(1); lblSun.setFont(new Font("Arial", Font.PLAIN, 14)); lblSun.setClockwise(false); lblSun.setHorizontalTextPosition(SwingConstants.LEFT); pnlWeekly.add(lblSun, CC.xy(8, 5, CC.CENTER, CC.BOTTOM)); //---- cbMon ---- cbMon.setBorder(BorderFactory.createEmptyBorder()); cbMon.setMargin(new Insets(0, 0, 0, 0)); cbMon.setSelected(true); cbMon.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbMonActionPerformed(e); } }); pnlWeekly.add(cbMon, CC.xy(2, 7, CC.CENTER, CC.DEFAULT)); //---- cbTue ---- cbTue.setBorder(BorderFactory.createEmptyBorder()); cbTue.setMargin(new Insets(0, 0, 0, 0)); cbTue.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbTueActionPerformed(e); } }); pnlWeekly.add(cbTue, CC.xy(3, 7, CC.CENTER, CC.DEFAULT)); //---- cbWed ---- cbWed.setBorder(BorderFactory.createEmptyBorder()); cbWed.setMargin(new Insets(0, 0, 0, 0)); cbWed.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbWedActionPerformed(e); } }); pnlWeekly.add(cbWed, CC.xy(4, 7, CC.CENTER, CC.DEFAULT)); //---- cbThu ---- cbThu.setBorder(BorderFactory.createEmptyBorder()); cbThu.setMargin(new Insets(0, 0, 0, 0)); cbThu.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbThuActionPerformed(e); } }); pnlWeekly.add(cbThu, CC.xy(5, 7, CC.CENTER, CC.DEFAULT)); //---- cbFri ---- cbFri.setBorder(BorderFactory.createEmptyBorder()); cbFri.setMargin(new Insets(0, 0, 0, 0)); cbFri.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbFriActionPerformed(e); } }); pnlWeekly.add(cbFri, CC.xy(6, 7, CC.CENTER, CC.DEFAULT)); //---- cbSat ---- cbSat.setBorder(BorderFactory.createEmptyBorder()); cbSat.setMargin(new Insets(0, 0, 0, 0)); cbSat.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbSatActionPerformed(e); } }); pnlWeekly.add(cbSat, CC.xy(7, 7, CC.CENTER, CC.DEFAULT)); //---- cbSun ---- cbSun.setBorder(BorderFactory.createEmptyBorder()); cbSun.setMargin(new Insets(0, 0, 0, 0)); cbSun.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cbSunActionPerformed(e); } }); pnlWeekly.add(cbSun, CC.xy(8, 7, CC.CENTER, CC.DEFAULT)); } tabWdh.addTab("W\u00f6chentlich", pnlWeekly); //======== pnlMonthly ======== { pnlMonthly.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.setLayout(new FormLayout( "default, $lcgap, pref, $lcgap, 40dlu, $lcgap, pref, $lcgap, 61dlu, $lcgap, default", "2*(default, $lgap), default")); //---- lblEach ---- lblEach.setText("jeden"); lblEach.setFont(new Font("Arial", Font.PLAIN, 14)); lblEach.setHorizontalAlignment(SwingConstants.TRAILING); pnlMonthly.add(lblEach, CC.xy(3, 3)); //---- txtEveryMonth ---- txtEveryMonth.setFont(new Font("Arial", Font.PLAIN, 14)); txtEveryMonth.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtEveryMonthFocusLost(e); } }); pnlMonthly.add(txtEveryMonth, CC.xy(5, 3)); //---- lblMonth ---- lblMonth.setText("Monat"); lblMonth.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.add(lblMonth, CC.xy(7, 3)); //---- btnEveryMonth ---- btnEveryMonth.setText("Jeden Monat"); btnEveryMonth.setFont(new Font("Arial", Font.BOLD, 14)); btnEveryMonth.setButtonStyle(3); btnEveryMonth.setForeground(Color.blue); btnEveryMonth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnJedenMonatActionPerformed(e); } }); pnlMonthly.add(btnEveryMonth, CC.xy(9, 3)); //---- lblOnThe ---- lblOnThe.setText("jeweils am"); lblOnThe.setFont(new Font("Arial", Font.PLAIN, 14)); lblOnThe.setHorizontalAlignment(SwingConstants.TRAILING); pnlMonthly.add(lblOnThe, CC.xy(3, 5)); //---- txtEveryWDayOfMonth ---- txtEveryWDayOfMonth.setFont(new Font("Arial", Font.PLAIN, 14)); txtEveryWDayOfMonth.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtEveryWDayOfMonthFocusLost(e); } }); pnlMonthly.add(txtEveryWDayOfMonth, CC.xy(5, 5)); //---- cmbWDay ---- cmbWDay.setFont(new Font("Arial", Font.PLAIN, 14)); pnlMonthly.add(cmbWDay, CC.xywh(7, 5, 3, 1)); } tabWdh.addTab("Monatlich", pnlMonthly); } panelMain.add(tabWdh, CC.xy(3, 5, CC.FILL, CC.FILL)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); //---- lblLDate ---- lblLDate.setText("Erst einplanen ab dem "); lblLDate.setFont(new Font("Arial", Font.PLAIN, 14)); panel2.add(lblLDate); //---- txtLDate ---- txtLDate.setFont(new Font("Arial", Font.PLAIN, 14)); txtLDate.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtLDateFocusLost(e); } }); panel2.add(txtLDate); } panelMain.add(panel2, CC.xy(3, 7)); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveActionPerformed(e); } }); panelMain.add(btnSave, CC.xy(3, 9, CC.RIGHT, CC.DEFAULT)); } add(panelMain, BorderLayout.CENTER); }
From source file:op.care.reports.PnlReport.java
private java.util.List<Component> addFilters() { java.util.List<Component> list = new ArrayList<Component>(); txtSearch = new JXSearchField(SYSTools.xx("misc.msg.searchphrase")); txtSearch.setInstantSearchDelay(100000); txtSearch.setFont(SYSConst.ARIAL14); txtSearch.addActionListener(new ActionListener() { @Override//from w ww. j a v a 2 s.c om public void actionPerformed(ActionEvent e) { if (SYSTools.catchNull(txtSearch.getText()).trim().length() >= 3) { SYSFilesTools.print(NReportTools.getNReportsAsHTML( NReportTools.getNReports4Search(resident, txtSearch.getText().trim()), true, SYSTools.xx("misc.msg.searchresults") + ": "" + txtSearch.getText().trim() + """, txtSearch.getText().trim()), false); } } }); list.add(txtSearch); tbShowReplaced = GUITools.getNiceToggleButton(SYSTools.xx("misc.filters.showreplaced")); tbShowReplaced.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent itemEvent) { if (initPhase) return; reloadDisplay(); } }); list.add(tbShowReplaced); tbShowReplaced.setHorizontalAlignment(SwingConstants.LEFT); // ArrayList<Commontags> listTags = listUsedCommonTags; if (!listUsedCommontags.isEmpty()) { JPanel pnlTags = new JPanel(); pnlTags.setLayout(new BoxLayout(pnlTags, BoxLayout.Y_AXIS)); pnlTags.setOpaque(false); for (final Commontags commontag : listUsedCommontags) { final JButton btnTag = GUITools.createHyperlinkButton(commontag.getText(), SYSConst.icon16tagPurple, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { SYSFilesTools.print(NReportTools.getNReportsAsHTML( NReportTools.getNReports4Tags(resident, commontag), true, null, null), false); } }); btnTag.setForeground(GUITools.getColor(commontag.getColor())); pnlTags.add(btnTag); } list.add(pnlTags); } return list; }
From source file:op.care.supervisor.PnlHandover.java
private List<Component> addFilters() { List<Component> list = new ArrayList<Component>(); Pair<DateTime, DateTime> minmax = NReportTools.getMinMax(); if (minmax != null) { final DefaultComboBoxModel yearModel = new DefaultComboBoxModel(); for (int year = new LocalDate().getYear(); year >= minmax.getFirst().getYear(); year--) { yearModel.addElement(year);//from w w w . j a v a 2 s . co m } JPanel innerPanel = new JPanel(); innerPanel.setOpaque(false); innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.PAGE_AXIS)); txtSearch = new JXSearchField(SYSTools.xx("misc.msg.searchphrase")); txtSearch.setInstantSearchDelay(100000); txtSearch.setFont(SYSConst.ARIAL14); txtSearch.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (SYSTools.catchNull(txtSearch.getText()).trim().length() > 3) { SYSFilesTools.print(NReportTools.getReportsAndHandoversAsHTML( NReportTools.getNReports4Handover((Homes) cmbHomes.getSelectedItem(), txtSearch.getText().trim(), Integer.parseInt(yearModel.getSelectedItem().toString())), txtSearch.getText().trim(), Integer.parseInt(yearModel.getSelectedItem().toString())), false); } } }); innerPanel.add(txtSearch); JButton btnSearchGeneralReports = GUITools .createHyperlinkButton("nursingrecords.handover.searchHandovers", null, null); btnSearchGeneralReports.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { List listHandovers = HandoversTools.getBy( Integer.parseInt(yearModel.getSelectedItem().toString()), (Homes) cmbHomes.getSelectedItem()); SYSFilesTools.print(NReportTools.getReportsAndHandoversAsHTML(listHandovers, "", Integer.parseInt(yearModel.getSelectedItem().toString())), false); } }); innerPanel.add(btnSearchGeneralReports); yearCombo = new JXComboBox(yearModel); yearCombo.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { txtSearch.postActionEvent(); } }); JPanel myPanel = new JPanel(); myPanel.setOpaque(false); myPanel.setLayout(new BoxLayout(myPanel, BoxLayout.LINE_AXIS)); myPanel.add(innerPanel); myPanel.add(yearCombo); list.add(myPanel); } cmbHomes = new JComboBox(); cmbHomes.setFont(SYSConst.ARIAL14); HomesTools.setComboBox(cmbHomes); cmbHomes.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent itemEvent) { if (itemEvent.getStateChange() != ItemEvent.SELECTED) return; reloadDisplay(); } }); list.add(cmbHomes); tbResidentFirst = GUITools.getNiceToggleButton("nursingrecords.handover.residentFirst"); SYSPropsTools.restoreState("nursingrecords.handover.tbResidentFirst", tbResidentFirst); tbResidentFirst.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { SYSPropsTools.storeState("nursingrecords.handover.tbResidentFirst", tbResidentFirst); reload(); } }); tbResidentFirst.setHorizontalAlignment(SwingConstants.LEFT); list.add(tbResidentFirst); return list; }
From source file:op.controlling.PnlControlling.java
private void initComponents() { tabMain = new JideTabbedPane(); scrollPane1 = new JScrollPane(); cpsControlling = new CollapsiblePanes(); panel2 = new JPanel(); //======== this ======== setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); //======== tabMain ======== {/*from ww w .j ava2 s .c o m*/ tabMain.setBoldActiveTab(true); tabMain.setFont(new Font("Arial", Font.PLAIN, 16)); tabMain.setShowTabButtons(true); tabMain.setTabPlacement(SwingConstants.LEFT); tabMain.setHideOneTab(true); tabMain.addChangeListener(e -> tabMainStateChanged(e)); //======== scrollPane1 ======== { //======== cpsControlling ======== { cpsControlling.setLayout(new BoxLayout(cpsControlling, BoxLayout.X_AXIS)); } scrollPane1.setViewportView(cpsControlling); } tabMain.addTab("controlling", scrollPane1); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); } tabMain.addTab("text", panel2); } add(tabMain); }
From source file:op.controlling.PnlControlling.java
private java.util.List<Component> addFilters() { java.util.List<Component> list = new ArrayList<Component>(); if (tabMain.getSelectedIndex() == TAB_QMSPLAN) { final JToggleButton tbClosedOnes2 = GUITools .getNiceToggleButton(SYSTools.xx("misc.filters.showclosed")); ArrayList<Commontags> listTags = CommontagsTools.getAllUsedInQMSPlans(true); if (!listTags.isEmpty()) { JPanel pnlTags = new JPanel(); pnlTags.setLayout(new BoxLayout(pnlTags, BoxLayout.PAGE_AXIS)); pnlTags.setOpaque(false);/*from w ww .j a v a 2 s. c o m*/ final JButton btnReset = GUITools.createHyperlinkButton("misc.commands.resetFilter", SYSConst.icon16tagPurpleDelete4, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // init = true; // tbClosedOnes2.setSelected(false); // init = false; // pnlQMSPlan.reload(); // // pnlQMSPlan.cleanup(); // pnlQMSPlan = new PnlQMSPlan(null); // tabMain.setComponentAt(TAB_QMSPLAN, pnlQMSPlan); filterTag = null; tbClosedOnes2.setSelected(false); } }); pnlTags.add(btnReset, RiverLayout.LEFT); for (final Commontags commontag : listTags) { final JButton btnTag = GUITools.createHyperlinkButton(commontag.getText(), SYSConst.icon16tagPurple, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // init = true; // tbClosedOnes2.setSelected(true); // init = false; // // pnlQMSPlan.cleanup(); // pnlQMSPlan = new PnlQMSPlan(null); // tabMain.setComponentAt(TAB_QMSPLAN, pnlQMSPlan); // //TODO: mark the filter when it is used. maybe a yellow background filterTag = commontag; tbClosedOnes2.setSelected(true); } }); pnlTags.add(btnTag); } list.add(pnlTags); } tbClosedOnes2.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent itemEvent) { // if (init) return; pnlQMSPlan.reload(filterTag, itemEvent.getStateChange() == ItemEvent.SELECTED); } }); list.add(tbClosedOnes2); tbClosedOnes2.setHorizontalAlignment(SwingConstants.LEFT); } return list; }