/*
* Name
*/
this.nameTextField = new XBayaTextField();
XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
this.nameTextField.setEditable(false);
/*
* Radio button
*/
this.amiButton = new JRadioButton("Start new instance");
this.amiButton.setSelected(true);
this.amiButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent paramActionEvent) {
InstanceConfigurationDialog.this.instanceTypeComboBox.getJComboBox().setEnabled(true);
}
});
this.instanceTypeComboBox = new XBayaComboBox(new DefaultComboBoxModel(AmazonUtil.INSTANCE_TYPE));
this.instanceTypeComboBox.setSelectedItem(AmazonUtil.INSTANCE_TYPE[1]);
GridPanel amiPanel = new GridPanel();
amiPanel.add(this.amiButton);
amiPanel.add(this.instanceTypeComboBox);
amiPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);
this.idButton = new JRadioButton("Use existing instance");
this.idButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent paramActionEvent) {
InstanceConfigurationDialog.this.instanceTypeComboBox.getJComboBox().setEnabled(false);
}
});
ButtonGroup serviceTypeButtonGroup = new ButtonGroup();
serviceTypeButtonGroup.add(this.amiButton);
serviceTypeButtonGroup.add(this.idButton);
XBayaLabel radioLabel = new XBayaLabel("Options", this.amiButton);
/*
* AMI/Instance ID
*/
this.idTextField = new XBayaTextField();
XBayaLabel idLabel = new XBayaLabel("AMI/Instance ID", this.amiButton);
/*
* Username
*/
this.usernameTextField = new XBayaTextField();
XBayaLabel usernameLabel = new XBayaLabel("Username", this.amiButton);
GridPanel gridPanel = new GridPanel();
gridPanel.add(nameLabel);
gridPanel.add(this.nameTextField);
gridPanel.add(radioLabel);