本文整理汇总了Java中org.pentaho.ui.xul.binding.Binding类的典型用法代码示例。如果您正苦于以下问题:Java Binding类的具体用法?Java Binding怎么用?Java Binding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Binding类属于org.pentaho.ui.xul.binding包,在下文中一共展示了Binding类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
private void createBindings() {
XulLabel pathLabel = (XulLabel) document.getElementById( "path" );
XulLabel branchLabel = (XulLabel) document.getElementById( "branchLabel" );
XulTextbox diffText = (XulTextbox) document.getElementById( "diff" );
authorNameTextbox = (XulTextbox) document.getElementById( "author-name" );
commitMessageTextbox = (XulTextbox) document.getElementById( "commit-message" );
bf.setDocument( this.getXulDomContainer().getDocumentRoot() );
bf.setBindingType( Binding.Type.ONE_WAY );
bf.createBinding( this, "path", pathLabel, "value" );
branchBinding = bf.createBinding( this, "branch", branchLabel, "value" );
diffBinding = bf.createBinding( this, "diff", diffText, "value" );
revisionBinding = bf.createBinding( this, "revisions", revisionTable, "elements" );
changedBinding = bf.createBinding( this, "changedFiles", changedTable, "elements" );
bf.createBinding( revisionTable, "selectedItems", this, "selectedRevisions" );
bf.createBinding( changedTable, "selectedItems", this, "selectedChangedFiles" );
bf.setBindingType( Binding.Type.BI_DIRECTIONAL );
bf.createBinding( this, "authorName", authorNameTextbox, "value" );
bf.createBinding( this, "commitMessage", commitMessageTextbox, "value" );
}
示例2: DockerTransExecutorDialog
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public DockerTransExecutorDialog(Shell parent, Object in, TransMeta transMeta, String stepname) {
super("com/github/brosander/kettle/docker/dockerTransExecutorDialog.xul", parent, (BaseStepMeta) in, transMeta, stepname);
loadMeta((DockerTransExecutorMeta) baseStepMeta);
this.stepname = stepname;
tempStepName = stepname;
this.transMeta = transMeta;
try {
bf.setBindingType(Binding.Type.BI_DIRECTIONAL);
bf.createBinding(this, "tempStepName", "step-name", "value").fireSourceChanged();
bf.createBinding(this, DockerTransExecutorMeta.IMAGE, "image", "value").fireSourceChanged();
bf.createBinding(this, DockerTransExecutorMeta.TRANSFORMATION, "transformation", "value").fireSourceChanged();
bf.createBinding(this, DockerTransExecutorMeta.KILL_CONTAINER, "killContainer", "checked").fireSourceChanged();
bf.createBinding(this, DockerTransExecutorMeta.REMOVE_CONTAINER, "removeContainer", "checked").fireSourceChanged();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例3: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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);
}
}
示例4: setSelectedModelerMeta
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public void setSelectedModelerMeta(EngineMetaInterface meta){
this.meta = (HasXulController) meta;
if(itemBinding != null){
itemBinding.destroyBindings();
}
if(meta != null){
bf.setBindingType(Binding.Type.ONE_WAY);
itemBinding = bf.createBinding(this.meta.getController(), "propVisible", this, "propVisible");
try {
itemBinding.fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
}
}
示例5: setSelectedModelerMeta
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public void setSelectedModelerMeta(ModelerEngineMeta meta){
this.meta = meta;
if(itemBinding != null){
itemBinding.destroyBindings();
}
if(meta != null){
bf.setBindingType(Binding.Type.ONE_WAY);
itemBinding = bf.createBinding(meta.getController(), "propVisible", this, "propVisible");
try {
itemBinding.fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
}
}
示例6: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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 );
}
}
}
示例7: init
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public void init() {
try {
bf.setDocument( container.getDocumentRoot() );
mainController = (MainController) this.getXulDomContainer().getEventHandler( "mainController" );
bf.setBindingType( Binding.Type.ONE_WAY );
bf.createBinding( objects, "children", "file-list", "elements" ).fireSourceChanged();
} catch ( Exception e ) {
if ( mainController == null || !mainController.handleLostRepository( e ) ) {
new ErrorDialog( (Shell) container.getOuterContext(),
BaseMessages.getString( PKG, "FileOverwriteDialog.ErrorDialog.Title" ),
BaseMessages.getString( PKG, "FileOverwriteDialog.ErrorDialog.Message" ), e );
}
}
}
示例8: FTLDialog
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public FTLDialog( Shell parent, Object in, TransMeta tr, String sname ) {
super("com/github/brosander/kettle/plugins/ftl/ftlDialog.xul", parent, (BaseStepMeta) in, tr, sname);
loadMeta((FTLMeta) baseStepMeta);
stepname = sname;
tempStepName = sname;
transMeta = tr;
try {
List<ValueMetaInterface> rawInterfaces = Collections.unmodifiableList(transMeta.getPrevStepFields(sname).getValueMetaList());
valueMetaInterfaces = new ArrayList<FTLValueMetaEventSourceAdapter>(rawInterfaces.size());
for (ValueMetaInterface vmi : rawInterfaces) {
valueMetaInterfaces.add(new FTLValueMetaEventSourceAdapter(vmi));
}
bf.setBindingType(Binding.Type.ONE_WAY);
bf.createBinding(this, "valueMetaInterfaces", "fieldsTable", "elements").fireSourceChanged();
bf.createBinding(this, FTLMeta.USE_TEMPLATE_FILE_FIELD, "template-string", "disabled").fireSourceChanged();
bf.createBinding(this, FTLMeta.USE_TEMPLATE_FILE_FIELD, "template-file", "!disabled").fireSourceChanged();
bf.createBinding(this, FTLMeta.USE_TEMPLATE_FILE_FIELD, "template-file-browse", "!disabled").fireSourceChanged();
bf.createBinding(this, FTLMeta.USE_TEMPLATE_FILE_FIELD, "template-file-encoding", "!disabled").fireSourceChanged();
bf.setBindingType(Binding.Type.BI_DIRECTIONAL);
bf.createBinding(this, "tempStepName", "step-name", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.OUTPUT_ID_FIELD_NAME_FIELD, "output-field", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.FIRST_VARIABLE_NAME, "first-variable-field", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.LAST_VARIABLE_NAME, "last-variable-field", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.TEMPLATE_STRING_FIELD, "template-string", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.TEMPLATE_FILE_FIELD, "template-file", "value").fireSourceChanged();
bf.createBinding(this, FTLMeta.USE_TEMPLATE_FILE_FIELD, "template-usefile-checkbox", "checked").fireSourceChanged();
bf.createBinding(this, FTLMeta.TEMPLATE_FILE_ENCODING_FIELD, "template-file-encoding", "value").fireSourceChanged();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例9: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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);
}
}
示例10: init
import org.pentaho.ui.xul.binding.Binding; //导入依赖的package包/类
public void init() {
try {
bf.setDocument(container.getDocumentRoot());
bf.setBindingType(Binding.Type.ONE_WAY);
bf.createBinding(objects, "children", "file-list", "elements").fireSourceChanged(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (Exception e) {
new ErrorDialog((Shell)container.getOuterContext(), BaseMessages.getString(PKG, "FileOverwriteDialog.ErrorDialog.Title"), BaseMessages.getString(PKG, "FileOverwriteDialog.ErrorDialog.Message"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例11: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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);
}
}
示例12: createBindings
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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);
}
}
示例13: init
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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();
}
}
示例14: init
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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();
}
}
示例15: init
import org.pentaho.ui.xul.binding.Binding; //导入依赖的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();
}
}