use of net.miginfocom.swing.MigLayout in project adempiere by adempiere.
the class QueryDocType method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_DocType_ID"));
// North
parameterPanel.setLayout(new MigLayout("fill", "", "[50][50][]"));
parameterPanel.setBorder(new TitledBorder(Msg.getMsg(ctx, "Query")));
//
CLabel lname = new CLabel(Msg.translate(ctx, "Name"));
parameterPanel.add(lname, " growy");
f_Name = new POSTextField("", posPanel.getKeyboard());
lname.setLabelFor(f_Name);
parameterPanel.add(f_Name, "h 30, w 200");
f_Name.addActionListener(this);
CLabel ldescription = new CLabel(Msg.translate(ctx, "Description"));
parameterPanel.add(ldescription, " growy");
f_Description = new POSTextField("", posPanel.getKeyboard());
lname.setLabelFor(f_Description);
parameterPanel.add(f_Description, "h 30, w 200");
f_Description.addActionListener(this);
// Center
posTable.prepareTable(s_layout, s_sqlFrom, s_sqlWhere, false, "C_DocType");
//
posTable.growScrollbars();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
f_Name.requestFocus();
}
});
}
use of net.miginfocom.swing.MigLayout in project adempiere by adempiere.
the class QueryOrderHistory method init.
/**
* Set up Panel
*/
@Override
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_Order_ID"));
// North
parameterPanel.setLayout(new MigLayout("fill", "", "[50][50][]"));
parameterPanel.setBorder(new TitledBorder(Msg.getMsg(ctx, QUERY)));
CLabel labelDocument = new CLabel(Msg.translate(ctx, DOCUMENTNO));
parameterPanel.add(labelDocument, " growy");
fieldDocumentNo = new POSTextField("", posPanel.getKeyboard());
labelDocument.setLabelFor(fieldDocumentNo);
parameterPanel.add(fieldDocumentNo, "h 30, w 200");
fieldDocumentNo.addActionListener(this);
//
CLabel labelDateFrom = new CLabel(Msg.translate(ctx, DATEORDEREDFROM));
parameterPanel.add(labelDateFrom, "growy");
fieldDateFrom = new VDate();
fieldDateFrom.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
labelDateFrom.setLabelFor(fieldDateFrom);
parameterPanel.add(fieldDateFrom, "h 30, w 200");
fieldDateFrom.addVetoableChangeListener(this);
fieldAllowDate = new CCheckBox(Msg.translate(ctx, DATE));
fieldAllowDate.setSelected(false);
fieldAllowDate.addActionListener(this);
parameterPanel.add(fieldAllowDate, "wrap");
//
posTable.prepareTable(columnInfos, "C_Order", "C_POS_ID = " + posPanel.getC_POS_ID(), false, "C_Order");
posTable.growScrollbars();
// BPartner
CLabel labelBPartner = new CLabel(Msg.translate(ctx, BPARTNERID));
parameterPanel.add(labelBPartner, "growy");
fieldBPartner = new POSTextField("", posPanel.getKeyboard());
labelBPartner.setLabelFor(fieldBPartner);
parameterPanel.add(fieldBPartner, "h 30, w 200");
fieldBPartner.addActionListener(this);
// Date To
CLabel labelDateTo = new CLabel(Msg.translate(ctx, DATEORDEREDTO));
parameterPanel.add(labelDateTo, "growy");
fieldDateTo = new VDate();
fieldDateTo.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
labelDateTo.setLabelFor(fieldDateTo);
parameterPanel.add(fieldDateTo, "h 30, w 200");
fieldDateTo.addVetoableChangeListener(this);
fieldProcessed = new CCheckBox(Msg.translate(ctx, PROCESSED));
fieldProcessed.setSelected(false);
fieldProcessed.addActionListener(this);
parameterPanel.add(fieldProcessed, "");
SwingUtilities.invokeLater(new Runnable() {
public void run() {
fieldDocumentNo.requestFocus();
}
});
pack();
refresh();
}
use of net.miginfocom.swing.MigLayout in project adempiere by adempiere.
the class POSKeyboard method init.
/**
* Initialize
* @param startText
* @param POSKeyLayout_ID
*/
public void init(int POSKeyLayout_ID) {
CPanel panel = new CPanel();
getContentPane().add(panel);
// Content
panel.setLayout(new MigLayout("fill"));
if (m_Keylayout.getPOSKeyLayoutType() != null && m_Keylayout.getPOSKeyLayoutType().equals(MPOSKeyLayout.POSKEYLAYOUTTYPE_Numberpad))
m_Text.setHorizontalAlignment(JTextField.TRAILING);
// Add Listener
m_Text.addKeyListener(this);
m_Text.addFocusListener(this);
m_Text.setFocusable(true);
//
panel.add(m_Text, "north, growx, h 30!, wrap, gap 10 10 10 10");
//
POSKeyPanel keys = new POSKeyPanel(POSKeyLayout_ID, this);
keys.setFocusable(false);
//
panel.add(keys, "center, growx, growy");
ConfirmPanel confirm = new ConfirmPanel(true, false, true, false, false, false, false);
confirm.addActionListener(this);
Dimension buttonDim = new Dimension(50, 50);
confirm.getResetButton().setPreferredSize(buttonDim);
confirm.getOKButton().setPreferredSize(buttonDim);
confirm.getCancelButton().setPreferredSize(buttonDim);
panel.add(confirm, "south");
pack();
}
use of net.miginfocom.swing.MigLayout in project adempiere by adempiere.
the class POSLogin method init.
private void init() {
CPanel panel = new CPanel();
panel.setLayout(new MigLayout());
getContentPane().add(panel);
panel.add(new CLabel(Msg.translate(posPanel.getCtx(), "SalesRep_ID")));
username = new POSTextField(Msg.translate(posPanel.getCtx(), "SalesRep_ID"), posPanel.getKeyboard());
panel.add(username, "wrap");
panel.add(new CLabel(Msg.translate(posPanel.getCtx(), "UserPIN")));
pin = new POSTextField(Msg.translate(posPanel.getCtx(), "UserPIN"), posPanel.getKeyboard());
panel.add(pin, "");
AppsAction act = new AppsAction("Ok", KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), false);
act.setDelegate(this);
bProcess = (CButton) act.getButton();
bProcess.setFocusable(false);
panel.add(bProcess, "h 50!, w 50!");
pack();
}
Aggregations