/* Actions */
buttonPanel.add(getActionsButton(), BorderLayout.LINE_END);
/* params */
mConstraintsReadLock.lock();
EditableInfo firstConstraint = null;
try {
for (final HbConstraintInterface c : constraints) {
if (firstConstraint == null) {
firstConstraint = (EditableInfo) c;
}
final String[] params = c.getParametersFromXML();
final JPanel panel = getLabels(c);
optionsPanel.add(panel);
c.addParams(optionsPanel,
params,
application.getServiceLabelWidth(),
application.getServiceFieldWidth(),
null);
}
} finally {
mConstraintsReadLock.unlock();
}
getApplyButton().addActionListener(
new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
getBrowser().clStatusLock();
apply(getBrowser().getDCHost(), Application.RunMode.LIVE);
getBrowser().clStatusUnlock();
}
});
thread.start();
}
}
);
getRevertButton().addActionListener(
new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
getBrowser().clStatusLock();
revert();
getBrowser().clStatusUnlock();
}
});
thread.start();
}
}
);
/* apply button */
addApplyButton(buttonPanel);
addRevertButton(buttonPanel);
application.invokeLater(new Runnable() {
@Override
public void run() {
setApplyButtons(null, null);
}
});
mainPanel.add(optionsPanel);
final JPanel newPanel = new JPanel();
newPanel.setBackground(ClusterBrowser.PANEL_BACKGROUND);
newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.PAGE_AXIS));
newPanel.add(buttonPanel);
if (firstConstraint != null) {
newPanel.add(firstConstraint.getMoreOptionsPanel(application.getServiceLabelWidth()
+ application.getServiceFieldWidth() + 4));
}
newPanel.add(new JScrollPane(mainPanel));
newPanel.setMinimumSize(new Dimension(
application.getDefaultSize("HostBrowser.ResourceInfoArea.Width"),