Java源码示例:org.pentaho.ui.xul.containers.XulVbox

示例1
/**
 * @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 );
}
 
示例2
@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;
  }
}
 
示例3
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;
}
 
示例4
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;
}
 
示例5
@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$
}