Package org.pentaho.ui.xul.impl

Examples of org.pentaho.ui.xul.impl.DefaultXulOverlay


  protected void processOverlays( PlatformPlugin plugin, Document doc, IPentahoSession session ) {
    // look for content types
    List<?> nodes = doc.selectNodes( "//overlays/overlay" ); //$NON-NLS-1$
    for ( Object obj : nodes ) {
      Element node = (Element) obj;
      DefaultXulOverlay overlay = processOverlay( node );

      if ( overlay != null ) {
        plugin.addOverlay( overlay );
      }
    }
View Full Code Here


      }
    }
  }

  public static DefaultXulOverlay processOverlay( Element node ) {
    DefaultXulOverlay overlay = null;

    String id = node.attributeValue( "id" ); //$NON-NLS-1$
    String resourceBundleUri = node.attributeValue( "resourcebundle" ); //$NON-NLS-1$
    String priority = node.attributeValue( "priority" );

    String xml = node.asXML();

    if ( StringUtils.isNotEmpty( id ) && StringUtils.isNotEmpty( xml ) ) {
      // check for overlay priority attribute. if not present, do not provide one
      // so default will be used
      if ( StringUtils.isNotEmpty( priority ) ) {
        try {
          overlay = new DefaultXulOverlay( id, null, xml, resourceBundleUri, Integer.parseInt( priority ) );
        } catch ( NumberFormatException e ) {
          // don't fail if attribute value is invalid. just use alt constructor without priority
          overlay = new DefaultXulOverlay( id, null, xml, resourceBundleUri );
        }
      } else {
        overlay = new DefaultXulOverlay( id, null, xml, resourceBundleUri );
      }
    }

    return overlay;
  }
View Full Code Here

    ArrayList<XulOverlay> overlays = new ArrayList<XulOverlay>();

    @SuppressWarnings( "unchecked" )
    List<Node> overlayElements = (List<Node>) node.selectNodes( "overlay" );
    for ( Node overlayNode : overlayElements ) {
      DefaultXulOverlay overlay;

      // reuse static method to honor overlay priorities as well
      overlay = SystemPathXmlPluginProvider.processOverlay( (Element) overlayNode );
      if ( overlay != null ) {
        overlays.add( overlay );
View Full Code Here

TOP

Related Classes of org.pentaho.ui.xul.impl.DefaultXulOverlay

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.