use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class BrokerDashboardViewPart method updateTableLayout.
/**
* Update table layout
*/
private void updateTableLayout() {
TableLayout basicLayout = new TableLayout();
brokerTablePart.setBasicLayout(basicLayout);
basicTableViewer.getTable().setLayout(basicLayout);
basicTableViewer.getTable().layout();
TableLayout asLayout = new TableLayout();
brokerTablePart.setAsLayout(asLayout);
asTableViewer.getTable().setLayout(asLayout);
asTableViewer.getTable().layout();
TableLayout jqLayout = new TableLayout();
brokerTablePart.setJqLayout(jqLayout);
jqTableViewer.getTable().setLayout(jqLayout);
jqTableViewer.getTable().layout();
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class ShardEnvStatusView method updateTableLayout.
/**
* Update table layout
*/
private void updateTableLayout() {
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(true);
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class BrokerStatusView method updateTableLayout.
/**
* Update table layout
*/
private void updateTableLayout() {
if (basicTableViewer != null) {
TableLayout basicLayout = new TableLayout();
setBasicLayout(basicLayout);
basicTableViewer.getTable().setLayout(basicLayout);
basicTableViewer.getTable().layout();
}
TableLayout asLayout = new TableLayout();
setAsLayout(asLayout);
asTableViewer.getTable().setLayout(asLayout);
asTableViewer.getTable().layout();
TableLayout jqLayout = new TableLayout();
setJqLayout(jqLayout);
jqTableViewer.getTable().setLayout(jqLayout);
jqTableViewer.getTable().layout();
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class BrokerStatusView method createJobTable.
/**
* Create job table composite
*
* @param comp the composite
*
*/
private void createJobTable(Composite comp) {
Composite jobComposite = new Composite(comp, SWT.NONE);
GridData gdJob = new GridData(SWT.FILL, SWT.FILL, true, true);
jobComposite.setLayoutData(gdJob);
jobComposite.setLayout(new GridLayout());
final Label label = new Label(jobComposite, SWT.CENTER);
label.setText(Messages.jobTblTitle);
jqTableViewer = new TableViewer(jobComposite, SWT.FULL_SELECTION | SWT.NO_SCROLL | SWT.V_SCROLL | SWT.BORDER);
jqTableViewer.getTable().setHeaderVisible(true);
jqTableViewer.getTable().setLinesVisible(true);
TableLayout jqLayout = new TableLayout();
setJqLayout(jqLayout);
jqTableViewer.getTable().setLayout(jqLayout);
jqTableViewer.getTable().setLayoutData(gdJob);
TableColumn tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
tblColumn.setText(Messages.tblJobId);
tblColumn.setToolTipText(Messages.tblJobId);
tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
tblColumn.setText(Messages.tblJobPriority);
tblColumn.setToolTipText(Messages.tblJobPriority);
tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
tblColumn.setText(Messages.tblJobAddress);
tblColumn.setToolTipText(Messages.tblJobAddress);
tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
tblColumn.setText(Messages.tblJobTime);
tblColumn.setToolTipText(Messages.tblJobTime);
tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
tblColumn.setText(Messages.tblJobRequest);
tblColumn.setToolTipText(Messages.tblJobRequest);
jqTableViewer.setContentProvider(new JobContentProvider());
jqTableViewer.setLabelProvider(new JobLabelProvider());
jqTableViewer.setInput(jobinfoLst);
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class BrokerStatusView method makeActions.
/**
* This method is to create actions at tool bar
*
*/
private void makeActions() {
Action columnAction = new Action() {
public void run() {
BrokerStatusSettingDlg settingDlg = new BrokerStatusSettingDlg(null);
ServerInfo serverInfo = brokerNode.getServer().getServerInfo();
settingDlg.setServerInfo(serverInfo);
if (settingDlg.open() == Dialog.OK) {
refreshLayout();
}
}
/**
* refresh table layout
*/
private void refreshLayout() {
//refresh basic info table
if (isSupportNewBrokerParamPropery) {
TableLayout basicLayout = new TableLayout();
setBasicLayout(basicLayout);
basicTableViewer.getTable().setLayout(basicLayout);
basicTableViewer.getTable().layout();
}
//refresh apply server table
TableLayout asLayout = new TableLayout();
setAsLayout(asLayout);
asTableViewer.getTable().setLayout(asLayout);
asTableViewer.getTable().layout();
//refresh job queue table
TableLayout jqLayout = new TableLayout();
setJqLayout(jqLayout);
jqTableViewer.getTable().setLayout(jqLayout);
jqTableViewer.getTable().layout();
}
};
columnAction.setText(Messages.columnSettingTxt);
columnAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(columnAction);
}
Aggregations