final JPanel smallButtonPanel = new JPanel();
smallButtonPanel.setBackground(STATUS_BACKGROUND);
smallButtonPanel.setLayout(new BoxLayout(smallButtonPanel, BoxLayout.PAGE_AXIS));
buttonPanel.add(smallButtonPanel);
/* add new host button */
final MyButton addHostButton = widgetFactory.createButton(Tools.getString("ClusterTab.AddNewHost"), HOST_ICON);
addHostButton.setBackgroundColor(Browser.STATUS_BACKGROUND);
addHostButton.setPreferredSize(BIG_BUTTON_DIMENSION);
addHostButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
final Thread thread = new Thread(
new Runnable() {
@Override
public void run() {
final Host host = hostFactory.createInstance();
addHostDialogProvider.get().showDialogs(host);
}
});
thread.start();
}
});
guiData.registerAddHostButton(addHostButton);
buttonPanel.add(addHostButton);
createEmptyView();
add(logoPanel, BorderLayout.PAGE_END);
guiData.registerAllHostsUpdate(this);
guiData.allHostsUpdate();
/* add new cluster button */
final MyButton addClusterButton = widgetFactory.createButton(Tools.getString("ClusterTab.AddNewCluster"), CLUSTER_ICON);
addClusterButton.setBackgroundColor(Browser.STATUS_BACKGROUND);
addClusterButton.setPreferredSize(BIG_BUTTON_DIMENSION);
addClusterButton.setMinimumSize(BIG_BUTTON_DIMENSION);
addClusterButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
final Thread thread = new Thread(
new Runnable() {
@Override