use of com.cubrid.cubridmanager.ui.broker.editor.internal.BrokerEnvStatusSettingDlg in project cubrid-manager by CUBRID.
the class BrokerEnvStatusView method makeActions.
/**
* This method is to create actions at tool bar
*
*/
private void makeActions() {
Action columnAction = new Action() {
public void run() {
BrokerEnvStatusSettingDlg settingDlg = new BrokerEnvStatusSettingDlg(null);
if (settingDlg.open() == Dialog.OK) {
TableLayout tlayout = new TableLayout();
for (BrokerEnvStatusColumn column : BrokerEnvStatusColumn.values()) {
if (column.getValue() == -1) {
tlayout.addColumnData(new ColumnWeightData(0, 0, false));
} else {
tlayout.addColumnData(new ColumnWeightData(10, 40, true));
}
}
tableViewer.getTable().setLayout(tlayout);
tableViewer.getTable().layout();
}
}
};
columnAction.setText(Messages.envColumnSettingTxt);
columnAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(columnAction);
}
Aggregations