use of org.eclipse.jface.viewers.TableViewerColumn in project cubrid-manager by CUBRID.
the class UnifyHostConfigEditor method createCubridConfTabItem.
/**
* create cubrid table
*/
public void createCubridConfTabItem() {
Composite comp = new Composite(confTabFolder, SWT.NONE);
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
comp.setLayout(new GridLayout(1, false));
cubridConfTableCTabItem = new CTabItem(confTabFolder, SWT.NONE);
cubridConfTableCTabItem.setText(CUBRIDCONFCONFIGFILENAME);
cubridConfTabTableViewer = new TableViewer(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
cubridConfTabTableViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
cubridConfTabTableViewer.getTable().setHeaderVisible(true);
cubridConfTabTableViewer.getTable().setLinesVisible(true);
cubridConfTabTableViewer.setUseHashlookup(true);
//create column
TableViewerColumn column = new TableViewerColumn(cubridConfTabTableViewer, SWT.LEFT);
column.getColumn().setWidth(0);
column.getColumn().setText("");
cubridConfTabTableViewer.setContentProvider(new UnifyHostCubridConfTableContentProvider());
cubridConfTabTableViewer.setLabelProvider(new UnifyHostCubridConfTableLabelProvider());
//use to mark click point, the right click menu use this point
cubridConfTabTableViewer.getTable().addListener(SWT.MouseDown, new Listener() {
public void handleEvent(Event event) {
cubridConfTableClickPoint = new Point(event.x, event.y);
cubridConfTableClickPointTiming = System.currentTimeMillis();
}
});
registerCubridConfTableContextMenu();
cubridConfTableCTabItem.setControl(comp);
if (confTabFolder.getSelection() == null) {
confTabFolder.setSelection(cubridConfTableCTabItem);
}
}
use of org.eclipse.jface.viewers.TableViewerColumn in project cubrid-manager by CUBRID.
the class UnifyHostConfigEditor method createCubridHAConfTabItem.
/**
* create cubrid HA table
*/
public void createCubridHAConfTabItem() {
Composite comp = new Composite(confTabFolder, SWT.NONE);
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
comp.setLayout(new GridLayout(1, false));
CTabItem tableCTabItem = new CTabItem(confTabFolder, SWT.NONE);
tableCTabItem.setText("cubrid_ha.conf");
TableViewer cubridHAConfTabTableViewer = new TableViewer(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
cubridHAConfTabTableViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
cubridHAConfTabTableViewer.getTable().setHeaderVisible(true);
cubridHAConfTabTableViewer.getTable().setLinesVisible(true);
cubridHAConfTabTableViewer.setUseHashlookup(true);
//create column
TableViewerColumn column = new TableViewerColumn(cubridHAConfTabTableViewer, SWT.LEFT);
column.getColumn().setWidth(0);
column.getColumn().setText("");
//
// brokerConfTabTableViewer.setContentProvider(new BrokerConfTableContentProvider());
// brokerConfTabTableViewer.setLabelProvider(new BrokerConfTableLabelProvider());
// brokerConfTabTableViewer.setSorter(new BrokerConfTableViewerSorter());
tableCTabItem.setControl(comp);
if (confTabFolder.getSelection() == null) {
confTabFolder.setSelection(tableCTabItem);
}
}
use of org.eclipse.jface.viewers.TableViewerColumn in project cubrid-manager by CUBRID.
the class UnifyHostConfigEditor method createCubridACLConfTabItem.
/**
* create cubrid ACL table
*/
public void createCubridACLConfTabItem() {
Composite comp = new Composite(confTabFolder, SWT.NONE);
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
comp.setLayout(new GridLayout(1, false));
CTabItem tableCTabItem = new CTabItem(confTabFolder, SWT.NONE);
tableCTabItem.setText("acl.conf");
TableViewer cubridACLConfTabTableViewer = new TableViewer(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
cubridACLConfTabTableViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
cubridACLConfTabTableViewer.getTable().setHeaderVisible(true);
cubridACLConfTabTableViewer.getTable().setLinesVisible(true);
cubridACLConfTabTableViewer.setUseHashlookup(true);
//create column
TableViewerColumn column = new TableViewerColumn(cubridACLConfTabTableViewer, SWT.LEFT);
column.getColumn().setWidth(0);
column.getColumn().setText("");
//
// brokerConfTabTableViewer.setContentProvider(new BrokerConfTableContentProvider());
// brokerConfTabTableViewer.setLabelProvider(new BrokerConfTableLabelProvider());
// brokerConfTabTableViewer.setSorter(new BrokerConfTableViewerSorter());
tableCTabItem.setControl(comp);
if (confTabFolder.getSelection() == null) {
confTabFolder.setSelection(tableCTabItem);
}
}
use of org.eclipse.jface.viewers.TableViewerColumn in project cubrid-manager by CUBRID.
the class DBAuthComparator method createUsersTable.
/**
* create user table
*
* @param parent
*/
public void createUsersTable(Composite parent) {
userTableViewer = new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
userTableViewer.getTable().setHeaderVisible(false);
userTableViewer.getTable().setLinesVisible(false);
userTableViewer.getTable().setLayoutData(CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
final TableViewerColumn nameColumn = new TableViewerColumn(userTableViewer, SWT.LEFT);
nameColumn.getColumn().setWidth(200);
userTableViewer.setContentProvider(new UserContentProvider());
userTableViewer.setLabelProvider(new UserLabelProvider());
registerContextMenu();
userTableViewer.getTable().addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
public void widgetDefaultSelected(SelectionEvent e) {
TableItem[] items = userTableViewer.getTable().getSelection();
if (items.length == 1) {
UserDetailInfo userInfo = (UserDetailInfo) items[0].getData();
setAuthDetailInfoTableViewer(userInfo);
}
}
});
}
use of org.eclipse.jface.viewers.TableViewerColumn in project cubrid-manager by CUBRID.
the class TriggerDashboardEditorPart method createTriggersDetailInfoTable.
/**
* create table
* @param parent
*/
public void createTriggersDetailInfoTable(Composite parent) {
final Composite tableComposite = new Composite(parent, SWT.NONE);
tableComposite.setLayout(new FillLayout());
tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
triggersDetailInfoTable = new TableViewer(tableComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
triggersDetailInfoTable.getTable().setHeaderVisible(true);
triggersDetailInfoTable.getTable().setLinesVisible(true);
final TableViewerColumn nameColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
nameColumn.getColumn().setWidth(150);
nameColumn.getColumn().setText(Messages.triggersDetailInfoPartTableNameCol);
final TableViewerColumn targetTableColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
targetTableColumn.getColumn().setWidth(120);
targetTableColumn.getColumn().setText(Messages.triggersDetailInfoPartTableTargetTableCol);
final TableViewerColumn eventTypeColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
eventTypeColumn.getColumn().setWidth(150);
eventTypeColumn.getColumn().setText(Messages.triggersDetailInfoPartTableEventTypeCol);
final TableViewerColumn triggerStatusColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
triggerStatusColumn.getColumn().setWidth(100);
triggerStatusColumn.getColumn().setText(Messages.triggersDetailInfoPartTableTriggerStatusCol);
final TableViewerColumn triggerPriorityColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
triggerPriorityColumn.getColumn().setWidth(120);
triggerPriorityColumn.getColumn().setText(Messages.triggersDetailInfoPartTableTriggerPriorityCol);
final TableViewerColumn executionTimeColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
executionTimeColumn.getColumn().setWidth(100);
executionTimeColumn.getColumn().setText(Messages.triggersDetailInfoPartTableExecutionTimeCol);
final TableViewerColumn actionTypeColumn = new TableViewerColumn(triggersDetailInfoTable, SWT.LEFT);
actionTypeColumn.getColumn().setWidth(150);
actionTypeColumn.getColumn().setText(Messages.triggersDetailInfoPartTableActionTypeCol);
triggersDetailInfoTable.setComparator(new ColumnViewerSorter());
triggersDetailInfoTable.setContentProvider(new TriggersDetailTableViewerContentProvider());
triggersDetailInfoTable.setLabelProvider(new TriggersTableViewerLabelProvider());
registerContextMenu();
}
Aggregations