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);
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;