Java Code Examples for org.pentaho.ui.xul.components.XulLabel#setValue()

The following examples show how to use org.pentaho.ui.xul.components.XulLabel#setValue() . 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: MainController.java    From pentaho-aggdesigner with GNU General Public License v2.0 6 votes vote down vote up
public void helpAboutLoad() {

    // TODO - Use VersionHelper to get version information from the MANIFEST.MF file
    //        and display the proper version and copyright information

    XulLabel helpAboutVersionLabel = (XulLabel) document.getElementById("aboutVersion");
    Properties versionProps = new Properties();
    try {
      InputStream is = getClass().getResourceAsStream("/version.properties");
      if (is == null) {
        logger.error("Failed to locate version.properties on classpath");
      } else {
        versionProps.load(is);
      }
    } catch (IOException e) {
      if (logger.isErrorEnabled()) {
        logger.error("an exception occurred", e);
      }
      return;
    }
    helpAboutVersionLabel.setValue(versionProps.getProperty("version"));
    XulLabel helpAboutCopyrightLabel = (XulLabel) document.getElementById( "aboutCopyright" );
    helpAboutCopyrightLabel.setValue( Messages.getString( "about_copyright", ""
      + ( (new Date() ).getYear()+1900 ) ) );
  }
 
Example 3
Source File: MainController.java    From mql-editor with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Bindable
public static void showErrorDialog( String message ) {
  if ( errorDialog == null ) {
    throw new IllegalStateException( "Error dialog has not been loaded yet" );
  } else {
    XulLabel msg = (XulLabel) errorDialog.getElementById( "errorLabel" );
    msg.setValue( message );
    errorDialog.show();
  }
}