Search in sources :

Example 1 with BytesField

use of com.sun.messaging.jmq.admin.apps.console.util.BytesField in project openmq by eclipse-ee4j.

the class BrokerQueryDialog method makeLogTab.

public JPanel makeLogTab() {
    JPanel workPanel;
    GridBagLayout workGridbag;
    GridBagConstraints workConstraints;
    LabelledComponent tmpLabelC;
    LabelledComponent[] lvpItems;
    LabelValuePanel lvp;
    workPanel = new JPanel();
    workGridbag = new GridBagLayout();
    workPanel.setLayout(workGridbag);
    workConstraints = new GridBagConstraints();
    workConstraints.gridx = 0;
    workConstraints.anchor = GridBagConstraints.WEST;
    workConstraints.fill = GridBagConstraints.NONE;
    workConstraints.insets = new Insets(5, 0, 5, 0);
    workConstraints.ipadx = 0;
    workConstraints.ipady = 0;
    workConstraints.weightx = 1.0;
    lvpItems = new LabelledComponent[3];
    logLevelCb = new JComboBox(BKR_LOG_LEVEL_VALID_VALUES.toArray(new String[BKR_LOG_LEVEL_VALID_VALUES.size()]));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_LOG_LEVEL), logLevelCb);
    lvpItems[0] = tmpLabelC;
    logRolloverSizeBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
    logRolloverSizeSF = new SpecialValueField(logRolloverSizeBF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_LOG_ROLLOVER_SIZE), logRolloverSizeSF, LabelledComponent.NORTH);
    lvpItems[1] = tmpLabelC;
    logRolloverIntervalTF = new TimeField(Integer.MAX_VALUE, "0", 10);
    logRolloverIntervalSF = new SpecialValueField(logRolloverIntervalTF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_LOG_ROLLOVER_INTERVAL), logRolloverIntervalSF, LabelledComponent.NORTH);
    lvpItems[2] = tmpLabelC;
    lvp = new LabelValuePanel(lvpItems, 4, 5);
    workGridbag.setConstraints(lvp, workConstraints);
    workPanel.add(lvp);
    return (workPanel);
}
Also used : LabelledComponent(com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent) LabelValuePanel(com.sun.messaging.jmq.admin.apps.console.util.LabelValuePanel) JPanel(javax.swing.JPanel) BytesField(com.sun.messaging.jmq.admin.apps.console.util.BytesField) TimeField(com.sun.messaging.jmq.admin.apps.console.util.TimeField) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JComboBox(javax.swing.JComboBox) SpecialValueField(com.sun.messaging.jmq.admin.apps.console.util.SpecialValueField)

Example 2 with BytesField

use of com.sun.messaging.jmq.admin.apps.console.util.BytesField in project openmq by eclipse-ee4j.

the class BrokerQueryDialog method makeMsgTab.

public JPanel makeMsgTab() {
    JPanel workPanel;
    GridBagLayout workGridbag;
    GridBagConstraints workConstraints;
    LabelledComponent tmpLabelC;
    LabelledComponent[] lvpItems;
    LabelValuePanel lvp;
    workPanel = new JPanel();
    workGridbag = new GridBagLayout();
    workPanel.setLayout(workGridbag);
    workConstraints = new GridBagConstraints();
    workConstraints.gridx = 0;
    workConstraints.anchor = GridBagConstraints.WEST;
    workConstraints.fill = GridBagConstraints.NONE;
    workConstraints.insets = new Insets(5, 0, 5, 0);
    workConstraints.ipadx = 0;
    workConstraints.ipady = 0;
    workConstraints.weightx = 1.0;
    lvpItems = new LabelledComponent[3];
    maxNumMsgsInMemDskTF = new IntegerField(0, Integer.MAX_VALUE, 10);
    maxNumMsgsInMemDskSF = new SpecialValueField(maxNumMsgsInMemDskTF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_MSGS_IN_MEM_DSK), maxNumMsgsInMemDskSF, LabelledComponent.NORTH);
    lvpItems[0] = tmpLabelC;
    maxTtlSizeMsgsInMemDskBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
    maxTtlSizeMsgsInMemDskSF = new SpecialValueField(maxTtlSizeMsgsInMemDskBF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_TTL_SIZE_MSGS_IN_MEM_DSK), maxTtlSizeMsgsInMemDskSF, LabelledComponent.NORTH);
    lvpItems[1] = tmpLabelC;
    maxMsgSizeBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
    maxMsgSizeSF = new SpecialValueField(maxMsgSizeBF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_MSG_SIZE), maxMsgSizeSF, LabelledComponent.NORTH);
    lvpItems[2] = tmpLabelC;
    lvp = new LabelValuePanel(lvpItems, 4, 5);
    workGridbag.setConstraints(lvp, workConstraints);
    workPanel.add(lvp);
    return (workPanel);
}
Also used : LabelledComponent(com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent) LabelValuePanel(com.sun.messaging.jmq.admin.apps.console.util.LabelValuePanel) JPanel(javax.swing.JPanel) BytesField(com.sun.messaging.jmq.admin.apps.console.util.BytesField) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) IntegerField(com.sun.messaging.jmq.admin.apps.console.util.IntegerField) SpecialValueField(com.sun.messaging.jmq.admin.apps.console.util.SpecialValueField)

Example 3 with BytesField

use of com.sun.messaging.jmq.admin.apps.console.util.BytesField in project openmq by eclipse-ee4j.

the class BrokerDestAddDialog method createDestPropsPanel.

private JPanel createDestPropsPanel() {
    JPanel destPanel;
    GridBagLayout destGridbag;
    GridBagConstraints destConstraints;
    Insets zeroInsets, indentInsets, newSectionInsets;
    int i = 0;
    destPanel = new JPanel();
    destGridbag = new GridBagLayout();
    destConstraints = new GridBagConstraints();
    destPanel.setLayout(destGridbag);
    zeroInsets = new Insets(0, 0, 0, 0);
    indentInsets = new Insets(0, 5, 0, 0);
    newSectionInsets = new Insets(5, 0, 0, 0);
    /*
         * Common constraint values
         */
    destConstraints.anchor = GridBagConstraints.WEST;
    /*
         * BEGIN Queue Message Limit
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = newSectionInsets;
    /*
         * JLabel QMessageLimit = new JLabel("Queue Message Limit:");
         */
    QMessageLimit = new JLabel(acr.getString(acr.I_BROKER_MAX_NUM_MSGS));
    destGridbag.setConstraints(QMessageLimit, destConstraints);
    destPanel.add(QMessageLimit);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    queueMessageLimitUnlimitedRB = new JRadioButton();
    queueMessageLimitUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(queueMessageLimitUnlimitedRB, destConstraints);
    destPanel.add(queueMessageLimitUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = zeroInsets;
    queueMessageLimitUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(queueMessageLimitUnlimitedLbl, destConstraints);
    destPanel.add(queueMessageLimitUnlimitedLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    queueMessageLimitLimitedRB = new JRadioButton();
    destConstraints.insets = indentInsets;
    queueMessageLimitLimitedRB.addActionListener(this);
    destGridbag.setConstraints(queueMessageLimitLimitedRB, destConstraints);
    destPanel.add(queueMessageLimitLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i;
    destConstraints.insets = zeroInsets;
    queueMessageLimitTF = new IntegerField(0, Integer.MAX_VALUE, 10);
    destGridbag.setConstraints(queueMessageLimitTF, destConstraints);
    destPanel.add(queueMessageLimitTF);
    destConstraints.gridx = 2;
    destConstraints.gridy = i++;
    destConstraints.insets = new Insets(0, 4, 0, 0);
    ButtonGroup qMessageLimitGroup = new ButtonGroup();
    qMessageLimitGroup.add(queueMessageLimitUnlimitedRB);
    qMessageLimitGroup.add(queueMessageLimitLimitedRB);
    /*
         * END Queue Message Limit
         */
    /*
         * BEGIN Queue Size Limit
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = newSectionInsets;
    /*
         * JLabel QSizeLimit = new JLabel("Queue Size Limit:");
         */
    QSizeLimit = new JLabel(acr.getString(acr.I_BROKER_MAX_TTL_SIZE_MSGS));
    destGridbag.setConstraints(QSizeLimit, destConstraints);
    destPanel.add(QSizeLimit);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    queueSizeLimitUnlimitedRB = new JRadioButton();
    queueSizeLimitUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(queueSizeLimitUnlimitedRB, destConstraints);
    destPanel.add(queueSizeLimitUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    queueSizeLimitUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(queueSizeLimitUnlimitedLbl, destConstraints);
    destPanel.add(queueSizeLimitUnlimitedLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    queueSizeLimitLimitedRB = new JRadioButton();
    queueSizeLimitLimitedRB.addActionListener(this);
    destGridbag.setConstraints(queueSizeLimitLimitedRB, destConstraints);
    destPanel.add(queueSizeLimitLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = zeroInsets;
    queueSizeLimitBF = new BytesField(0, Integer.MAX_VALUE, 10);
    queueSizeLimitBF.addActionListener(this);
    destGridbag.setConstraints(queueSizeLimitBF, destConstraints);
    destPanel.add(queueSizeLimitBF);
    ButtonGroup qSizeLimitGroup = new ButtonGroup();
    qSizeLimitGroup.add(queueSizeLimitUnlimitedRB);
    qSizeLimitGroup.add(queueSizeLimitLimitedRB);
    /*
         * END Queue Size Limit
         */
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    /*
         * BEGIN Maximum Size per Message
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = newSectionInsets;
    /*
         * JLabel maxSizePerMsg = new JLabel("Maximum Size per Message:");
         */
    JLabel maxSizePerMsg = new JLabel(acr.getString(acr.I_BROKER_MAX_SIZE_PER_MSG));
    destGridbag.setConstraints(maxSizePerMsg, destConstraints);
    destPanel.add(maxSizePerMsg);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    destMaxSizePerMsgUnlimitedRB = new JRadioButton();
    destMaxSizePerMsgUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(destMaxSizePerMsgUnlimitedRB, destConstraints);
    destPanel.add(destMaxSizePerMsgUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destMaxSizePerMsgUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(destMaxSizePerMsgUnlimitedLbl, destConstraints);
    destPanel.add(destMaxSizePerMsgUnlimitedLbl);
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    destMaxSizePerMsgLimitedRB = new JRadioButton();
    destMaxSizePerMsgLimitedRB.addActionListener(this);
    destGridbag.setConstraints(destMaxSizePerMsgLimitedRB, destConstraints);
    destPanel.add(destMaxSizePerMsgLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destMaxSizePerMsgBF = new BytesField(0, Integer.MAX_VALUE, 10);
    destMaxSizePerMsgBF.addActionListener(this);
    destGridbag.setConstraints(destMaxSizePerMsgBF, destConstraints);
    destPanel.add(destMaxSizePerMsgBF);
    ButtonGroup maxMesgSizeGroup = new ButtonGroup();
    maxMesgSizeGroup.add(destMaxSizePerMsgUnlimitedRB);
    maxMesgSizeGroup.add(destMaxSizePerMsgLimitedRB);
    /*
         * END Maximum Size per Message
         */
    /*
         * BEGIN Max Producer Count
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = newSectionInsets;
    maxProducerLbl = new JLabel(acr.getString(acr.I_BROKER_MAX_PRODUCERS));
    destGridbag.setConstraints(maxProducerLbl, destConstraints);
    destPanel.add(maxProducerLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    maxProducerUnlimitedRB = new JRadioButton();
    maxProducerUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(maxProducerUnlimitedRB, destConstraints);
    destPanel.add(maxProducerUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    maxProducerUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(maxProducerUnlimitedLbl, destConstraints);
    destPanel.add(maxProducerUnlimitedLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    maxProducerLimitedRB = new JRadioButton();
    maxProducerLimitedRB.addActionListener(this);
    destGridbag.setConstraints(maxProducerLimitedRB, destConstraints);
    destPanel.add(maxProducerLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = zeroInsets;
    maxProducerIF = new IntegerField(0, Integer.MAX_VALUE, 10);
    maxProducerIF.addActionListener(this);
    destGridbag.setConstraints(maxProducerIF, destConstraints);
    destPanel.add(maxProducerIF);
    ButtonGroup maxProducerGroup = new ButtonGroup();
    maxProducerGroup.add(maxProducerUnlimitedRB);
    maxProducerGroup.add(maxProducerLimitedRB);
    /*
         * END Max Producer Count
         */
    /*
         * BEGIN Active Consumer Count
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    activeConsumerLbl = new JLabel(acr.getString(acr.I_BROKER_ACTIVE_CONSUMER));
    destGridbag.setConstraints(activeConsumerLbl, destConstraints);
    destPanel.add(activeConsumerLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    activeConsumerUnlimitedRB = new JRadioButton();
    activeConsumerUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(activeConsumerUnlimitedRB, destConstraints);
    destPanel.add(activeConsumerUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    activeConsumerUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(activeConsumerUnlimitedLbl, destConstraints);
    destPanel.add(activeConsumerUnlimitedLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    activeConsumerLimitedRB = new JRadioButton();
    activeConsumerLimitedRB.addActionListener(this);
    destGridbag.setConstraints(activeConsumerLimitedRB, destConstraints);
    destPanel.add(activeConsumerLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = zeroInsets;
    activeConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 10);
    activeConsumerIF.addActionListener(this);
    destGridbag.setConstraints(activeConsumerIF, destConstraints);
    destPanel.add(activeConsumerIF);
    ButtonGroup activeConsumerGroup = new ButtonGroup();
    activeConsumerGroup.add(activeConsumerUnlimitedRB);
    activeConsumerGroup.add(activeConsumerLimitedRB);
    /*
         * END Active Consumer Count
         */
    /*
         * BEGIN Failover Consumer Count
         */
    destConstraints.gridx = 0;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = newSectionInsets;
    failoverConsumerLbl = new JLabel(acr.getString(acr.I_BROKER_FAILOVER_CONSUMER));
    destGridbag.setConstraints(failoverConsumerLbl, destConstraints);
    destPanel.add(failoverConsumerLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    failoverConsumerUnlimitedRB = new JRadioButton();
    failoverConsumerUnlimitedRB.addActionListener(this);
    destGridbag.setConstraints(failoverConsumerUnlimitedRB, destConstraints);
    destPanel.add(failoverConsumerUnlimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.insets = zeroInsets;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    failoverConsumerUnlimitedLbl = new JLabel(acr.getString(acr.I_BROKER_UNLIMITED));
    destGridbag.setConstraints(failoverConsumerUnlimitedLbl, destConstraints);
    destPanel.add(failoverConsumerUnlimitedLbl);
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    destConstraints.gridx = 0;
    destConstraints.gridy = i;
    destConstraints.insets = indentInsets;
    failoverConsumerLimitedRB = new JRadioButton();
    failoverConsumerLimitedRB.addActionListener(this);
    destGridbag.setConstraints(failoverConsumerLimitedRB, destConstraints);
    destPanel.add(failoverConsumerLimitedRB);
    destConstraints.gridx = 1;
    destConstraints.gridy = i++;
    destConstraints.gridwidth = GridBagConstraints.REMAINDER;
    destConstraints.insets = zeroInsets;
    failoverConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 10);
    failoverConsumerIF.addActionListener(this);
    destGridbag.setConstraints(failoverConsumerIF, destConstraints);
    destPanel.add(failoverConsumerIF);
    ButtonGroup failoverConsumerGroup = new ButtonGroup();
    failoverConsumerGroup.add(failoverConsumerUnlimitedRB);
    failoverConsumerGroup.add(failoverConsumerLimitedRB);
    /*
         * END Failover Consumer Count
         */
    /*
         * Reset
         */
    destConstraints.gridwidth = 1;
    return destPanel;
}
Also used : JPanel(javax.swing.JPanel) BytesField(com.sun.messaging.jmq.admin.apps.console.util.BytesField) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) JRadioButton(javax.swing.JRadioButton) GridBagLayout(java.awt.GridBagLayout) ButtonGroup(javax.swing.ButtonGroup) JLabel(javax.swing.JLabel) IntegerField(com.sun.messaging.jmq.admin.apps.console.util.IntegerField)

Example 4 with BytesField

use of com.sun.messaging.jmq.admin.apps.console.util.BytesField in project openmq by eclipse-ee4j.

the class BrokerDestPropsDialog method makeBasicTab.

private JPanel makeBasicTab() {
    JPanel basicPanel;
    GridBagLayout basicGridbag;
    GridBagConstraints basicConstraints;
    LabelledComponent tmpLabelC;
    LabelledComponent[] lvpItems;
    LabelValuePanel lvp;
    int i = 0;
    basicPanel = new JPanel();
    basicGridbag = new GridBagLayout();
    basicConstraints = new GridBagConstraints();
    basicPanel.setLayout(basicGridbag);
    basicConstraints.gridx = 0;
    basicConstraints.anchor = GridBagConstraints.WEST;
    basicConstraints.fill = GridBagConstraints.NONE;
    basicConstraints.insets = new Insets(10, 0, 10, 0);
    basicConstraints.ipadx = 0;
    basicConstraints.ipady = 0;
    basicConstraints.weightx = 1.0;
    /*
         * Basic destination info: name, type, state
         */
    lvpItems = new LabelledComponent[3];
    destNameValue = new JLabel();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_NAME), destNameValue);
    lvpItems[0] = tmpLabelC;
    destTypeValue = new JLabel();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_TYPE), destTypeValue);
    lvpItems[1] = tmpLabelC;
    destStateValue = new JLabel();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_STATE) + ":", destStateValue);
    lvpItems[2] = tmpLabelC;
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 0;
    lvp = new LabelValuePanel(lvpItems, 4, 3);
    basicGridbag.setConstraints(lvp, basicConstraints);
    basicPanel.add(lvp);
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 1;
    basicConstraints.insets = new Insets(0, 0, 0, 0);
    basicConstraints.fill = GridBagConstraints.HORIZONTAL;
    JSeparator separator = new JSeparator();
    basicGridbag.setConstraints(separator, basicConstraints);
    basicPanel.add(separator);
    /*
         * Reset
         */
    basicConstraints.gridwidth = 1;
    basicConstraints.fill = GridBagConstraints.NONE;
    /*
         * Current number or message size / bytes info
         */
    lvpItems = new LabelledComponent[5];
    curNumMesgsValue = new JLabel();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_NUM_MSGS), curNumMesgsValue);
    lvpItems[i++] = tmpLabelC;
    curNumMesgBytesValue = new JLabel();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_TTL_SIZE_MSGS), curNumMesgBytesValue, acr.getString(acr.I_BYTES));
    lvpItems[i++] = tmpLabelC;
    curNumProducers = new JLabel();
    curNumProducersLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_NUM_PRODUCERS), curNumProducers);
    lvpItems[i++] = curNumProducersLabelC;
    curNumActive = new JLabel();
    curNumActiveLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_CUR_NUM_ACTIVE), curNumActive);
    lvpItems[i++] = curNumActiveLabelC;
    curNumFailover = new JLabel();
    curNumFailoverLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_CUR_NUM_FAILOVER), curNumFailover);
    lvpItems[i++] = curNumFailoverLabelC;
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 2;
    basicConstraints.insets = new Insets(10, 0, 10, 0);
    lvp = new LabelValuePanel(lvpItems, 4, 5);
    basicGridbag.setConstraints(lvp, basicConstraints);
    basicPanel.add(lvp);
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 3;
    basicConstraints.insets = new Insets(0, 0, 0, 0);
    basicConstraints.fill = GridBagConstraints.HORIZONTAL;
    separator = new JSeparator();
    basicGridbag.setConstraints(separator, basicConstraints);
    basicPanel.add(separator);
    /*
         * Reset
         */
    basicConstraints.gridwidth = 1;
    basicConstraints.fill = GridBagConstraints.NONE;
    i = 0;
    lvpItems = new LabelledComponent[6];
    /*
         * Queue message limit
         */
    mesgLimitIF = new IntegerField(0, Integer.MAX_VALUE, 11);
    mesgLimitSF = new SpecialValueField(mesgLimitIF, acr.getString(acr.I_BROKER_UNLIMITED));
    mesgLimitLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_NUM_MSGS), mesgLimitSF, LabelledComponent.NORTH);
    lvpItems[i++] = mesgLimitLabelC;
    /*
         * Queue size limit
         */
    mesgSizeLimitBF = new BytesField(0, Long.MAX_VALUE, 11);
    mesgSizeLimitSF = new SpecialValueField(mesgSizeLimitBF, acr.getString(acr.I_BROKER_UNLIMITED));
    mesgSizeLimitLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_TTL_SIZE_MSGS), mesgSizeLimitSF, LabelledComponent.NORTH);
    lvpItems[i++] = mesgSizeLimitLabelC;
    /*
         * Destination Maximum Size per Message
         */
    maxSizePerMsgBF = new BytesField(0, Long.MAX_VALUE, 11);
    maxSizePerMsgSF = new SpecialValueField(maxSizePerMsgBF, acr.getString(acr.I_BROKER_UNLIMITED));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_SIZE_PER_MSG), maxSizePerMsgSF, LabelledComponent.NORTH);
    lvpItems[i++] = tmpLabelC;
    /*
         * Max Producers
         */
    maxProducerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
    maxProducerSF = new SpecialValueField(maxProducerIF, acr.getString(acr.I_BROKER_UNLIMITED));
    maxProducerLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_MAX_PRODUCERS), maxProducerSF, LabelledComponent.NORTH);
    lvpItems[i++] = maxProducerLabelC;
    /*
         * Active Consumers
         */
    activeConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
    activeConsumerSF = new SpecialValueField(activeConsumerIF, acr.getString(acr.I_BROKER_UNLIMITED));
    activeConsumerLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_ACTIVE_CONSUMER), activeConsumerSF, LabelledComponent.NORTH);
    lvpItems[i++] = activeConsumerLabelC;
    /*
         * Failover Consumers
         */
    failoverConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
    failoverConsumerSF = new SpecialValueField(failoverConsumerIF, acr.getString(acr.I_BROKER_UNLIMITED));
    failoverConsumerLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_FAILOVER_CONSUMER), failoverConsumerSF, LabelledComponent.NORTH);
    lvpItems[i++] = failoverConsumerLabelC;
    lvp = new LabelValuePanel(lvpItems, 4, 5);
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 4;
    basicConstraints.insets = new Insets(10, 0, 10, 0);
    basicGridbag.setConstraints(lvp, basicConstraints);
    basicPanel.add(lvp);
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 5;
    basicConstraints.insets = new Insets(0, 0, 0, 0);
    basicConstraints.fill = GridBagConstraints.HORIZONTAL;
    separator = new JSeparator();
    basicGridbag.setConstraints(separator, basicConstraints);
    basicPanel.add(separator);
    /*
         * Reset
         */
    basicConstraints.gridwidth = 1;
    basicConstraints.fill = GridBagConstraints.NONE;
    i = 0;
    /*
         * Limit Behavior, Use Dead Message Queue
         */
    lvpItems = new LabelledComponent[2];
    limitBehaviorCb = new JComboBox(BKR_LIMIT_BEHAV_VALID_VALUES.toArray(new String[BKR_LIMIT_BEHAV_VALID_VALUES.size()]));
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_LIMIT_BEHAVIOR), limitBehaviorCb);
    lvpItems[i++] = tmpLabelC;
    useDMQCkb = new JCheckBox();
    tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_USE_DMQ), useDMQCkb);
    lvpItems[i++] = tmpLabelC;
    basicConstraints.gridx = 0;
    basicConstraints.gridy = 6;
    basicConstraints.insets = new Insets(10, 0, 10, 0);
    lvp = new LabelValuePanel(lvpItems, 4, 2);
    basicGridbag.setConstraints(lvp, basicConstraints);
    basicPanel.add(lvp);
    return (basicPanel);
}
Also used : LabelValuePanel(com.sun.messaging.jmq.admin.apps.console.util.LabelValuePanel) JPanel(javax.swing.JPanel) BytesField(com.sun.messaging.jmq.admin.apps.console.util.BytesField) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JComboBox(javax.swing.JComboBox) JLabel(javax.swing.JLabel) IntegerField(com.sun.messaging.jmq.admin.apps.console.util.IntegerField) JSeparator(javax.swing.JSeparator) LabelledComponent(com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent) JCheckBox(javax.swing.JCheckBox) SpecialValueField(com.sun.messaging.jmq.admin.apps.console.util.SpecialValueField)

Aggregations

BytesField (com.sun.messaging.jmq.admin.apps.console.util.BytesField)4 GridBagConstraints (java.awt.GridBagConstraints)4 GridBagLayout (java.awt.GridBagLayout)4 Insets (java.awt.Insets)4 JPanel (javax.swing.JPanel)4 IntegerField (com.sun.messaging.jmq.admin.apps.console.util.IntegerField)3 LabelValuePanel (com.sun.messaging.jmq.admin.apps.console.util.LabelValuePanel)3 LabelledComponent (com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent)3 SpecialValueField (com.sun.messaging.jmq.admin.apps.console.util.SpecialValueField)3 JComboBox (javax.swing.JComboBox)2 JLabel (javax.swing.JLabel)2 TimeField (com.sun.messaging.jmq.admin.apps.console.util.TimeField)1 ButtonGroup (javax.swing.ButtonGroup)1 JCheckBox (javax.swing.JCheckBox)1 JRadioButton (javax.swing.JRadioButton)1 JSeparator (javax.swing.JSeparator)1