本文整理汇总了Java中org.pentaho.ui.xul.containers.XulTree类的典型用法代码示例。如果您正苦于以下问题:Java XulTree类的具体用法?Java XulTree怎么用?Java XulTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XulTree类属于org.pentaho.ui.xul.containers包,在下文中一共展示了XulTree类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getControls
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
@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);
}
}
}
示例2: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
private void createBindings() {
refreshConnectionList();
connectionsTable = (XulTree) document.getElementById("connections-table"); //$NON-NLS-1$
// Bind the connection table to a list of connections
bf.setBindingType(Binding.Type.ONE_WAY);
try {
bf.createBinding(dbConnectionList, "children", connectionsTable, "elements").fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$
(bindButtonNew = bf.createBinding(this, "repReadOnly", "connections-new", "disabled")).fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
(bindButtonEdit = bf.createBinding(this, "repReadOnly", "connections-edit", "disabled")).fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
(bindButtonRemove = bf.createBinding(this, "repReadOnly", "connections-remove", "disabled")).fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (repository != null) {
bf.createBinding(connectionsTable, "selectedItems", this, "enableButtons"); //$NON-NLS-1$ //$NON-NLS-2$
}
} catch (Exception ex) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException(ex);
}
}
示例3: createNewExtText
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
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;
}
extText = new TextVar(variableSpace, parentComposite, style);
textBox = extText.getTextWidget();
addKeyListener(textBox);
setManagedObject(extText);
}
示例4: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
private void createBindings() {
refreshConnectionList();
connectionsTable = (XulTree) document.getElementById( "connections-table" );
// Bind the connection table to a list of connections
bf.setBindingType( Binding.Type.ONE_WAY );
//CHECKSTYLE:LineLength:OFF
try {
bf.createBinding( dbConnectionList, "children", connectionsTable, "elements" ).fireSourceChanged();
( bindButtonNew = bf.createBinding( this, "repReadOnly", "connections-new", "disabled" ) ).fireSourceChanged();
( bindButtonEdit = bf.createBinding( this, "repReadOnly", "connections-edit", "disabled" ) ).fireSourceChanged();
( bindButtonRemove = bf.createBinding( this, "repReadOnly", "connections-remove", "disabled" ) ).fireSourceChanged();
if ( repository != null ) {
bf.createBinding( connectionsTable, "selectedItems", this, "selectedConnections" );
}
} catch ( Exception ex ) {
if ( mainController == null || !mainController.handleLostRepository( ex ) ) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException( ex );
}
}
}
示例5: setUp
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
// a tricky initialisation - first inject private fields
controller = new ConnectionsController();
connectionsTable = mock( XulTree.class );
FieldUtils.writeDeclaredField( controller, "connectionsTable", connectionsTable, true );
// and then spy the controller
controller = spy( controller );
databaseDialog = mock( DatabaseDialog.class );
doReturn( databaseDialog ).when( controller ).getDatabaseDialog();
databaseMeta = mock( DatabaseMeta.class );
doReturn( databaseMeta ).when( databaseDialog ).getDatabaseMeta();
doNothing().when( controller ).refreshConnectionList();
doNothing().when( controller ).showAlreadyExistsMessage();
repository = mock( Repository.class );
controller.init( repository );
}
示例6: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void createBindings() {
refreshPartitions();
try {
partitionsTable = (XulTree) document.getElementById("partitions-table"); //$NON-NLS-1$
bf.setBindingType(Binding.Type.ONE_WAY);
bf.createBinding(partitionList, "children", partitionsTable, "elements").fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding(partitionsTable, "selectedItems", this, "enableButtons"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException(e);
}
}
示例7: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void createBindings() {
refreshClusters();
try {
clustersTable = (XulTree) document.getElementById("clusters-table"); //$NON-NLS-1$
bf.setBindingType(Binding.Type.ONE_WAY);
bf.createBinding(clusterList, "children", clustersTable, "elements").fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding(clustersTable, "selectedItems", this, "enableButtons"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException(e);
}
}
示例8: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void createBindings() {
refreshSlaves();
try {
slavesTable = (XulTree) document.getElementById("slaves-table"); //$NON-NLS-1$
bf.setBindingType(Binding.Type.ONE_WAY);
bf.createBinding(slaveList, "children", slavesTable, "elements").fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding(slavesTable, "selectedItems", this, "enableButtons"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException(e);
}
}
示例9: init
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void init() {
workingStepname = stepname;
metaMapper = new RulesMetaMapper();
metaMapper.loadMeta((RulesMeta)baseStepMeta);
// Set dialog values
((XulTextbox)document.getElementById("step-name")).setValue(getStepName());
((XulTextbox)document.getElementById("rule-file")).setValue(metaMapper.getRuleFile());
((XulTextbox)document.getElementById("rule-definition")).setValue(metaMapper.getRuleDefinition());
((XulTree)document.getElementById("fields-table")).setElements(metaMapper.getColumnList());
// Set the initial dialog state
if(metaMapper.getRuleDefinition() != null && !metaMapper.getRuleDefinition().equals("")) {
setRuleSource("definition");
((XulRadio)document.getElementById("rule-definition-radio-button")).setSelected(true);
} else {
setRuleSource("file");
((XulRadio)document.getElementById("rule-file-radio-button")).setSelected(true);
}
// Bind data objects to UI
bf.setBindingType(Binding.Type.ONE_WAY);
try {
bf.createBinding("step-name", "value", this, "stepName");
bf.createBinding("rule-file", "value", metaMapper, "ruleFile");
bf.createBinding("rule-definition", "value", metaMapper, "ruleDefinition");
bf.createBinding(metaMapper.getColumnList(), "children", "fields-table", "elements").fireSourceChanged();
// TODO: Add converter to clear out opposing text box
bf.createBinding("rule-file-radio-button", "selected", "rule-file", "!disabled").fireSourceChanged();
bf.createBinding("rule-file-radio-button", "selected", "rule-definition", "disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-definition", "!disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-file", "disabled").fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
}
示例10: open
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
/**
* 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);
xulDialogComponent.show(); //Attention: onload: loadConnectionData() is called here the second time, see above 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 = Const.isEmpty(databaseMeta.getName()) ? null : databaseMeta.getName();
} else {
databaseName = null;
}
} catch (Exception e) {
new ErrorDialog(parentShell, BaseMessages.getString(PKG, "XulDatabaseDialog.Error.Title"), //$NON-NLS-1$
BaseMessages.getString(PKG, "XulDatabaseDialog.Error.Dialog"), e); //$NON-NLS-1$
return null;
}
return databaseName;
}
示例11: init
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void init() {
workingStepname = stepname;
metaMapper = new RulesAccumulatorMetaMapper();
metaMapper.loadMeta((RulesAccumulatorMeta)baseStepMeta);
// Set dialog values
((XulTextbox)document.getElementById("step-name")).setValue(getStepName());
((XulTextbox)document.getElementById("rule-file")).setValue(metaMapper.getRuleFile());
((XulTextbox)document.getElementById("rule-definition")).setValue(metaMapper.getRuleDefinition());
((XulTree)document.getElementById("fields-table")).setElements(metaMapper.getColumnList());
// Set the initial dialog state
if(metaMapper.getRuleDefinition() != null && !metaMapper.getRuleDefinition().equals("")) {
setRuleSource("definition");
((XulRadio)document.getElementById("rule-definition-radio-button")).setSelected(true);
} else {
setRuleSource("file");
((XulRadio)document.getElementById("rule-file-radio-button")).setSelected(true);
}
// Bind data objects to UI
bf.setBindingType(Binding.Type.ONE_WAY);
try {
bf.createBinding("step-name", "value", this, "stepName");
bf.createBinding("rule-file", "value", metaMapper, "ruleFile");
bf.createBinding("rule-definition", "value", metaMapper, "ruleDefinition");
bf.createBinding(metaMapper.getColumnList(), "children", "fields-table", "elements").fireSourceChanged();
// TODO: Add converter to clear out opposing text box
bf.createBinding("rule-file-radio-button", "selected", "rule-file", "!disabled").fireSourceChanged();
bf.createBinding("rule-file-radio-button", "selected", "rule-definition", "disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-definition", "!disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-file", "disabled").fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
}
示例12: init
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void init() {
workingStepname = stepname;
metaMapper = new RulesExecutorMetaMapper();
metaMapper.loadMeta((RulesExecutorMeta)baseStepMeta);
// Set dialog values
((XulTextbox)document.getElementById("step-name")).setValue(getStepName());
((XulTextbox)document.getElementById("rule-file")).setValue(metaMapper.getRuleFile());
((XulTextbox)document.getElementById("rule-definition")).setValue(metaMapper.getRuleDefinition());
((XulTree)document.getElementById("fields-table")).setElements(metaMapper.getColumnList());
// Set the initial dialog state
if(metaMapper.getRuleDefinition() != null && !metaMapper.getRuleDefinition().equals("")) {
setRuleSource("definition");
((XulRadio)document.getElementById("rule-definition-radio-button")).setSelected(true);
} else {
setRuleSource("file");
((XulRadio)document.getElementById("rule-file-radio-button")).setSelected(true);
}
// Bind data objects to UI
bf.setBindingType(Binding.Type.ONE_WAY);
try {
bf.createBinding("step-name", "value", this, "stepName");
bf.createBinding("rule-file", "value", metaMapper, "ruleFile");
bf.createBinding("rule-definition", "value", metaMapper, "ruleDefinition");
bf.createBinding(metaMapper.getColumnList(), "children", "fields-table", "elements").fireSourceChanged();
// TODO: Add converter to clear out opposing text box
bf.createBinding("rule-file-radio-button", "selected", "rule-file", "!disabled").fireSourceChanged();
bf.createBinding("rule-file-radio-button", "selected", "rule-definition", "disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-definition", "!disabled").fireSourceChanged();
bf.createBinding("rule-definition-radio-button", "selected", "rule-file", "disabled").fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
}
示例13: createPreviewRows
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
/**
* TODO: replace this method with XUL bindings
* <p/>
* This is a bad bad method. We need a way to load the column definitions and
* data through standard XUL bindings.
*
* @param data
* @param columns
*/
protected void createPreviewRows( List<Object[]> data, List<String> columns ) {
// Adds table rows.
Object[] theObj = null;
XulTreeRow theRow = null;
Object theValue = null;
SwingTreeCell theCell = null;
XulTree table = (XulTree) super.document.getElementById( "tableData" );
table.getRootChildren().removeAll();
Iterator<Object[]> theItr = data.iterator();
while ( theItr.hasNext() ) {
theObj = theItr.next();
theRow = table.getRootChildren().addNewRow();
for ( int i = 0; i < theObj.length; i++ ) {
theValue = theObj[i];
theCell = new SwingTreeCell( null );
theCell.setLabel( theValue == null ? "" : theValue.toString() );
theRow.addCell( theCell );
}
}
// Adds table columns.
SwingTreeCol theColumn = null;
SwingTreeCols theColumns = new SwingTreeCols( null, table, null, null );
for ( int i = 0; i < columns.size(); i++ ) {
theColumn = new SwingTreeCol( null, null, null, null );
theColumn.setWidth( 100 );
theColumn.setLabel( columns.get( i ) );
theColumns.addColumn( theColumn );
}
table.setColumns( theColumns );
table.update();
}
示例14: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void createBindings() {
refreshPartitions();
try {
partitionsTable = (XulTree) document.getElementById( "partitions-table" );
bf.setBindingType( Binding.Type.ONE_WAY );
bf.createBinding( partitionList, "children", partitionsTable, "elements" ).fireSourceChanged();
bf.createBinding( partitionsTable, "selectedItems", this, "enableButtons" );
} catch ( Exception e ) {
if ( mainController == null || !mainController.handleLostRepository( e ) ) {
// convert to runtime exception so it bubbles up through the UI
throw new RuntimeException( e );
}
}
}
示例15: createBindings
import org.pentaho.ui.xul.containers.XulTree; //导入依赖的package包/类
public void createBindings() {
refreshClusters();
try {
clustersTable = (XulTree) document.getElementById( "clusters-table" );
bf.setBindingType( Binding.Type.ONE_WAY );
bf.createBinding( clusterList, "children", clustersTable, "elements" ).fireSourceChanged();
bf.createBinding( clustersTable, "selectedItems", this, "enableButtons" );
} catch ( Exception e ) {
if ( mainController == null || !mainController.handleLostRepository( e ) ) {
throw new RuntimeException( e );
}
}
}