use of org.pentaho.ui.xul.containers.XulTree in project pentaho-kettle by pentaho.
the class DataOverrideHandler method getControls.
@Override
protected void getControls() {
super.getControls();
XulTextbox[] boxes = new XulTextbox[] { hostNameBox, databaseNameBox, portNumberBox, userNameBox, passwordBox, customDriverClassBox, customUrlBox, dataTablespaceBox, indexTablespaceBox, poolSizeBox, maxPoolSizeBox, languageBox, systemNumberBox, clientBox };
for (int i = 0; i < boxes.length; i++) {
XulTextbox xulTextbox = boxes[i];
if ((xulTextbox != null) && (xulTextbox instanceof ExtTextbox)) {
ExtTextbox ext = (ExtTextbox) xulTextbox;
ext.setVariableSpace(databaseMeta);
}
}
XulTree[] trees = new XulTree[] { poolParameterTree, clusterParameterTree, optionsParameterTree };
for (int i = 0; i < trees.length; i++) {
XulTree xulTree = trees[i];
if (xulTree != null) {
xulTree.setData(databaseMeta);
}
}
}
use of org.pentaho.ui.xul.containers.XulTree in project pentaho-kettle by pentaho.
the class ExtMenuList method createNewExtMenuList.
private void createNewExtMenuList(XulComponent parent) {
xulParent = parent;
if ((xulParent != null) && (xulParent instanceof XulTree)) {
variableSpace = (DatabaseMeta) ((XulTree) xulParent).getData();
} else {
variableSpace = new DatabaseMeta();
style = SWT.BORDER;
}
extCombo = new ComboVar(variableSpace, (Composite) parent.getManagedObject(), style);
combobox = extCombo.getCComboWidget();
setManagedObject(extCombo);
combobox.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
fireSelectedEvents();
}
});
combobox.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent modifyEvent) {
fireModifiedEvents();
}
});
}
use of org.pentaho.ui.xul.containers.XulTree in project pentaho-kettle by pentaho.
the class ExtTextbox method createNewExtText.
private void createNewExtText(XulComponent parent) {
xulParent = parent;
if ((xulParent != null) && (xulParent instanceof XulTree)) {
variableSpace = (DatabaseMeta) ((XulTree) xulParent).getData();
} else {
variableSpace = new DatabaseMeta();
style = SWT.BORDER;
}
if (type == TextType.PASSWORD) {
extText = new PasswordTextVar(variableSpace, parentComposite, style);
} else {
extText = new TextVar(variableSpace, parentComposite, style);
}
textBox = extText.getTextWidget();
addKeyListener(textBox);
setManagedObject(extText);
}
use of org.pentaho.ui.xul.containers.XulTree in project data-access by pentaho.
the class StageDataStep method clearColumnGrid.
public void clearColumnGrid() throws XulException {
// $NON-NLS-1$
XulTree tree = (XulTree) document.getElementById("csvModelDataTable");
tree.setElements(null);
tree.update();
}
use of org.pentaho.ui.xul.containers.XulTree in project pentaho-kettle by pentaho.
the class XulDatabaseDialog method open.
/**
* Opens the XUL database dialog
*
* @return databaseName (or NULL on error or cancel) TODO: Fix deprecation warning in v3.2 by using the new dialog
*/
public String open() {
if (databaseDialogInstance == null) {
createDialog();
}
try {
// PDI-5088 clear previous options selections since we are re-using the dialog
XulTree tree = (XulTree) xulDialogComponent.getDocument().getRootElement().getElementById("options-parameter-tree");
tree.getRootChildren().removeAll();
dataHandler.setData(databaseMeta);
// Attention: onload: loadConnectionData() is called here the second time, see above
xulDialogComponent.show();
// for first time
// caught with a HACK in DataHandler.loadConnectionData()
databaseMeta = (DatabaseMeta) dataHandler.getData();
// keep the original id
if (databaseMeta != null) {
databaseMeta.setObjectId(databaseMetaObjectId);
databaseName = Utils.isEmpty(databaseMeta.getName()) ? null : databaseMeta.getName();
} else {
databaseName = null;
}
} catch (Exception e) {
new ErrorDialog(parentShell, BaseMessages.getString(PKG, "XulDatabaseDialog.Error.Title"), BaseMessages.getString(PKG, "XulDatabaseDialog.Error.Dialog"), e);
return null;
}
return databaseName;
}
Aggregations