skin = (SWTSkin)JMuleUIManager.getJMuleUI().getSkin();
}catch(Throwable t) {
}
RowData rd;
display = parent.getDisplay();
listener = _listener;
tableColumns = new ArrayList<TableColumn>();
for(int i = 0;i<editTable.getColumnCount();i++){
int id = editTable.getColumnOrder()[i];
tableColumns.add(editTable.getColumn(id));
}
newEnabledState = new HashMap<TableColumn,Boolean>();
for(TableColumn column : tableColumns) {
int column_id = (Integer)column.getData(SWTConstants.COLUMN_NAME_KEY);
Boolean status = SWTPreferences.getInstance().isColumnVisible(column_id);
newEnabledState.put(column, status);
}
blue = new Color(display,0,0,128);
Shell shell1=new Shell(display,SWT.ON_TOP);
shell=new Shell(shell1,SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
shell.setText(Localizer._("columneditorwindow.title"));
shell.setImage(SWTImageRepository.getImage("columns_setup.png"));
GridLayout layout = new GridLayout();
shell.setLayout (layout);
GridData gridData;
Label label = new Label(shell,SWT.NULL);
label.setText(Localizer._("columneditorwindow.draghint"));
gridData = new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(gridData);
table = new Table (shell, SWT.VIRTUAL | SWT.CHECK | SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
gridData = new GridData(GridData.FILL_BOTH);
table.setLayoutData(gridData);
table.setHeaderVisible(true);
Composite cButtonArea = new Composite(shell, SWT.NULL);
gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
cButtonArea.setLayoutData(gridData);
RowLayout rLayout = new RowLayout(SWT.HORIZONTAL);
rLayout.marginLeft = 0;
rLayout.marginTop = 0;
rLayout.marginRight = 0;
rLayout.marginBottom = 0;
rLayout.spacing = 5;
cButtonArea.setLayout (rLayout);
Button bOk = new Button(cButtonArea,SWT.PUSH);
bOk.setFont(skin.getButtonFont());
bOk.setImage(skin.getButtonImage(SkinConstants.FINISH_BUTTON_IMAGE));
bOk.setText(Localizer._("mainwindow.button.ok"));
rd = new RowData();
rd.width = 70;
bOk.setLayoutData(rd);
bOk.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event e) {
saveAndApply();
close();
}
});
Button bCancel = new Button(cButtonArea,SWT.PUSH);
bCancel.setFont(skin.getButtonFont());
bCancel.setImage(skin.getButtonImage(SkinConstants.CANCEL_BUTTON_IMAGE));
bCancel.setText(Localizer._("mainwindow.button.cancel"));
rd = new RowData();
rd.width = 70;
bCancel.setLayoutData(rd);
bCancel.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event e) {
close();
}
});
Button bApply = new Button(cButtonArea,SWT.PUSH);
bApply.setFont(skin.getButtonFont());
bApply.setImage(skin.getButtonImage(SkinConstants.OK_BUTTON_IMAGE));
bApply.setText(Localizer._("mainwindo.button.apply"));
rd = new RowData();
rd.width = 70;
bApply.setLayoutData(rd);
bApply.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event e) {
saveAndApply();