Search in sources :

Example 61 with FlowLayout

use of java.awt.FlowLayout in project adempiere by adempiere.

the class ProcessPanel method initComponents.

@Override
public void initComponents() {
    mainLayout = new BorderLayout();
    centerPanel = new CPanel();
    parameterScrollPane = new CScrollPane(centerPanel);
    //	
    southPanel = new CPanel();
    southLayout = new FlowLayout();
    //	Buttons
    bOK = ConfirmPanel.createOKButton(true);
    bCancel = ConfirmPanel.createCancelButton(true);
    bPrint = ConfirmPanel.createPrintButton(true);
    bOK.addActionListener(this);
    bCancel.addActionListener(this);
    bPrint.addActionListener(this);
    //	
    mainPanel.setLayout(mainLayout);
    mainPanel.setMinimumSize(new Dimension(500, 100));
    //	South Panel
    southPanel.setLayout(southLayout);
    southLayout.setAlignment(FlowLayout.RIGHT);
    southPanel.add(bPrint, null);
    southPanel.add(bCancel, null);
    southPanel.add(bOK, null);
    //	Editors
    m_separators = new ArrayList<CLabel>();
    //	
    message.setContentType("text/html");
    message.setEditable(false);
    message.setBackground(Color.white);
    message.setFocusable(true);
    //	
    centerPanel.setLayout(new ALayout());
    centerPanel.setBorder(null);
    if (isShowDescription()) {
        mainPanel.add(messagePane, BorderLayout.NORTH);
        messagePane.setMaximumSize(new Dimension(600, 300));
    }
    //	Add Center Panel with scroll bar
    parameterScrollPane.setAutoscrolls(true);
    parameterScrollPane.createVerticalScrollBar();
    parameterScrollPane.createHorizontalScrollBar();
    //	
    mainPanel.add(parameterScrollPane, BorderLayout.CENTER);
    //	Add buttons
    if (isShowButtons()) {
        mainPanel.add(southPanel, BorderLayout.SOUTH);
    }
    //	
    mainLayout.setVgap(2);
    //	Set Text
    message.setText(getTextMsg());
}
Also used : CLabel(org.compiere.swing.CLabel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) CScrollPane(org.compiere.swing.CScrollPane) CPanel(org.compiere.swing.CPanel) Dimension(java.awt.Dimension)

Example 62 with FlowLayout

use of java.awt.FlowLayout in project adempiere by adempiere.

the class AcctViewer method jbInit.

/**
	 *  Static Init.
	 *  <pre>
	 *  - mainPanel
	 *      - tabbedPane
	 *          - query
	 *          - result
	 *          - graphPanel
	 *  </pre>
	 *  @throws Exception
	 */
private void jbInit() throws Exception {
    ImageIcon ii = new ImageIcon(org.compiere.Adempiere.class.getResource("images/InfoAccount16.gif"));
    setIconImage(ii.getImage());
    //
    mainLayout.setHgap(5);
    mainLayout.setVgap(5);
    mainPanel.setLayout(mainLayout);
    selectionPanel.setLayout(selectionLayout);
    this.getContentPane().add(mainPanel, BorderLayout.CENTER);
    mainPanel.add(tabbedPane, BorderLayout.CENTER);
    //  Selection
    selectionBorder = new TitledBorder(BorderFactory.createEtchedBorder(Color.white, new Color(148, 145, 140)), Msg.getMsg(Env.getCtx(), "Selection"));
    selectionPanel.setBorder(selectionBorder);
    lacctSchema.setLabelFor(selAcctSchema);
    lacctSchema.setText(Msg.translate(Env.getCtx(), "C_AcctSchema_ID"));
    lpostingType.setLabelFor(selPostingType);
    lpostingType.setText(Msg.translate(Env.getCtx(), "PostingType"));
    selDocument.setText(Msg.getMsg(Env.getCtx(), "SelectDocument"));
    selDocument.addActionListener(this);
    lOrg.setLabelFor(selOrg);
    lOrg.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
    lAcct.setLabelFor(selAcct);
    lAcct.setText(Msg.translate(Env.getCtx(), "Account_ID"));
    lDate.setLabelFor(selDateFrom);
    lDate.setText(Msg.translate(Env.getCtx(), "DateAcct"));
    lsel1.setLabelFor(sel1);
    lsel2.setLabelFor(sel2);
    lsel3.setLabelFor(sel3);
    lsel4.setLabelFor(sel4);
    lsel5.setLabelFor(sel5);
    lsel6.setLabelFor(sel6);
    lsel7.setLabelFor(sel7);
    lsel8.setLabelFor(sel8);
    //  Display
    displayBorder = new TitledBorder(BorderFactory.createEtchedBorder(Color.white, new Color(148, 145, 140)), Msg.getMsg(Env.getCtx(), "Display"));
    displayPanel.setBorder(displayBorder);
    displayPanel.setLayout(displayLayout);
    displayQty.setText(Msg.getMsg(Env.getCtx(), "DisplayQty"));
    displaySourceAmt.setText(Msg.getMsg(Env.getCtx(), "DisplaySourceInfo"));
    displayDocumentInfo.setText(Msg.getMsg(Env.getCtx(), "DisplayDocumentInfo"));
    lSort.setText(Msg.getMsg(Env.getCtx(), "SortBy"));
    lGroup.setText(Msg.getMsg(Env.getCtx(), "GroupBy"));
    //
    displayPanel.add(displaySourceAmt, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(displayDocumentInfo, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(lSort, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(sortBy1, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(sortBy2, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(group1, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(group2, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(lGroup, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(displayQty, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
    displayPanel.add(sortBy3, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(group3, new GridBagConstraints(1, 7, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(sortBy4, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    displayPanel.add(group4, new GridBagConstraints(1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    //
    selectionPanel.add(lacctSchema, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
    selectionPanel.add(selAcctSchema, new GridBagConstraints(1, 0, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
    selectionPanel.add(selDocument, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(10, 5, 10, 5), 0, 0));
    selectionPanel.add(selTable, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10, 5, 10, 5), 0, 0));
    selectionPanel.add(selRecord, new GridBagConstraints(2, 1, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 5, 10, 5), 0, 0));
    selectionPanel.add(lpostingType, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(selPostingType, new GridBagConstraints(1, 2, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lDate, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(selDateFrom, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(selDateTo, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lOrg, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 0, 5), 0, 0));
    selectionPanel.add(selOrg, new GridBagConstraints(1, 4, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lAcct, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(selAcct, new GridBagConstraints(1, 5, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel1, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel2, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel3, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel1, new GridBagConstraints(1, 6, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel2, new GridBagConstraints(1, 7, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel3, new GridBagConstraints(1, 8, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel4, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel4, new GridBagConstraints(1, 9, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel5, new GridBagConstraints(0, 10, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel5, new GridBagConstraints(1, 10, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel6, new GridBagConstraints(0, 11, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel6, new GridBagConstraints(1, 11, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel7, new GridBagConstraints(0, 12, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel7, new GridBagConstraints(1, 12, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(lsel8, new GridBagConstraints(0, 13, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    selectionPanel.add(sel8, new GridBagConstraints(1, 13, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
    //
    queryLayout.setHgap(5);
    queryLayout.setVgap(5);
    query.setLayout(queryLayout);
    query.add(selectionPanel, BorderLayout.CENTER);
    query.add(displayPanel, BorderLayout.EAST);
    //
    tabbedPane.add(query, Msg.getMsg(Env.getCtx(), "ViewerQuery"));
    tabbedPane.add(result, Msg.getMsg(Env.getCtx(), "ViewerResult"));
    //		tabbedPane.add(graphPanel,   Msg.getMsg(Env.getCtx(), "ViewerGraph"));
    tabbedPane.addChangeListener(this);
    result.getViewport().add(table, null);
    //  South
    southLayout.setHgap(5);
    southLayout.setVgap(5);
    southPanel.setLayout(southLayout);
    statusLine.setForeground(Color.blue);
    statusLine.setBorder(BorderFactory.createLoweredBevelBorder());
    southPanel.add(statusLine, BorderLayout.CENTER);
    bRePost.setText(Msg.getMsg(Env.getCtx(), "RePost"));
    bRePost.setToolTipText(Msg.getMsg(Env.getCtx(), "RePostInfo"));
    bRePost.addActionListener(this);
    bRePost.setVisible(false);
    forcePost.setText(Msg.getMsg(Env.getCtx(), "Force"));
    forcePost.setToolTipText(Msg.getMsg(Env.getCtx(), "ForceInfo"));
    forcePost.setVisible(false);
    CPanel leftSide = new CPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
    leftSide.add(bRePost);
    leftSide.add(forcePost);
    southPanel.add(leftSide, BorderLayout.WEST);
    //
    bQuery.setIcon(Env.getImageIcon("Refresh16.gif"));
    bQuery.setToolTipText(Msg.getMsg(Env.getCtx(), "Refresh"));
    bQuery.addActionListener(this);
    bPrint.setIcon(Env.getImageIcon("Print16.gif"));
    bPrint.setToolTipText(Msg.getMsg(Env.getCtx(), "Print"));
    bPrint.addActionListener(this);
    bExport.setIcon(Env.getImageIcon("Export16.gif"));
    bExport.setToolTipText(Msg.getMsg(Env.getCtx(), "Export"));
    bExport.setVisible(tabbedPane.getSelectedIndex() == 1);
    bExport.addActionListener(this);
    CPanel rightSide = new CPanel(new FlowLayout(FlowLayout.TRAILING, 0, 0));
    rightSide.add(bExport);
    rightSide.add(bPrint);
    rightSide.add(bQuery);
    southPanel.add(rightSide, BorderLayout.EAST);
    this.getContentPane().add(southPanel, BorderLayout.SOUTH);
//
}
Also used : ImageIcon(javax.swing.ImageIcon) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) FlowLayout(java.awt.FlowLayout) Color(java.awt.Color) CPanel(org.compiere.swing.CPanel) TitledBorder(javax.swing.border.TitledBorder)

Example 63 with FlowLayout

use of java.awt.FlowLayout in project adempiere by adempiere.

the class VBrowser method initComponents.

/**
	 * Init View componets
	 */
private void initComponents() {
    toolsBar = new javax.swing.JToolBar();
    tabsPanel = new javax.swing.JTabbedPane();
    searchTab = new CPanel();
    topPanel = new CPanel();
    //	FR [ 344 ]
    searchPanel = new VBrowserSearch(getWindowNo(), getAD_Browse_ID(), BrowserSearch.COLUMNS_2);
    searchPanel.init();
    //	
    buttonSearchPanel = new CPanel();
    centerPanel = new javax.swing.JScrollPane();
    detail = new VBrowserTable(this);
    detail.setRowSelectionAllowed(true);
    detail.getSelectionModel().addListSelectionListener(this);
    footPanel = new CPanel();
    footButtonPanel = new CPanel(new FlowLayout(FlowLayout.CENTER));
    processPanel = new CPanel();
    graphPanel = new CPanel();
    setupToolBar();
    toolsBar.setRollover(true);
    bSelectAll.setText(Msg.getMsg(Env.getCtx(), "SelectAll").replaceAll("[&]", ""));
    bSelectAll.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    bSelectAll.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    bSelectAll.setEnabled(false);
    toolsBar.add(bSelectAll);
    bZoom.setText(Msg.getMsg(Env.getCtx(), "Zoom").replaceAll("[&]", ""));
    bZoom.setFocusable(false);
    bZoom.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    bZoom.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    bZoom.setEnabled(false);
    if (AD_Window_ID > 0)
        toolsBar.add(bZoom);
    bExport.setText(Msg.getMsg(Env.getCtx(), ("Export")));
    bExport.setFocusable(false);
    bExport.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    bExport.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    bExport.setEnabled(false);
    toolsBar.add(bExport);
    bDelete.setText(Msg.getMsg(Env.getCtx(), "Delete").replaceAll("[&]", ""));
    bDelete.setFocusable(false);
    bDelete.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    bDelete.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    bDelete.setEnabled(false);
    if (isDeleteable())
        toolsBar.add(bDelete);
    m_frame.getContentPane().add(toolsBar, java.awt.BorderLayout.PAGE_START);
    searchTab.setLayout(new java.awt.BorderLayout());
    topPanel.setLayout(new java.awt.BorderLayout());
    collapsibleSearch = new CollapsiblePanel(Msg.getMsg(Env.getCtx(), ("SearchCriteria")));
    collapsibleSearch.add(searchPanel.getPanel());
    topPanel.add(collapsibleSearch, java.awt.BorderLayout.NORTH);
    bSearch.setText(Msg.getMsg(Env.getCtx(), "StartSearch"));
    buttonSearchPanel.add(bSearch);
    collapsibleSearch.add(buttonSearchPanel);
    searchTab.add(topPanel, java.awt.BorderLayout.NORTH);
    centerPanel.setViewportView(detail);
    searchTab.add(centerPanel, java.awt.BorderLayout.CENTER);
    footPanel.setLayout(new java.awt.BorderLayout());
    footButtonPanel.add(bCancel);
    footButtonPanel.add(bOk);
    footPanel.add(footButtonPanel, java.awt.BorderLayout.SOUTH);
    processPanel.setLayout(new java.awt.BorderLayout());
    footPanel.add(processPanel, java.awt.BorderLayout.CENTER);
    searchTab.add(footPanel, java.awt.BorderLayout.SOUTH);
    tabsPanel.addTab(Msg.getMsg(Env.getCtx(), "Search"), searchTab);
    graphPanel.setLayout(new java.awt.BorderLayout());
    m_frame.getContentPane().add(tabsPanel, java.awt.BorderLayout.CENTER);
}
Also used : FlowLayout(java.awt.FlowLayout) CPanel(org.compiere.swing.CPanel) BorderLayout(java.awt.BorderLayout) CollapsiblePanel(org.compiere.swing.CollapsiblePanel) VBrowserTable(org.eevolution.grid.VBrowserTable)

Example 64 with FlowLayout

use of java.awt.FlowLayout in project adempiere by adempiere.

the class KeyStoreDialog method jbInit.

/**
	 * 	Static Layout
	 */
private void jbInit() {
    CPanel panel = new CPanel(new ALayout());
    panel.add(lCN, new ALayoutConstraint(0, 0));
    panel.add(fCN, null);
    panel.add(lOU, new ALayoutConstraint(1, 0));
    panel.add(fOU, null);
    panel.add(lO, new ALayoutConstraint(2, 0));
    panel.add(fO, null);
    panel.add(lL, new ALayoutConstraint(3, 0));
    panel.add(fL, null);
    panel.add(lS, new ALayoutConstraint(4, 0));
    panel.add(fS, null);
    panel.add(lC, new ALayoutConstraint(5, 0));
    panel.add(fC, null);
    panel.setPreferredSize(new Dimension(400, 150));
    //
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(panel, BorderLayout.CENTER);
    //
    CPanel confirmPanel = new CPanel(new FlowLayout(FlowLayout.RIGHT));
    confirmPanel.add(bCancel);
    confirmPanel.add(bOK);
    getContentPane().add(confirmPanel, BorderLayout.SOUTH);
    //
    bCancel.addActionListener(this);
    bOK.addActionListener(this);
}
Also used : FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) CPanel(org.compiere.swing.CPanel) ALayoutConstraint(org.compiere.apps.ALayoutConstraint) Dimension(java.awt.Dimension) ALayout(org.compiere.apps.ALayout)

Example 65 with FlowLayout

use of java.awt.FlowLayout in project adempiere by adempiere.

the class Preference method jbInit.

/**
	 *	Static Init.
	 *  <pre>
	 *  - panel
	 *      - tabPane
	 *          - customizePane
	 *              - infoArea
	 *              - fields ...
	 *          - contextPane
	 *              - contextList
	 *              - contextSouthPanel
	 *                  - contextHeader
	 *                  - contextDetail
	 * 			- errorPane
	 * 				- errorScollPane
	 * 					- errorTable
	 *      - southPanel
	 *  </pre>
	 *  @throws Exception
	 */
void jbInit() throws Exception {
    traceLabel.setRequestFocusEnabled(false);
    traceLabel.setText(Msg.getMsg(Env.getCtx(), "TraceLevel", true));
    traceLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "TraceLevel", false));
    traceFile.setText(Msg.getMsg(Env.getCtx(), "TraceFile", true));
    traceFile.setToolTipText(Msg.getMsg(Env.getCtx(), "TraceFile", false));
    autoCommit.setText(Msg.getMsg(Env.getCtx(), "AutoCommit", true));
    autoCommit.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoCommit", false));
    autoNew.setText(Msg.getMsg(Env.getCtx(), "AutoNew", true));
    autoNew.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoNew", false));
    adempiereSys.setText(Msg.getMsg(Env.getCtx(), "AdempiereSys", true));
    adempiereSys.setToolTipText(Msg.getMsg(Env.getCtx(), "AdempiereSys", false));
    logMigrationScript.setText(Msg.getMsg(Env.getCtx(), "LogMigrationScript", true));
    logMigrationScript.setToolTipText(Msg.getMsg(Env.getCtx(), "LogMigrationScript", false));
    printPreview.setText(Msg.getMsg(Env.getCtx(), "AlwaysPrintPreview", true));
    printPreview.setToolTipText(Msg.getMsg(Env.getCtx(), "AlwaysPrintPreview", false));
    validateConnectionOnStartup.setText(Msg.getMsg(Env.getCtx(), "ValidateConnectionOnStartup", true));
    validateConnectionOnStartup.setToolTipText(Msg.getMsg(Env.getCtx(), "ValidateConnectionOnStartup", false));
    singleInstancePerWindow.setText(Msg.getMsg(Env.getCtx(), "SingleInstancePerWindow", true));
    singleInstancePerWindow.setToolTipText(Msg.getMsg(Env.getCtx(), "SingleInstancePerWindow", false));
    openWindowMaximized.setText(Msg.getMsg(Env.getCtx(), "OpenWindowMaximized", true));
    openWindowMaximized.setToolTipText(Msg.getMsg(Env.getCtx(), "OpenWindowMaximized", false));
    autoLogin.setText(Msg.getMsg(Env.getCtx(), "AutoLogin", true));
    autoLogin.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoLogin", false));
    storePassword.setText(Msg.getMsg(Env.getCtx(), "StorePassword", true));
    storePassword.setToolTipText(Msg.getMsg(Env.getCtx(), "StorePassword", false));
    showTrl.setText(Msg.getMsg(Env.getCtx(), "ShowTrlTab", true));
    showTrl.setToolTipText(Msg.getMsg(Env.getCtx(), "ShowTrlTab", false));
    showAcct.setText(Msg.getMsg(Env.getCtx(), "ShowAcctTab", true));
    showAcct.setToolTipText(Msg.getMsg(Env.getCtx(), "ShowAcctTab", false));
    showAdvanced.setText(Msg.getMsg(Env.getCtx(), "ShowAdvancedTab", true));
    showAdvanced.setToolTipText(Msg.getMsg(Env.getCtx(), "ShowAdvancedTab", false));
    connectionProfileLabel.setText(Msg.getElement(Env.getCtx(), "ConnectionProfile"));
    cacheWindow.setText(Msg.getMsg(Env.getCtx(), "CacheWindow", true));
    cacheWindow.setToolTipText(Msg.getMsg(Env.getCtx(), "CacheWindow", false));
    lPrinter.setText(Msg.getMsg(Env.getCtx(), "Printer"));
    lDate.setText(Msg.getMsg(Env.getCtx(), "Date"));
    infoArea.setReadWrite(false);
    // Charset:
    lCharset.setText(Msg.getMsg(Env.getCtx(), "Charset", true));
    lCharset.setToolTipText(Msg.getMsg(Env.getCtx(), "Charset", false));
    getContentPane().add(panel);
    panel.setLayout(panelLayout);
    panel.add(tabPane, BorderLayout.CENTER);
    //	Customize
    tabPane.add(customizePane, Msg.getMsg(Env.getCtx(), "Preference"));
    customizePane.setLayout(customizeLayout);
    customizePane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    Border insetBorder = BorderFactory.createEmptyBorder(2, 2, 2, 0);
    if (MSystem.isSwingRememberPasswordAllowed()) {
        CPanel loginPanel = new CPanel();
        loginPanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "Login")));
        loginPanel.setLayout(new GridLayout(1, 2));
        autoLogin.setBorder(insetBorder);
        storePassword.setBorder(insetBorder);
        loginPanel.add(autoLogin);
        loginPanel.add(storePassword);
        customizePane.add(loginPanel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    }
    CPanel windowPanel = new CPanel();
    windowPanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "Window")));
    windowPanel.setLayout(new GridLayout(4, 2));
    windowPanel.add(showAcct);
    showAcct.setBorder(insetBorder);
    windowPanel.add(showTrl);
    showTrl.setBorder(insetBorder);
    windowPanel.add(showAdvanced);
    showAdvanced.setBorder(insetBorder);
    windowPanel.add(autoCommit);
    autoCommit.setBorder(insetBorder);
    windowPanel.add(autoNew);
    autoNew.setBorder(insetBorder);
    windowPanel.add(cacheWindow);
    cacheWindow.setBorder(insetBorder);
    windowPanel.add(openWindowMaximized);
    openWindowMaximized.setBorder(insetBorder);
    windowPanel.add(singleInstancePerWindow);
    singleInstancePerWindow.setBorder(insetBorder);
    customizePane.add(windowPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    CPanel connPanel = new CPanel();
    connPanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "Connection")));
    connPanel.setLayout(new GridBagLayout());
    connPanel.add(connectionProfileLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    connPanel.add(connectionProfile, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    connPanel.add(validateConnectionOnStartup, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    customizePane.add(connPanel, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    CPanel tracePanel = new CPanel();
    tracePanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "TraceInfo")));
    tracePanel.setLayout(new GridBagLayout());
    tracePanel.add(traceLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    tracePanel.add(traceLevel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    tracePanel.add(traceFile, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    customizePane.add(tracePanel, new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    CPanel printPanel = new CPanel();
    printPanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "Printing")));
    printPanel.setLayout(new GridBagLayout());
    printPanel.add(lPrinter, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    printPanel.add(fPrinter, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    printPanel.add(printPreview, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0));
    customizePane.add(printPanel, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    CPanel otherPanel = new CPanel();
    otherPanel.setBorder(BorderFactory.createEmptyBorder());
    otherPanel.setLayout(new GridLayout());
    CPanel datePanel = new CPanel();
    datePanel.setLayout(new FlowLayout());
    ((FlowLayout) datePanel.getLayout()).setAlignment(FlowLayout.LEFT);
    datePanel.add(lDate);
    datePanel.add(fDate);
    otherPanel.add(datePanel);
    datePanel.setBorder(insetBorder);
    otherPanel.add(adempiereSys);
    adempiereSys.setBorder(insetBorder);
    otherPanel.add(logMigrationScript);
    logMigrationScript.setBorder(insetBorder);
    customizePane.add(otherPanel, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    // Charset:
    CPanel charsetPanel = new CPanel();
    charsetPanel.setBorder(BorderFactory.createEmptyBorder());
    charsetPanel.setLayout(new FlowLayout());
    ((FlowLayout) charsetPanel.getLayout()).setAlignment(FlowLayout.LEFT);
    charsetPanel.add(lCharset);
    charsetPanel.add(fCharset);
    customizePane.add(charsetPanel, new GridBagConstraints(0, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0));
    CPanel themePanel = new CPanel();
    themePanel.setLayout(new GridLayout(1, 1));
    themePanel.add(plafEditor);
    tabPane.add(themePanel, Msg.getMsg(Env.getCtx(), "UITheme", true));
    configPanel.setLayout(new BorderLayout());
    configPanel.add(infoArea, BorderLayout.CENTER);
    CPanel configSouth = new CPanel();
    configSouth.setLayout(new FlowLayout());
    ((FlowLayout) configSouth.getLayout()).setAlignment(FlowLayout.RIGHT);
    configSouth.add(bRoleInfo);
    configPanel.add(configSouth, BorderLayout.SOUTH);
    tabPane.add(configPanel, Msg.getMsg(Env.getCtx(), "Info"));
    //	Info
    tabPane.add(contextPane, Msg.getMsg(Env.getCtx(), "Context"));
    contextPane.setLayout(icontextLayout);
    contextPane.add(contextListScrollPane, BorderLayout.CENTER);
    contextListScrollPane.setPreferredSize(new Dimension(200, 300));
    infoList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    infoList.setBackground(AdempierePLAF.getFieldBackground_Inactive());
    infoList.addListSelectionListener(this);
    infoList.setFixedCellWidth(30);
    contextPane.add(contextSouthPanel, BorderLayout.SOUTH);
    contextSouthPanel.setLayout(contextSouthLayout);
    contextSouthPanel.add(contextHeader, BorderLayout.WEST);
    contextHeader.setBackground(SystemColor.info);
    contextHeader.setReadWrite(false);
    contextHeader.setLineWrap(true);
    contextHeader.setWrapStyleWord(true);
    contextHeader.setBorder(BorderFactory.createLoweredBevelBorder());
    contextSouthPanel.add(contextDetail, BorderLayout.CENTER);
    contextDetail.setBackground(SystemColor.info);
    contextDetail.setReadWrite(false);
    contextDetail.setLineWrap(true);
    contextDetail.setWrapStyleWord(true);
    contextDetail.setBorder(BorderFactory.createLoweredBevelBorder());
    //	Error Pane
    errorPane.setLayout(errorLayout);
    //		tabPane.add(errorPane,  Msg.getMsg(Env.getCtx(), "Errors"));
    tabPane.add(errorPane, "Errors");
    errorPane.add(errorScrollPane, BorderLayout.CENTER);
    errorScrollPane.getViewport().add(errorTable, null);
    //
    errorPanel.add(bErrorsOnly);
    errorPanel.add(bErrorReset);
    errorPanel.add(bErrorEMail);
    errorPanel.add(bErrorSave);
    errorPane.add(errorPanel, BorderLayout.SOUTH);
    //	South
    panel.add(southPanel, BorderLayout.SOUTH);
    southPanel.setLayout(southLayout);
    southPanel.add(statusBar, BorderLayout.SOUTH);
    southPanel.add(confirm, BorderLayout.CENTER);
    //
    bRoleInfo.addActionListener(this);
    confirm.addActionListener(this);
}
Also used : GridLayout(java.awt.GridLayout) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) FlowLayout(java.awt.FlowLayout) GridBagLayout(java.awt.GridBagLayout) BorderLayout(java.awt.BorderLayout) CPanel(org.compiere.swing.CPanel) Dimension(java.awt.Dimension) Border(javax.swing.border.Border)

Aggregations

FlowLayout (java.awt.FlowLayout)400 JPanel (javax.swing.JPanel)338 JLabel (javax.swing.JLabel)189 JButton (javax.swing.JButton)161 ActionEvent (java.awt.event.ActionEvent)134 BoxLayout (javax.swing.BoxLayout)129 BorderLayout (java.awt.BorderLayout)118 ActionListener (java.awt.event.ActionListener)113 Dimension (java.awt.Dimension)95 JScrollPane (javax.swing.JScrollPane)94 Container (java.awt.Container)49 GridBagLayout (java.awt.GridBagLayout)42 JTextField (javax.swing.JTextField)41 Insets (java.awt.Insets)39 GridBagConstraints (java.awt.GridBagConstraints)38 ButtonGroup (javax.swing.ButtonGroup)38 JCheckBox (javax.swing.JCheckBox)35 JTable (javax.swing.JTable)32 JmriJFrame (jmri.util.JmriJFrame)30 JSeparator (javax.swing.JSeparator)24