use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class EditVirtualTableDialog method createTableInformationGroup.
private void createTableInformationGroup(Composite compositeGenaral) {
final Group group = new Group(compositeGenaral, SWT.NONE);
group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
group.setLayout(gridLayout);
group.setText(Messages.lblTableInfo);
final Label tableNameLabel = new Label(group, SWT.NONE);
tableNameLabel.setData(Messages.dataNewKey, null);
tableNameLabel.setText(Messages.lblTableName);
final SchemaInfo newSchemaInfo = getNewSchemaInfo();
tableNameComp = new Composite(group, SWT.NONE);
{
GridLayout gl = new GridLayout();
gl.numColumns = 2;
gl.marginWidth = 0;
tableNameComp.setLayout(gl);
tableNameComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
tableNameText = new Text(tableNameComp, SWT.BORDER);
{
GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
tableNameText.setLayoutData(gd);
}
tableNameText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
if (tableNameText.getText().length() == 0) {
CommonUITool.hideErrorBaloon(errorBaloon);
} else if (verifyTableName()) {
String tableName = tableNameText.getText();
newSchemaInfo.setClassname(tableName);
}
}
});
tableNameText.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
CommonUITool.hideErrorBaloon(errorBaloon);
}
});
}
//char set
if (supportCharset) {
Composite collationComposite = new Composite(tableNameComp, SWT.NONE);
collationComposite.setLayout(new GridLayout(2, false));
final Label collationLabel = new Label(collationComposite, SWT.NONE);
collationLabel.setText(Messages.lblCollation);
collationCombo = new Combo(collationComposite, SWT.READ_ONLY);
collationCombo.setLayout(new FillLayout());
collationCombo.setVisibleItemCount(10);
fillCollationCombo();
String collation = collationCombo.getText();
newSchemaInfo.setCollation(collation);
collationCombo.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
String collation = collationCombo.getText();
newSchemaInfo.setCollation(collation);
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
if (!isNewTableFlag && newSchemaInfo.getCollation() != null) {
collationCombo.setText(newSchemaInfo.getCollation());
}
} else {
new Label(tableNameComp, SWT.NONE);
}
if (erSchema.isPhysicModel()) {
//desc info
final Label tableDescLabel = new Label(group, SWT.NONE);
tableDescLabel.setText(Messages.lblTableDesc);
tableDescText = new Text(group, SWT.BORDER);
tableDescText.setTextLimit(612);
tableDescText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
// tableDescText.setLayoutData(new FillLayout());
if (newSchemaInfo != null && newSchemaInfo.getDescription() != null) {
tableDescText.setText(newSchemaInfo.getDescription());
}
tableDescText.addFocusListener(new FocusAdapter() {
public void focusGained(FocusEvent e) {
}
public void focusLost(FocusEvent e) {
CommonUITool.hideErrorBaloon(errorBaloon);
}
});
tableDescText.setEditable(true);
}
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class ViewDashboardEditorPart method createTabFolder.
public void createTabFolder(Composite parent) {
tabFolder = new CTabFolder(parent, SWT.TOP);
tabFolder.setLayout(new FillLayout());
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
tabFolder.setSimple(false);
tabFolder.setUnselectedImageVisible(true);
tabFolder.setUnselectedCloseVisible(true);
tabFolder.setBorderVisible(true);
tabFolder.setSelectionBackground(ResourceManager.getColor(136, 161, 227));
tabFolder.setSelectionForeground(ResourceManager.getColor(SWT.COLOR_BLACK));
Menu menu = new Menu(tabFolder.getShell(), SWT.POP_UP);
tabFolder.setMenu(menu);
MenuItem closeItem = new MenuItem(menu, SWT.PUSH);
closeItem.setText(Messages.tablesDetailInfoPartCloseMenu);
closeItem.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
public void widgetDefaultSelected(SelectionEvent e) {
CTabItem item = tabFolder.getSelection();
item.dispose();
}
});
MenuItem closeOthersItem = new MenuItem(menu, SWT.PUSH);
closeOthersItem.setText(Messages.tablesDetailInfoPartCloseOthersMenu);
closeOthersItem.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
public void widgetDefaultSelected(SelectionEvent e) {
CTabItem[] items = tabFolder.getItems();
CTabItem selectedItem = tabFolder.getSelection();
for (CTabItem item : items) {
if (!item.equals(selectedItem)) {
item.dispose();
}
}
}
});
MenuItem closeAllItem = new MenuItem(menu, SWT.PUSH);
closeAllItem.setText(Messages.tablesDetailInfoPartCloseAllMenu);
closeAllItem.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
public void widgetDefaultSelected(SelectionEvent e) {
CTabItem[] items = tabFolder.getItems();
for (CTabItem item : items) {
item.dispose();
}
}
});
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class ObjectInfoComposite method initDataTabItem.
/**
* Initial demo data table setting
*
*/
private void initDataTabItem() {
CTabItem dataTabItem = new CTabItem(objInfoFolder, SWT.NONE);
dataTabItem.setText(Messages.titleData);
dataTabItem.setShowClose(false);
Composite composite = new Composite(objInfoFolder, SWT.None);
dataTabItem.setControl(composite);
objInfoFolder.setSelection(dataTabItem);
composite.setLayout(new FillLayout());
demoDataTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
demoDataTable.setHeaderVisible(true);
demoDataTable.setLinesVisible(true);
CommonUITool.hackForYosemite(demoDataTable);
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class ObjectInfoComposite method initColumnTabItem.
/**
* Initial column tab item
*
*/
private void initColumnTabItem() {
CTabItem columnTabItem = new CTabItem(objInfoFolder, SWT.NONE);
columnTabItem.setText(Messages.titleColumn);
columnTabItem.setShowClose(false);
Composite composite = new Composite(objInfoFolder, SWT.None);
columnTabItem.setControl(composite);
composite.setLayout(new FillLayout());
if (isTable) {
initTableColumn(composite);
} else {
initViewColumn(composite);
}
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class ObjectInfoComposite method initDDLTabItem.
/**
* Initial ddl tab item
*
*/
private void initDDLTabItem() {
CTabItem ddlTabItem = new CTabItem(objInfoFolder, SWT.NONE);
ddlTabItem.setText(Messages.titleDDL);
ddlTabItem.setShowClose(false);
Composite composite = new Composite(objInfoFolder, SWT.NONE);
ddlTabItem.setControl(composite);
composite.setLayout(new FillLayout());
sqlText = new StyledText(composite, SWT.V_SCROLL | SWT.READ_ONLY | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP | SWT.MULTI);
/*For bug TOOLS-996*/
CommonUITool.registerCopyPasteContextMenu(sqlText, false);
}
Aggregations