Search in sources :

Example 71 with JPanel

use of javax.swing.JPanel in project ACS by ACS-Community.

the class StatusLine method initialize.

/**
	 * Init the status line
	 */
private void initialize() {
    BoxLayout layout = new BoxLayout(this, BoxLayout.LINE_AXIS);
    setLayout(layout);
    // Add the panel with the widgets at the left side
    JPanel widgetsPnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    widgetsPnl.setBorder(BorderFactory.createLoweredBevelBorder());
    // Build the text fields	
    for (int t = 0; t < counters.length; t++) {
        counters[t] = new CounterWidget(AlarmGUIType.values()[t], tableModel.getAlarmCounter(AlarmGUIType.values()[t]), tableModel);
        // Add the widget
        widgetsPnl.add(counters[t].getComponent());
    }
    add(widgetsPnl);
    JPanel statusMsgPnl = new JPanel();
    statusMsgPnl.setBorder(BorderFactory.createLoweredBevelBorder());
    statusMsgPnl.add(statusMessageLbl);
    add(statusMsgPnl);
    // filtered status display (copied from jlog :: LoggingClient#getStatusLinePnl())
    GridBagConstraints constraintsTableFlt = new GridBagConstraints();
    constraintsTableFlt.gridx = 3;
    constraintsTableFlt.gridy = 0;
    constraintsTableFlt.insets = new Insets(1, 1, 1, 1);
    tableFiltersLbl = new JLabel();
    tableFiltersLbl.setVisible(true);
    tableFiltersLbl.setBorder(BorderFactory.createLoweredBevelBorder());
    Font fntTableFlt = tableFiltersLbl.getFont();
    Font newFontTableFlt = fntTableFlt.deriveFont(fntTableFlt.getSize() - 2);
    tableFiltersLbl.setFont(newFontTableFlt);
    add(tableFiltersLbl, constraintsTableFlt);
    // set initial text
    setTableFilterLbl(null);
    // Add the label with the connection status to the right
    JPanel connectionPnl = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    connectionPnl.setBorder(BorderFactory.createLoweredBevelBorder());
    connectionWidget = new ConnectionWidget(alarmPanel);
    connectionPnl.add(connectionWidget);
    add(connectionPnl);
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) FlowLayout(java.awt.FlowLayout) Insets(java.awt.Insets) BoxLayout(javax.swing.BoxLayout) JLabel(javax.swing.JLabel) Font(java.awt.Font)

Example 72 with JPanel

use of javax.swing.JPanel in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getJPanel.

/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getJPanel() {
    if (jPanel == null) {
        jPanel = new JPanel();
        jPanel.setLayout(new BorderLayout());
        jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Errors/Completions", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), new java.awt.Color(51, 51, 51)));
        jPanel.setPreferredSize(new java.awt.Dimension(200, 300));
        jPanel.add(getJScrollPane4(), java.awt.BorderLayout.CENTER);
        jPanel.add(getNodesEditPanel(), java.awt.BorderLayout.SOUTH);
    }
    return jPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) Color(java.awt.Color)

Example 73 with JPanel

use of javax.swing.JPanel in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getJPanel4.

/**
	 * This method initializes jPanel4	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getJPanel4() {
    if (jPanel4 == null) {
        jPanel4 = new JPanel();
        jPanel4.setLayout(new BorderLayout());
        jPanel4.add(getJScrollPane5(), java.awt.BorderLayout.CENTER);
        jPanel4.add(getMembersEditPanel(), java.awt.BorderLayout.WEST);
    }
    return jPanel4;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout)

Example 74 with JPanel

use of javax.swing.JPanel in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getNodesPanel.

/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getNodesPanel() {
    if (nodesPanel == null) {
        nodesPanel = new JPanel();
        nodesPanel.setLayout(new BorderLayout());
        nodesPanel.add(getJPanel(), java.awt.BorderLayout.WEST);
        nodesPanel.add(getJScrollPane2(), java.awt.BorderLayout.NORTH);
        nodesPanel.add(getJSplitPane2(), java.awt.BorderLayout.CENTER);
    }
    return nodesPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout)

Example 75 with JPanel

use of javax.swing.JPanel in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getMembersEditPanel.

/**
	 * This method initializes jPanel5	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getMembersEditPanel() {
    if (membersEditPanel == null) {
        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
        gridBagConstraints3.insets = new java.awt.Insets(0, 4, 0, 3);
        gridBagConstraints3.gridy = 1;
        gridBagConstraints3.gridx = 0;
        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
        gridBagConstraints2.insets = new java.awt.Insets(0, 4, 0, 3);
        gridBagConstraints2.gridy = 0;
        gridBagConstraints2.gridx = 0;
        membersEditPanel = new JPanel();
        membersEditPanel.setLayout(new GridBagLayout());
        membersEditPanel.setVisible(false);
        membersEditPanel.add(getAddMemmberButton(), gridBagConstraints2);
        membersEditPanel.add(getRemoveMemberButton(), gridBagConstraints3);
    }
    return membersEditPanel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout)

Aggregations

JPanel (javax.swing.JPanel)4487 JLabel (javax.swing.JLabel)1843 BorderLayout (java.awt.BorderLayout)1461 JButton (javax.swing.JButton)1180 Dimension (java.awt.Dimension)1107 GridBagLayout (java.awt.GridBagLayout)1071 ActionEvent (java.awt.event.ActionEvent)1019 GridBagConstraints (java.awt.GridBagConstraints)954 JScrollPane (javax.swing.JScrollPane)901 ActionListener (java.awt.event.ActionListener)871 BoxLayout (javax.swing.BoxLayout)801 Insets (java.awt.Insets)724 FlowLayout (java.awt.FlowLayout)667 JTextField (javax.swing.JTextField)532 JCheckBox (javax.swing.JCheckBox)458 GridLayout (java.awt.GridLayout)375 JComboBox (javax.swing.JComboBox)267 EmptyBorder (javax.swing.border.EmptyBorder)252 JTable (javax.swing.JTable)224 Color (java.awt.Color)210