Search in sources :

Example 6 with ALayout

use of org.compiere.apps.ALayout in project adempiere by adempiere.

the class InfoInOut method statInit.

/**
	 *	Static Setup - add fields to parameterPanel
	 */
private void statInit() {
    lDocumentNo.setLabelFor(fDocumentNo);
    fDocumentNo.setBackground(AdempierePLAF.getInfoBackground());
    fDocumentNo.addActionListener(this);
    lDescription.setLabelFor(fDescription);
    fDescription.setBackground(AdempierePLAF.getInfoBackground());
    fDescription.addActionListener(this);
    lPOReference.setLabelFor(fPOReference);
    fPOReference.setBackground(AdempierePLAF.getInfoBackground());
    fPOReference.addActionListener(this);
    fIsSOTrx.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx")));
    fIsSOTrx.addActionListener(this);
    //
    fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.COLUMNNAME_C_BPartner_ID), DisplayType.Search));
    lBPartner_ID.setLabelFor(fBPartner_ID);
    fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());
    fBPartner_ID.addActionListener(this);
    //
    fShipper_ID = new VLookup("M_Shipper_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.COLUMNNAME_M_Shipper_ID), DisplayType.TableDir));
    lShipper_ID.setLabelFor(fShipper_ID);
    fShipper_ID.setBackground(AdempierePLAF.getInfoBackground());
    fShipper_ID.addActionListener(this);
    //
    lDateFrom.setLabelFor(fDateFrom);
    fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
    fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
    fDateFrom.addActionListener(this);
    lDateTo.setLabelFor(fDateTo);
    fDateTo.setBackground(AdempierePLAF.getInfoBackground());
    fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
    fDateTo.addActionListener(this);
    //
    CPanel datePanel = new CPanel();
    datePanel.setLayout(new ALayout(0, 0, true));
    datePanel.add(fDateFrom, new ALayoutConstraint(0, 0));
    datePanel.add(lDateTo, null);
    datePanel.add(fDateTo, null);
    //  First Row
    p_criteriaGrid.add(lDocumentNo, new ALayoutConstraint(0, 0));
    p_criteriaGrid.add(fDocumentNo, null);
    p_criteriaGrid.add(lBPartner_ID, null);
    p_criteriaGrid.add(fBPartner_ID, null);
    p_criteriaGrid.add(fIsSOTrx, new ALayoutConstraint(0, 5));
    //  2nd Row
    p_criteriaGrid.add(lDescription, new ALayoutConstraint(1, 0));
    p_criteriaGrid.add(fDescription, null);
    p_criteriaGrid.add(lDateFrom, null);
    p_criteriaGrid.add(datePanel, null);
    //  3rd Row
    p_criteriaGrid.add(lPOReference, new ALayoutConstraint(2, 0));
    p_criteriaGrid.add(fPOReference, null);
    p_criteriaGrid.add(lShipper_ID, null);
    p_criteriaGrid.add(fShipper_ID, null);
}
Also used : VLookup(org.compiere.grid.ed.VLookup) CPanel(org.compiere.swing.CPanel) ALayoutConstraint(org.compiere.apps.ALayoutConstraint) ALayout(org.compiere.apps.ALayout)

Example 7 with ALayout

use of org.compiere.apps.ALayout in project adempiere by adempiere.

the class InfoAssignment method statInit.

//private CButton bNew = new CButton();
/**
	 *	Static Setup - add fields to parameterPanel.
	 *  <pre>
	 * 		ResourceType	Resource	DateTimeFrom	DateTimeTo	New
	 *  </pre>
	 */
private void statInit() {
    fieldResourceType = new VLookup("S_ResourceType_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MResourceType.Table_Name, MResourceType.COLUMNNAME_S_ResourceType_ID), DisplayType.TableDir));
    fieldResourceType.addActionListener(this);
    fieldResource = new VLookup("S_Resource_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MResource.Table_Name, MResource.COLUMNNAME_S_Resource_ID), DisplayType.TableDir));
    fieldResource.addActionListener(this);
    //
    fieldFrom.addActionListener(this);
    fieldTo.addActionListener(this);
    //
    p_criteriaGrid.setLayout(new ALayout());
    p_criteriaGrid.add(labelResourceType, new ALayoutConstraint(0, 0));
    p_criteriaGrid.add(fieldResourceType, null);
    p_criteriaGrid.add(labelResource, null);
    p_criteriaGrid.add(fieldResource, null);
    //
    p_criteriaGrid.add(labelFrom, new ALayoutConstraint(1, 0));
    p_criteriaGrid.add(fieldFrom, null);
    p_criteriaGrid.add(labelTo, null);
    p_criteriaGrid.add(fieldTo, null);
//parameterPanel.add(bNew, null);
}
Also used : VLookup(org.compiere.grid.ed.VLookup) ALayoutConstraint(org.compiere.apps.ALayoutConstraint) ALayout(org.compiere.apps.ALayout)

Example 8 with ALayout

use of org.compiere.apps.ALayout in project adempiere by adempiere.

the class VBOMDrop method createMainPanel.

//	getInvoices
/**************************************************************************
	 * 	Create Main Panel.
	 * 	Called when changing Product
	 */
private void createMainPanel() {
    log.config(": " + m_product);
    this.removeAll();
    this.setPreferredSize(null);
    this.invalidate();
    this.setBorder(null);
    //
    m_selectionList.clear();
    m_productList.clear();
    m_qtyList.clear();
    m_buttonGroups.clear();
    //
    this.setLayout(new ALayout());
    String title = Msg.getMsg(Env.getCtx(), "SelectProduct");
    if (m_product != null && m_product.get_ID() > 0) {
        title = m_product.getName();
        if (m_product.getDescription() != null && m_product.getDescription().length() > 0)
            this.setToolTipText(m_product.getDescription());
        m_bomLine = 0;
        addBOMLines(m_product, m_qty);
    }
    this.setBorder(new TitledBorder(title));
}
Also used : TitledBorder(javax.swing.border.TitledBorder) ALayout(org.compiere.apps.ALayout)

Example 9 with ALayout

use of org.compiere.apps.ALayout in project adempiere by adempiere.

the class VBrowserSearch method initComponents.

/**
	 * Initialize components
	 */
@Override
public void initComponents() {
    if (mainPanel != null)
        return;
    //	
    mainLayout = new BorderLayout();
    centerPanel = new CPanel();
    mainPanel = new CPanel();
    m_separators = new ArrayList<CLabel>();
    //	
    mainPanel.setLayout(mainLayout);
    mainPanel.add(centerPanel, BorderLayout.CENTER);
    //	
    centerLayout = new ALayout();
    centerPanel.setLayout(centerLayout);
}
Also used : CLabel(org.compiere.swing.CLabel) BorderLayout(java.awt.BorderLayout) CPanel(org.compiere.swing.CPanel) ALayout(org.compiere.apps.ALayout)

Example 10 with ALayout

use of org.compiere.apps.ALayout in project adempiere by adempiere.

the class VProductConfigurationBOM method createMainPanel.

//	getInvoices
/**************************************************************************
	 * 	Create Main Panel.
	 * 	Called when changing Product
	 */
private void createMainPanel() {
    log.config(": " + m_product);
    this.removeAll();
    this.setPreferredSize(null);
    this.invalidate();
    this.setBorder(null);
    //
    m_selectionList.clear();
    m_productList.clear();
    m_bomLineIDList.clear();
    m_qtyList.clear();
    m_buttonGroups.clear();
    //
    this.setLayout(new ALayout());
    String title = Msg.getMsg(Env.getCtx(), "SelectProduct");
    if (m_product != null && m_product.get_ID() > 0) {
        title = m_product.getName();
        if (m_product.getDescription() != null && m_product.getDescription().length() > 0)
            this.setToolTipText(m_product.getDescription());
        m_bomLine = 0;
        m_tree = new CheckboxTree(this.m_RadioButtonTreeCellRenderer.action_loadBOM(m_product, true));
        m_tree.getCheckingModel().setCheckingMode(it.cnr.imaa.essi.lablib.gui.checkboxtree.TreeCheckingModel.CheckingMode.SIMPLE);
        m_tree.getCheckingModel().clearChecking();
        m_tree.setCellRenderer(this.m_RadioButtonTreeCellRenderer);
        m_tree.setScrollsOnExpand(true);
        JScrollPane treeView = new JScrollPane(m_tree);
        this.add(treeView);
    } else {
        DefaultMutableTreeNode nodeHolder = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "No Product Chosen"));
        m_tree = new CheckboxTree(nodeHolder);
        JScrollPane treeView = new JScrollPane(m_tree);
        this.add(treeView);
    }
    this.setBorder(new TitledBorder(title));
}
Also used : JScrollPane(javax.swing.JScrollPane) DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) CheckboxTree(it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTree) TitledBorder(javax.swing.border.TitledBorder) ALayout(org.compiere.apps.ALayout)

Aggregations

ALayout (org.compiere.apps.ALayout)15 ALayoutConstraint (org.compiere.apps.ALayoutConstraint)10 CPanel (org.compiere.swing.CPanel)8 VLookup (org.compiere.grid.ed.VLookup)7 BorderLayout (java.awt.BorderLayout)4 Dimension (java.awt.Dimension)4 FlowLayout (java.awt.FlowLayout)2 JScrollPane (javax.swing.JScrollPane)2 TitledBorder (javax.swing.border.TitledBorder)2 CheckboxTree (it.cnr.imaa.essi.lablib.gui.checkboxtree.CheckboxTree)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 ImageIcon (javax.swing.ImageIcon)1 JButton (javax.swing.JButton)1 ListSelectionModel (javax.swing.ListSelectionModel)1 ColorUIResource (javax.swing.plaf.ColorUIResource)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1 AdempiereTaskPaneUI (org.adempiere.plaf.AdempiereTaskPaneUI)1 AppsAction (org.compiere.apps.AppsAction)1 MLookup (org.compiere.model.MLookup)1