ENHANCED JAVA POS TO HAVE COLORED BUTTONS Please see http://www.adempiere.com/wiki/index.php/Image:JavaPOS.png

corrected some other typos
This commit is contained in:
Redhuan D. Oon 2008-12-06 11:25:18 +00:00
parent 68659e821f
commit ac10f352f6
3 changed files with 9 additions and 9 deletions

View File

@ -339,13 +339,11 @@ public class PosPanel extends CPanel
*/ */
public void openQuery (CPanel panel) public void openQuery (CPanel panel)
{ {
if (panel.equals(f_cashfunctions))
{
f_bpartner.setVisible(false); f_bpartner.setVisible(false);
f_salesRep.setVisible(false); f_salesRep.setVisible(false);
f_curLine.setVisible(false); f_curLine.setVisible(false);
f_product.setVisible(false); f_product.setVisible(false);
}
f_checkout.setVisible(false); f_checkout.setVisible(false);
// f_basicKeys.setVisible(false); removed by ConSerTi upon not appreciating its functionality // f_basicKeys.setVisible(false); removed by ConSerTi upon not appreciating its functionality
f_lines.setVisible(false); f_lines.setVisible(false);
@ -386,7 +384,7 @@ public class PosPanel extends CPanel
*/ */
public void newOrder() public void newOrder()
{ {
log.info( "PosPabel.newOrder"); log.info( "PosPanel.newOrder");
f_bpartner.setC_BPartner_ID(0); f_bpartner.setC_BPartner_ID(0);
f_curLine.newOrder(); f_curLine.newOrder();
f_curLine.newLine(); f_curLine.newLine();

View File

@ -265,7 +265,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
} }
else else
{ {
p_posPanel.f_status.setStatusLine("Order not fully pay."); p_posPanel.f_status.setStatusLine("Order not fully paid.");
} }
} }
// Cash (Payment) // Cash (Payment)

View File

@ -77,24 +77,26 @@ public class SubFunctionKeys extends PosSubPanel implements ActionListener
CPanel content = new CPanel (new GridLayout(Math.max(rows, 3), Math.max(cols, 3))); CPanel content = new CPanel (new GridLayout(Math.max(rows, 3), Math.max(cols, 3)));
for (int i = 0; i < m_keys.length; i++) for (int i = 0; i < m_keys.length; i++)
{ {
Color keyColor = null;
MPOSKey key = m_keys[i]; MPOSKey key = m_keys[i];
StringBuffer buttonHTML = new StringBuffer("<html><p>"); StringBuffer buttonHTML = new StringBuffer("<html><p>");
if (key.getAD_PrintColor_ID() != 0) if (key.getAD_PrintColor_ID() != 0)
{ {
MPrintColor color = MPrintColor.get(Env.getCtx(), key.getAD_PrintColor_ID()); MPrintColor color = MPrintColor.get(Env.getCtx(), key.getAD_PrintColor_ID());
keyColor = color.getColor();
buttonHTML buttonHTML
.append("<font color=#") .append("<table")
.append(color.getRRGGBB())
.append(">") .append(">")
.append(key.getName()) .append(key.getName())
.append("</font>"); .append("</table>");
} }
else else
buttonHTML.append(key.getName()); buttonHTML.append(key.getName());
buttonHTML.append("</p></html>"); buttonHTML.append("</p></html>");
log.fine( "#" + i + " - " + buttonHTML); log.fine( "#" + i + " - " + keyColor);
CButton button = new CButton(buttonHTML.toString()); CButton button = new CButton(buttonHTML.toString());
button.setMargin(INSETS1); button.setMargin(INSETS1);
button.setBackground(keyColor);
button.setFocusable(false); button.setFocusable(false);
button.setActionCommand(String.valueOf(key.getC_POSKey_ID())); button.setActionCommand(String.valueOf(key.getC_POSKey_ID()));
button.addActionListener(this); button.addActionListener(this);