org.pentaho.ui.xul.binding.Binding.Type Java Examples
The following examples show how to use
org.pentaho.ui.xul.binding.Binding.Type.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FormatStep.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 6 votes |
public void setBindings() { getBindingFactory().setBindingType( Type.ONE_WAY ); getBindingFactory().createBinding( FORMAT_DETAILS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, FORMAT_DECK_ID, SELECTED_INDEX_PROPERTY_NAME, new FormatTypeBinding( (XulListbox) getDocument().getElementById( FORMAT_DETAILS_LIST_ID ), (XulListbox) getDocument().getElementById( FORMAT_GROUPS_LIST_ID ) ) ); getBindingFactory().createBinding( FORMAT_GROUPS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, FORMAT_DECK_ID, SELECTED_INDEX_PROPERTY_NAME, new FormatTypeBinding( (XulListbox) getDocument().getElementById( FORMAT_GROUPS_LIST_ID ), (XulListbox) getDocument().getElementById( FORMAT_DETAILS_LIST_ID ) ) ); groupBinding = getBindingFactory() .createBinding( this, GROUP_FIELDS_PROPERTY_NAME, FORMAT_GROUPS_LIST_ID, ELEMENTS_PROPERTY_NAME ); detailBinding = getBindingFactory() .createBinding( this, DETAIL_FIELDS_PROPERTY_NAME, FORMAT_DETAILS_LIST_ID, ELEMENTS_PROPERTY_NAME ); detailExpressionsBinding = getBindingFactory() .createBinding( this, ALL_EXPRESSIONS_META_DATAS, FORMAT_DETAIL_AGGREGATION_ML_ID, ELEMENTS_PROPERTY_NAME ); }
Example #2
Source File: RepositoryLockController.java From pentaho-kettle with Apache License 2.0 | 6 votes |
protected void createBindings() { // Lock bindings bindingFactory.setBindingType( Type.ONE_WAY ); bindingFactory.createBinding( browseController, "repositoryObjects", "lock-menu", "!disabled", forButtons ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", "file-context-lock", "selected", checkLockedState ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", this, "menuItemEnabledState" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", "file-context-locknotes", "!disabled", checkLockedStateBool ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", "lock-context-lock", "selected", checkLockedState ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", "lock-context-lock", "!disabled", checkLockPermissions ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( browseController, "repositoryObjects", "lock-context-locknotes", "!disabled", checkLockedStateBool ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ }
Example #3
Source File: DataSourceAndQueryStep.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
public void setBindings() { getBindingFactory().setBindingType( Type.ONE_WAY ); getBindingFactory() .createBinding( this, DATASOURCES_ROOT_PROPERTY_NAME, DATASOURCES_TREE_ID, ELEMENTS_PROPERTY_NAME ); getBindingFactory() .createBinding( DATASOURCES_TREE_ID, SELECTED_ITEM_PROPERTY_NAME, this, CURRENT_QUERY_PROPERTY_NAME, new CurrentQueryBindingConverter() ); getBindingFactory() .createBinding( DATASOURCES_TREE_ID, SELECTED_ROWS_PROPERTY_NAME, EDIT_DATASOURCES_BTN_ID, ENABLED_PROPERTY_NAME, indiciesToBooleanBindingConverter ); getBindingFactory().createBinding( DATASOURCES_TREE_ID, SELECTED_ROWS_PROPERTY_NAME, REMOVE_DATASOURCES_BTN_ID, ENABLED_PROPERTY_NAME, indiciesToBooleanBindingConverter ); }
Example #4
Source File: XulPreviewRowsController.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public void init() { createPreviewRows(); this.bf.setDocument( super.document ); this.bf.setBindingType( Type.ONE_WAY ); this.rowCountBinding = this.bf.createBinding( this, "rowCount", "rowCountLabel", "value" ); fireBindings(); }
Example #5
Source File: RepositoryConfigController.java From pentaho-kettle with Apache License 2.0 | 5 votes |
private void createBindings() { repositoryConfigDialog = (XulDialog) document.getElementById( "repository-config-dialog" );//$NON-NLS-1$ url = (XulTextbox) document.getElementById( "repository-url" );//$NON-NLS-1$ name = (XulTextbox) document.getElementById( "repository-name" );//$NON-NLS-1$ id = (XulTextbox) document.getElementById( "repository-id" );//$NON-NLS-1$ modificationComments = (XulCheckbox) document.getElementById( "repository-modification-comments" );//$NON-NLS-1$ okButton = (XulButton) document.getElementById( "repository-config-dialog_accept" ); //$NON-NLS-1$ bf.setBindingType( Type.BI_DIRECTIONAL ); bf.createBinding( model, "url", url, "value" );//$NON-NLS-1$ //$NON-NLS-2$ bf.createBinding( model, "name", name, "value" );//$NON-NLS-1$ //$NON-NLS-2$ bf.createBinding( model, "id", id, "value" );//$NON-NLS-1$ //$NON-NLS-2$ bf.createBinding( model, "modificationComments", modificationComments, "checked" );//$NON-NLS-1$ //$NON-NLS-2$ bf.setBindingType( Type.ONE_WAY ); bf.createBinding( model, "valid", okButton, "!disabled" );//$NON-NLS-1$ //$NON-NLS-2$ }
Example #6
Source File: LayoutStep.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 4 votes |
public void setBindings() { // Create the binding converters final ListSelectionToBooleanConverter listToBooleanConverter = new ListSelectionToBooleanConverter(); final MoveUpBindingConverter moveUpBindingConverter = new MoveUpBindingConverter(); // Bindings for the lists getBindingFactory().setBindingType( Type.BI_DIRECTIONAL ); selectableFieldsBinding = getBindingFactory() .createBinding( this, SELECTABLE_FIELDS_PROPERTY_NAME, AVAILABLE_COLUMNS_LIST_ID, ELEMENTS_PROPERTY_NAME ); groupsBinding = getBindingFactory() .createBinding( this, GROUP_FIELDS_PROPERTY_NAME, GROUP_FIELDS_LIST_ID, ELEMENTS_PROPERTY_NAME ); detailsBinding = getBindingFactory() .createBinding( this, DETAIL_FIELDS_PROPERTY_NAME, DETAIL_FIELDS_LIST_ID, ELEMENTS_PROPERTY_NAME ); // Bindings for the move to fields and groups buttons getBindingFactory().setBindingType( Type.ONE_WAY ); getBindingFactory().createBinding( AVAILABLE_COLUMNS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_TO_GROUPS_BTN_ID, NOT_DISABLED_PROPERTY_NAME, listToBooleanConverter ); getBindingFactory() .createBinding( AVAILABLE_COLUMNS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_TO_DETAILS_BTN_ID, NOT_DISABLED_PROPERTY_NAME, listToBooleanConverter ); // Bindings for the buttons on the groups panel getBindingFactory().setBindingType( Type.ONE_WAY ); getBindingFactory().createBinding( GROUP_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_GROUP_UP_BTN_ID, NOT_DISABLED_PROPERTY_NAME, moveUpBindingConverter ); getBindingFactory().createBinding( GROUP_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_GROUP_DOWN_BTN_ID, NOT_DISABLED_PROPERTY_NAME, new MoveDownBindingConverter( (XulListbox) getDocument().getElementById( GROUP_FIELDS_LIST_ID ) ) ); getBindingFactory().createBinding( GROUP_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, REMOVE_GROUP_ITEM_BTN_ID, NOT_DISABLED_PROPERTY_NAME, listToBooleanConverter ); // Bindings for the buttons on the detail panel getBindingFactory().setBindingType( Type.ONE_WAY ); getBindingFactory().createBinding( DETAIL_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_DETAIL_UP_BTN_ID, NOT_DISABLED_PROPERTY_NAME, moveUpBindingConverter ); getBindingFactory().createBinding( DETAIL_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, MOVE_DETAIL_DOWN_BTN_ID, NOT_DISABLED_PROPERTY_NAME, new MoveDownBindingConverter( (XulListbox) getDocument().getElementById( DETAIL_FIELDS_LIST_ID ) ) ); getBindingFactory().createBinding( DETAIL_FIELDS_LIST_ID, SELECTED_INDICES_PROPERTY_NAME, REMOVE_DETAIL_ITEM_BTN_ID, NOT_DISABLED_PROPERTY_NAME, listToBooleanConverter ); // Binding for the preview button getBindingFactory().setBindingType( Type.ONE_WAY ); previewBinding = getBindingFactory() .createBinding( this, PREVIEWABLE_PROPERTY_NAME, PREVIEW_BUTTON_ID, NOT_DISABLED_PROPERTY_NAME ); }
Example #7
Source File: SpoonLockController.java From pentaho-kettle with Apache License 2.0 | 4 votes |
protected void init() { try { if ( ( Spoon.getInstance().getRepository() != null ) && ( Spoon.getInstance().getRepository().hasService( IAbsSecurityProvider.class ) ) ) { IAbsSecurityProvider securityService = (IAbsSecurityProvider) Spoon.getInstance().getRepository().getService( IAbsSecurityProvider.class ); setCreateAllowed( allowedActionsContains( securityService, IAbsSecurityProvider.CREATE_CONTENT_ACTION ) ); } shell = ( ( (Spoon) SpoonFactory.getInstance() ).getShell() ); XulDomContainer container = getXulDomContainer(); bindingFactory = new DefaultBindingFactory(); bindingFactory.setDocument( container.getDocumentRoot() ); bindingFactory.setBindingType( Type.ONE_WAY ); bindingFactory.createBinding( this, "activeMetaUnlocked", "lock-context-locknotes", "disabled" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ bindingFactory.createBinding( this, "lockingNotAllowed", "lock-context-lock", "disabled" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ // Get trans* object to gain access to the *Meta object to determine if we are initially locked or not // Try transformation if ( container.getEventHandlers().containsKey( "transgraph" ) ) { //$NON-NLS-1$ workingMeta = ( (TransGraph) container.getEventHandler( "transgraph" ) ).getMeta(); //$NON-NLS-1$ } else if ( container.getEventHandlers().containsKey( "jobgraph" ) ) { //$NON-NLS-1$ workingMeta = ( (JobGraph) container.getEventHandler( "jobgraph" ) ).getMeta(); //$NON-NLS-1$ } RepositoryLock repoLock = fetchRepositoryLock( workingMeta ); if ( repoLock != null ) { XulMenuitem lockMenuItem = (XulMenuitem) container.getDocumentRoot().getElementById( "lock-context-lock" ); //$NON-NLS-1$ lockMenuItem.setSelected( true ); // Permit locking/unlocking if the user owns the lock if ( Spoon.getInstance().getRepository() instanceof PurRepository ) { setLockingAllowed( new UnifiedRepositoryLockService( ( (PurRepository) Spoon.getInstance().getRepository() ).getUnderlyingRepository() ) .canUnlockFileById( workingMeta.getObjectId() ) ); } else { setLockingAllowed( repoLock.getLogin().equalsIgnoreCase( Spoon.getInstance().getRepository().getUserInfo().getLogin() ) ); } } else { setLockingAllowed( true ); } firePropertyChange( "activeMetaUnlocked", null, repoLock == null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } catch ( Exception e ) { log.error( BaseMessages.getString( PKG, "LockController.NoLockingSupport" ), e );//$NON-NLS-1$ new ErrorDialog( ( (Spoon) SpoonFactory.getInstance() ).getShell(), BaseMessages.getString( PKG, "Dialog.Error" ), e.getMessage(), e ); //$NON-NLS-1$ } }
Example #8
Source File: XulSupressingBindingFactoryProxy.java From pentaho-aggdesigner with GNU General Public License v2.0 | 4 votes |
public void setBindingType(Type type) { proxiedBindingFactory.setBindingType(type); }