Package org.pentaho.ui.xul

Examples of org.pentaho.ui.xul.XulOverlay


      loadOverlays( 0 );
    }

    private void loadOverlays( final int index ) {
      if ( index < overlays.size() ) {
        final XulOverlay overlayToLoad = overlays.get( index );
        final String id = overlayToLoad.getId();
        if ( loadedOverlays.contains( id ) ) {
          // already loaded - skip this one and load the next
          OverlayLoader.this.loadOverlays( index + 1 );
        } else {
          loadedOverlays.add( id );
          final boolean applyOnStart = id.startsWith( "startup" ) || id.startsWith( "sticky" );
          final Document doc = XMLParser.parse( overlayToLoad.getSource() );
          final String bundleUri = overlayToLoad.getResourceBundleUri();
          String folder = ""; //$NON-NLS-1$
          String baseName = bundleUri;

          // we have to separate the folder from the base name
          if ( bundleUri.indexOf( SEPARATOR ) > -1 ) {
View Full Code Here


    assertNotNull( "Overlays is null", overlays ); //$NON-NLS-1$

    System.err.println( overlays );

    assertEquals( "Wrong number of overlays", 3, overlays.size() ); //$NON-NLS-1$
    XulOverlay overlay = overlays.get( 0 );
    assertEquals( "Wrong overlay id", "overlay1", overlay.getId() ); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals( "Wrong overlay resource uri", "uri1", overlay.getResourceBundleUri() ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node1" ) != -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node2" ) != -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node3" ) == -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node4" ) == -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertNull( "Overlay URI should be null", overlay.getOverlayUri() ); //$NON-NLS-1$

    overlay = overlays.get( 1 );

    assertEquals( "Wrong overlay id", "overlay2", overlay.getId() ); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals( "Wrong overlay resource uri", "uri2", overlay.getResourceBundleUri() ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node1" ) == -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node2" ) == -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node3" ) != -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue( "Wrong overlay content", overlay.getSource().indexOf( "<node4" ) != -1 ); //$NON-NLS-1$ //$NON-NLS-2$
    assertNull( "Overlay URI should be null", overlay.getOverlayUri() ); //$NON-NLS-1$
  }
View Full Code Here

TOP

Related Classes of org.pentaho.ui.xul.XulOverlay

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.