use of com.twinsoft.convertigo.eclipse.dialogs.CouchVariablesComposite in project convertigo by convertigo.
the class ComponentInfoWizardPage method createControl.
public void createControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
container.setLayout(layout);
layout.numColumns = 2;
layout.verticalSpacing = 9;
Label label = new Label(container, SWT.NULL);
label.setText("&Name:");
beanName = new Text(container, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
beanName.setLayoutData(gd);
beanName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged(false);
}
});
if (parentObject instanceof CouchDbConnector || parentObject instanceof FullSyncConnector) {
couchVariablesComposite = new CouchVariablesComposite(container, SWT.V_SCROLL);
GridData couchVarData = new GridData(GridData.FILL_BOTH);
couchVarData.horizontalSpan = 2;
couchVariablesComposite.setLayoutData(couchVarData);
} else {
tree = new Tree(container, SWT.SINGLE | SWT.BORDER);
tree.setHeaderVisible(false);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.verticalSpan = 20;
gridData.horizontalSpan = 2;
tree.setLayoutData(gridData);
tree.addListener(SWT.Selection, new Listener() {
public void handleEvent(final Event event) {
TreeItem item = (TreeItem) event.item;
treeItemName = item.getText();
String suffix = getBeanName().endsWith(ScHandlerStatement.EVENT_ENTRY_HANDLER) ? ScHandlerStatement.EVENT_ENTRY_HANDLER : getBeanName().endsWith(ScHandlerStatement.EVENT_EXIT_HANDLER) ? ScHandlerStatement.EVENT_EXIT_HANDLER : "";
setBeanName("on" + treeItemName + suffix);
dialogChanged(true);
}
});
tree.setVisible(false);
}
initialize();
dialogChanged(true);
setControl(container);
}
use of com.twinsoft.convertigo.eclipse.dialogs.CouchVariablesComposite in project convertigo by convertigo.
the class ComponentInfoWizardPage method createControl.
public void createControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
container.setLayout(layout);
layout.numColumns = 2;
layout.verticalSpacing = 9;
Label label = new Label(container, SWT.NULL);
label.setText("&Name:");
beanName = new Text(container, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
beanName.setLayoutData(gd);
beanName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged(false);
}
});
if (parentObject instanceof CouchDbConnector || parentObject instanceof FullSyncConnector) {
couchVariablesComposite = new CouchVariablesComposite(container, SWT.V_SCROLL);
GridData couchVarData = new GridData(GridData.FILL_BOTH);
couchVarData.horizontalSpan = 2;
couchVariablesComposite.setLayoutData(couchVarData);
} else {
tree = new Tree(container, SWT.SINGLE | SWT.BORDER);
tree.setHeaderVisible(false);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.verticalSpan = 20;
gridData.horizontalSpan = 2;
tree.setLayoutData(gridData);
tree.addListener(SWT.Selection, new Listener() {
public void handleEvent(final Event event) {
TreeItem item = (TreeItem) event.item;
treeItemName = item.getText();
String suffix = getBeanName().endsWith(ScHandlerStatement.EVENT_ENTRY_HANDLER) ? ScHandlerStatement.EVENT_ENTRY_HANDLER : getBeanName().endsWith(ScHandlerStatement.EVENT_EXIT_HANDLER) ? ScHandlerStatement.EVENT_EXIT_HANDLER : "";
setBeanName("on" + treeItemName + suffix);
dialogChanged(true);
}
});
tree.setVisible(false);
}
initialize();
dialogChanged(true);
setControl(container);
}
use of com.twinsoft.convertigo.eclipse.dialogs.CouchVariablesComposite in project convertigo by convertigo.
the class ObjectInfoWizardPage method createControl.
public void createControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
container.setLayout(layout);
layout.numColumns = 2;
layout.verticalSpacing = 9;
Label label = new Label(container, SWT.NULL);
label.setText("&Name:");
beanName = new Text(container, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
beanName.setLayoutData(gd);
beanName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged(false);
}
});
if (parentObject instanceof CouchDbConnector || parentObject instanceof FullSyncConnector) {
couchVariablesComposite = new CouchVariablesComposite(container, SWT.V_SCROLL);
GridData couchVarData = new GridData(GridData.FILL_BOTH);
couchVarData.horizontalSpan = 2;
couchVariablesComposite.setLayoutData(couchVarData);
} else {
tree = new Tree(container, SWT.SINGLE | SWT.BORDER);
tree.setHeaderVisible(false);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.verticalSpan = 20;
gridData.horizontalSpan = 2;
tree.setLayoutData(gridData);
tree.addListener(SWT.Selection, new Listener() {
public void handleEvent(final Event event) {
TreeItem item = (TreeItem) event.item;
treeItemName = item.getText();
String suffix = getBeanName().endsWith(ScHandlerStatement.EVENT_ENTRY_HANDLER) ? ScHandlerStatement.EVENT_ENTRY_HANDLER : getBeanName().endsWith(ScHandlerStatement.EVENT_EXIT_HANDLER) ? ScHandlerStatement.EVENT_EXIT_HANDLER : "";
setBeanName("on" + treeItemName + suffix);
dialogChanged(true);
}
});
tree.setVisible(false);
}
initialize();
dialogChanged(true);
setControl(container);
}
Aggregations