diff --git a/client/src/org/compiere/pos/PosPanel.java b/client/src/org/compiere/pos/PosPanel.java index e12e7eacc7..a4332d286c 100644 --- a/client/src/org/compiere/pos/PosPanel.java +++ b/client/src/org/compiere/pos/PosPanel.java @@ -120,7 +120,7 @@ public class PosPanel extends CPanel } frame.getContentPane().add(this, BorderLayout.CENTER); frame.getContentPane().add(f_status, BorderLayout.SOUTH); - // this.setPreferredSize(new Dimension (800-20,600-20)); + this.setPreferredSize(new Dimension (800-20,500-20)); } catch(Exception e) { diff --git a/client/src/org/compiere/pos/SubCheckout.java b/client/src/org/compiere/pos/SubCheckout.java index 6469f38f78..1040103d6b 100644 --- a/client/src/org/compiere/pos/SubCheckout.java +++ b/client/src/org/compiere/pos/SubCheckout.java @@ -85,74 +85,68 @@ public class SubCheckout extends PosSubPanel implements ActionListener GridBagConstraints gbc = new GridBagConstraints(); gbc.insets = INSETS2; - // -- 0 + // BOX 1 - CASH gbc.gridx = 0; - f_register = createButtonAction("Register", null); - gbc.gridy = 0; - add (f_register, gbc); - // - f_summary = createButtonAction("Summary", null); - gbc.gridy = 1; - gbc.gridheight = 1; - add (f_summary, gbc); - // - f_process = createButtonAction("Process", null); - gbc.gridy = 2; - gbc.gridheight = 1; - add (f_process, gbc); - // - f_print = createButtonAction("Print", null); - gbc.gridy = 3; - gbc.gridheight =1; - add (f_print, gbc); - - // -- 1 -- Cash - gbc.gridx = 1; gbc.gridheight = 2; gbc.fill = GridBagConstraints.BOTH; gbc.weightx = .1; CPanel cash = new CPanel(new GridBagLayout()); cash.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Cash"))); - gbc.gridy = 1; + gbc.gridy = 0; add (cash, gbc); GridBagConstraints gbc0 = new GridBagConstraints(); gbc0.insets = INSETS2; - gbc0.anchor = GridBagConstraints.WEST; +// gbc0.anchor = GridBagConstraints.EAST; // f_lcashGiven = new CLabel(Msg.getMsg(Env.getCtx(),"CashGiven")); cash.add (f_lcashGiven, gbc0); - f_cashGiven = new VNumber("CashGiven", false, false, true, DisplayType.Amount, - Msg.translate(Env.getCtx(), "CashGiven")); - f_cashGiven.setColumns(10, 25); + f_cashGiven = new VNumber("CashGiven", false, false, true, DisplayType.Amount, Msg.translate(Env.getCtx(), "CashGiven")); + f_cashGiven.setColumns(14, 25); cash.add (f_cashGiven, gbc0); f_cashGiven.setValue(Env.ZERO); - f_cashGiven.addActionListener(this); //para que actualice el cambio con el dinero entregado + f_cashGiven.addActionListener(this); //to update the change with the money // f_lcashReturn = new CLabel(Msg.getMsg(Env.getCtx(),"CashReturn")); cash.add (f_lcashReturn, gbc0); - f_cashReturn = new VNumber("CashReturn", false, true, false, DisplayType.Amount, - "CashReturn"); + f_cashReturn = new VNumber("CashReturn", false, true, false, DisplayType.Amount, "CashReturn"); f_cashReturn.setColumns(10, 25); cash.add (f_cashReturn, gbc0); f_cashReturn.setValue(Env.ZERO); f_cashPayment = createButtonAction("Payment", null); f_cashPayment.setActionCommand("Cash"); - gbc0.anchor = GridBagConstraints.EAST; gbc0.weightx = 0.1; cash.add (f_cashPayment, gbc0); - - gbc.gridx=1; - gbc.gridy=3; - gbc.gridheight=1; - CPanel caja = new CPanel(); - add(caja,gbc); - caja.setPreferredSize(new Dimension(30,30)); + + // BOX 2 - UTILS + CPanel utils = new CPanel(new GridBagLayout()); + utils.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Utils"))); + gbc.gridx = 0; + gbc.gridy = 2; + gbc.weightx = .1; + add (utils, gbc); + GridBagConstraints gbcU = new GridBagConstraints(); + gbcU.insets = INSETS2; + gbcU.anchor = GridBagConstraints.EAST; + //CASH FUNCTIONS f_cashRegisterFunctions = createButtonAction("CashRegisterFunction", null); - f_cashRegisterFunctions.setText("Cash Drawer\n Movements"); - f_cashRegisterFunctions.setPreferredSize(new Dimension(160,30)); - f_cashRegisterFunctions.setMaximumSize(new Dimension(160,30)); - f_cashRegisterFunctions.setMinimumSize(new Dimension(160,30)); - caja.add(f_cashRegisterFunctions); + f_cashRegisterFunctions.setText("Cash Functions"); + f_cashRegisterFunctions.setPreferredSize(new Dimension(130,37)); + f_cashRegisterFunctions.setMaximumSize(new Dimension(130,37)); + f_cashRegisterFunctions.setMinimumSize(new Dimension(130,37)); + utils.add(f_cashRegisterFunctions, gbcU); + //REGISTER + f_register = createButtonAction("Register", null); + utils.add (f_register, gbcU); + //SUMMARY + f_summary = createButtonAction("Summary", null); + utils.add (f_summary, gbcU); + //PROCESS + f_process = createButtonAction("Process", null); + utils.add (f_process, gbcU); + //PRINT + f_print = createButtonAction("Print", null); + utils.add (f_print, gbcU); + diff --git a/client/src/org/compiere/pos/SubFunctionKeys.java b/client/src/org/compiere/pos/SubFunctionKeys.java index 0b25eb2268..fa5fe5c4fc 100644 --- a/client/src/org/compiere/pos/SubFunctionKeys.java +++ b/client/src/org/compiere/pos/SubFunctionKeys.java @@ -66,7 +66,7 @@ public class SubFunctionKeys extends PosSubPanel implements ActionListener return; int COLUMNS = 4; // Min Columns - int ROWS = 5; // Min Rows + int ROWS = 6; // Min Rows m_keys = fKeys.getKeys(false); int noKeys = m_keys.length; int rows = Math.max (((noKeys-1) / COLUMNS) + 1, ROWS); @@ -106,7 +106,7 @@ public class SubFunctionKeys extends PosSubPanel implements ActionListener button.setFocusable(false); content.add (button); } - content.setPreferredSize(new Dimension(cols*150, rows*50)); + content.setPreferredSize(new Dimension(cols*180, rows*50)); add (content); } // init @@ -118,7 +118,8 @@ public class SubFunctionKeys extends PosSubPanel implements ActionListener GridBagConstraints gbc = super.getGridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; - gbc.gridheight = 2; //added by ConSerTi so that the panel takes up more space + gbc.gridheight = 3; //added by ConSerTi so that the panel takes up more space +// gbc.fill = GridBagConstraints.HORIZONTAL; return gbc; } // getGridBagConstraints diff --git a/client/src/org/compiere/pos/SubLines.java b/client/src/org/compiere/pos/SubLines.java index 9172bb94bb..8e924ee294 100644 --- a/client/src/org/compiere/pos/SubLines.java +++ b/client/src/org/compiere/pos/SubLines.java @@ -122,7 +122,7 @@ public class SubLines extends PosSubPanel implements ActionListener m_table.setMultiSelection(false); // m_table.addMouseListener(this); // m_table.getSelectionModel().addListSelectionListener(this); - scroll.setPreferredSize(new Dimension(100,100)); + scroll.setPreferredSize(new Dimension(100,120)); add (scroll, BorderLayout.CENTER); // Right side @@ -149,7 +149,7 @@ public class SubLines extends PosSubPanel implements ActionListener CLabel lNet = new CLabel (Msg.translate(Env.getCtx(), "TotalLines")); summary.add(lNet); f_net = new VNumber("TotalLines", false, true, false, DisplayType.Amount, "TotalLines"); - f_net.setColumns(6, 22); + f_net.setColumns(11, 22); lNet.setLabelFor(f_net); summary.add(f_net); f_net.setValue (Env.ZERO); @@ -165,7 +165,7 @@ public class SubLines extends PosSubPanel implements ActionListener CLabel lTotal = new CLabel (Msg.translate(Env.getCtx(), "GrandTotal")); summary.add(lTotal); f_total = new VNumber("GrandTotal", false, true, false, DisplayType.Amount, "GrandTotal"); - f_total.setColumns(6, 22); + f_total.setColumns(11, 22); lTotal.setLabelFor(f_total); summary.add(f_total); f_total.setValue (Env.ZERO);