Search in sources :

Example 26 with MigLayout

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();
        }
    });
}
Also used : CLabel(org.compiere.swing.CLabel) POSTextField(org.adempiere.pos.POSTextField) MigLayout(net.miginfocom.swing.MigLayout) TitledBorder(javax.swing.border.TitledBorder)

Example 27 with MigLayout

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();
}
Also used : CLabel(org.compiere.swing.CLabel) POSTextField(org.adempiere.pos.POSTextField) MigLayout(net.miginfocom.swing.MigLayout) VDate(org.compiere.grid.ed.VDate) CCheckBox(org.compiere.swing.CCheckBox) TitledBorder(javax.swing.border.TitledBorder)

Example 28 with MigLayout

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();
}
Also used : ConfirmPanel(org.compiere.apps.ConfirmPanel) MigLayout(net.miginfocom.swing.MigLayout) CPanel(org.compiere.swing.CPanel) Dimension(java.awt.Dimension)

Example 29 with MigLayout

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();
}
Also used : CLabel(org.compiere.swing.CLabel) AppsAction(org.compiere.apps.AppsAction) MigLayout(net.miginfocom.swing.MigLayout) CPanel(org.compiere.swing.CPanel)

Aggregations

MigLayout (net.miginfocom.swing.MigLayout)29 JPanel (javax.swing.JPanel)7 ArrayList (java.util.ArrayList)5 CLabel (org.compiere.swing.CLabel)5 Column (org.gephi.graph.api.Column)5 CPanel (org.compiere.swing.CPanel)4 Comparator (java.util.Comparator)3 TitledBorder (javax.swing.border.TitledBorder)3 POSTextField (org.adempiere.pos.POSTextField)3 Dimension (java.awt.Dimension)2 JCheckBox (javax.swing.JCheckBox)2 ActionButton (com.intellij.openapi.actionSystem.impl.ActionButton)1 ValidationInfo (com.intellij.openapi.ui.ValidationInfo)1 ListPopup (com.intellij.openapi.ui.popup.ListPopup)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 JBCheckBox (com.intellij.ui.components.JBCheckBox)1 JBLabel (com.intellij.ui.components.JBLabel)1 JBScrollPane (com.intellij.ui.components.JBScrollPane)1 Wrapper (com.intellij.ui.components.panels.Wrapper)1