org.pentaho.ui.xul.containers.XulVbox Java Examples

The following examples show how to use org.pentaho.ui.xul.containers.XulVbox. 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: AbstractWizardStep.java    From pentaho-reporting with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * @throws XulException
 */
public void createPresentationComponent( final XulDomContainer mainWizardContainer ) throws XulException {
  final XulVbox stepContainer = (XulVbox) mainWizardContainer.getDocumentRoot().getElementById( STEP_CONTAINER );

  XulHbox row = (XulHbox) mainWizardContainer.getDocumentRoot().createElement( XUL_HBOX_TYPE );

  // Create and add the activeImage to the row (goes in the first column)
  stepImage = (XulImage) mainWizardContainer.getDocumentRoot().createElement( XUL_IMAGE_TYPE );
  stepImage.setSrc( STEP_IMAGE_SRC );
  stepImage.setId( this.getStepName() );
  stepImage.setVisible( false );
  row.addChild( stepImage );

  // Create and add the text label to the row (goes in the second column)
  stepLabel = (XulLabel) mainWizardContainer.getDocumentRoot().createElement( XUL_LABEL_TYPE );
  stepLabel.setValue( this.getStepName() );
  stepLabel.setFlex( 1 );
  stepLabel.setDisabled( true );
  row.addChild( stepLabel );

  stepContainer.addChild( row );
}
 
Example #2
Source File: DataHandler.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings ( "unused" )
public void setAuthFieldsVisible() {
  jdbcAuthMethod = (XulMenuList) document.getElementById( "redshift-auth-method-list" );
  XulVbox standardControls = (XulVbox) document.getElementById( "auth-standard-controls" );
  XulVbox iamControls = (XulVbox) document.getElementById( "auth-iam-controls" );
  XulVbox profileControls = (XulVbox) document.getElementById( "auth-profile-controls" );
  String jdbcAuthMethodValue = jdbcAuthMethod.getValue();
  switch ( jdbcAuthMethodValue ) {
    case IAM_CREDENTIALS:
      standardControls.setVisible( false );
      iamControls.setVisible( true );
      profileControls.setVisible( false );
      break;
    case PROFILE_CREDENTIALS:
      standardControls.setVisible( false );
      iamControls.setVisible( false );
      profileControls.setVisible( true );
      break;
    default:
      standardControls.setVisible( true );
      iamControls.setVisible( false );
      profileControls.setVisible( false );
      break;
  }
}
 
Example #3
Source File: SpoonPerspectiveManager.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public PerspectiveManager( SpoonPerspective per, XulVbox box, XulToolbar mainToolbar,
                           List<PerspectiveData> perspectiveList, String name ) {
  super();
  this.per = per;
  this.box = box;
  this.mainToolbar = mainToolbar;
  this.perspectiveList = perspectiveList;
  this.name = name;
  initialized = false;
}
 
Example #4
Source File: SpoonPerspectiveManagerTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
private SpoonPerspectiveManager.PerspectiveManager createPerspectiveManager( SpoonPerspective perspective ) {
  List<SpoonPerspectiveManager.PerspectiveData> perspectiveDatas = new ArrayList<SpoonPerspectiveManager.PerspectiveData>();
  perspectiveDatas.add( new SpoonPerspectiveManager.PerspectiveData( PERSPECTIVE_NAME, PERSPECTIVE_ID ) );
  SpoonPerspectiveManager.PerspectiveManager perspectiveManager =
    new SpoonPerspectiveManager.PerspectiveManager( perspective, mock( XulVbox.class ), mock( XulToolbar.class ),
      perspectiveDatas, perspective.getDisplayName( Locale.getDefault() ) );

  perspectiveManager = spy( perspectiveManager );
  doNothing().when( perspectiveManager ).performInit();

  return perspectiveManager;
}
 
Example #5
Source File: AbsController.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Override
protected void createBindings() {
  super.createBindings();
  roleListBox = (XulListbox) document.getElementById( "roles-list" );//$NON-NLS-1$
  systemRoleListBox = (XulListbox) document.getElementById( "system-roles-list" );//$NON-NLS-1$
  applyLogicalRolesButton = (XulButton) document.getElementById( "apply-action-permission" );//$NON-NLS-1$
  applyLogicalSystemRolesButton = (XulButton) document.getElementById( "apply-system-role-action-permission" );//$NON-NLS-1$

  logicalRolesBox = (XulVbox) document.getElementById( "role-action-permissions-vbox" );//$NON-NLS-1$
  logicalSystemRolesBox = (XulVbox) document.getElementById( "system-role-action-permissions-vbox" );//$NON-NLS-1$
  bf.setBindingType( Binding.Type.ONE_WAY );
  // Action based security permissions
  buttonConverter = new BindingConvertor<Integer, Boolean>() {

    @Override
    public Boolean sourceToTarget( Integer value ) {
      if ( value != null && value >= 0 ) {
        return false;
      }
      return true;
    }

    @Override
    public Integer targetToSource( Boolean value ) {
      // TODO Auto-generated method stub
      return null;
    }
  };
  bf.createBinding( roleListBox, "selectedIndex", applyLogicalRolesButton, "disabled", buttonConverter );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( systemRoleListBox, "selectedIndex", applyLogicalSystemRolesButton, "disabled", buttonConverter );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( absSecurity, "selectedRole", this, "selectedRoleChanged" );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( absSecurity, "selectedSystemRole", this, "selectedSystemRoleChanged" );//$NON-NLS-1$ //$NON-NLS-2$
}