Examples of Overlay


Examples of org.apache.maven.plugin.war.Overlay

        // refer to a valid artifact
        final List<Artifact> configuredWarArtifacts = new ArrayList<Artifact>();
        final ListIterator<Overlay> it = overlays.listIterator();
        while ( it.hasNext() )
        {
            Overlay overlay = it.next();
            if ( overlay == null )
            {
                throw new InvalidOverlayConfigurationException( "overlay could not be null." );
            }
            // If it's the current project, return the project instance
            if ( overlay.isCurrentProject() )
            {
                overlay = currentProjectOverlay;
                it.set( overlay );
            }
            // default includes/excludes - only if the overlay uses the default settings
            if ( Arrays.equals( Overlay.DEFAULT_INCLUDES, overlay.getIncludes() )
                && Arrays.equals( Overlay.DEFAULT_EXCLUDES, overlay.getExcludes() ) )
            {
                overlay.setIncludes( defaultIncludes );
                overlay.setExcludes( defaultExcludes );
            }

            final Artifact artifact = getAssociatedArtifact( overlay );
            if ( artifact != null )
            {
                configuredWarArtifacts.add( artifact );
                overlay.setArtifact( artifact );
            }
        }

        // Build the list of missing overlays
        for ( Artifact artifact : artifactsOverlays )
        {
            if ( !configuredWarArtifacts.contains( artifact ) )
            {
                // Add a default overlay for the given artifact which will be applied after
                // the ones that have been configured
                overlays.add( new DefaultOverlay( artifact, defaultIncludes, defaultExcludes ) );
            }
        }

        // Final validation, make sure that the current project is in there. Otherwise add it first
        for ( Overlay overlay : overlays )
        {
            if ( overlay.equals( currentProjectOverlay ) )
            {
                return;
            }
        }
        overlays.add( 0, currentProjectOverlay );
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

  /**
   * @return
   * @throws CoreException
   */
  public List<Overlay> getOverlays() throws CoreException {
    Overlay currentProjectOverlay = Overlay.createInstance();
    currentProjectOverlay.setArtifact(mavenProject.getArtifact());
    OverlayManager overlayManager = null;
    List<Overlay> overlays = null;
    try {
      overlayManager = new OverlayManager(getConfiguredOverlays(),
                                                         mavenProject,
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

    boolean filtered = DomUtils.getBooleanChildValue(overlayNode, "filtered"); //$NON-NLS-1$
    boolean skip = DomUtils.getBooleanChildValue(overlayNode, "skip"); //$NON-NLS-1$
    String type = DomUtils.getChildValue(overlayNode, "type", "war"); //$NON-NLS-1$ //$NON-NLS-2$
    String targetPath = DomUtils.getChildValue(overlayNode, "targetPath", "/"); //$NON-NLS-1$ //$NON-NLS-2$

    Overlay overlay = new Overlay();
    overlay.setArtifactId(artifactId);
    overlay.setGroupId(groupId);
    overlay.setClassifier(classifier);
    if (exclusions== null || exclusions.length ==0) {
      overlay.setExcludes(getDependentWarExcludes());
    } else {
      overlay.setExcludes(exclusions);
    }
    if (inclusions== null || inclusions.length ==0) {
      overlay.setIncludes(getDependentWarIncludes());
    } else {
      overlay.setIncludes(inclusions);
    }
    overlay.setFiltered(filtered);
    overlay.setSkip(skip);
    overlay.setTargetPath(targetPath);
    overlay.setType(type);
   
    return overlay;
  }
View Full Code Here

Examples of org.apache.pdfbox.util.Overlay

    public static void main(final String[] args) throws Exception
    {
        // suppress the Dock icon on OS X
        System.setProperty("apple.awt.UIElement", "true");

        Overlay overlayer = new Overlay();
        Map<Integer, String> specificPageOverlayFile = new HashMap<Integer, String>();
        boolean useNonSeqParser = false;
        // input arguments
        for (int i = 0; i < args.length; i++)
        {
            String arg = args[i].trim();
            if (i == 0)
            {
                overlayer.setInputFile(arg);
            }
            else if (i == (args.length - 1))
            {
                overlayer.setOutputFile(arg);
            }
            else if (arg.equals(POSITION) && ((i + 1) < args.length))
            {
                if (Position.FOREGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.FOREGROUND);
                }
                else if (Position.BACKGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.BACKGROUND);
                }
                else
                {
                    usage();
                }
                i += 1;
            }
            else if (arg.equals(ODD) && ((i + 1) < args.length))
            {
                overlayer.setOddPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(EVEN) && ((i + 1) < args.length))
            {
                overlayer.setEvenPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(FIRST) && ((i + 1) < args.length))
            {
                overlayer.setFirstPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(LAST) && ((i + 1) < args.length))
            {
                overlayer.setLastPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(USEALLPAGES) && ((i + 1) < args.length))
            {
                overlayer.setAllPagesOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(PAGE) && ((i + 2) < args.length) && (isInteger(args[i + 1].trim())))
            {
                specificPageOverlayFile.put(Integer.parseInt(args[i + 1].trim()), args[i + 2].trim());
                i += 2;
            }
            else if( args[i].equals( NONSEQ ) )
            {
                useNonSeqParser = true;
            }
            else if (overlayer.getDefaultOverlayFile() == null)
            {
                overlayer.setDefaultOverlayFile(arg);
            }
            else
            {
                usage();
            }
        }
       
        if (overlayer.getInputFile() == null || overlayer.getOutputFile() == null)
        {
            usage();
        }
       
        try
        {
            overlayer.overlay(specificPageOverlayFile,useNonSeqParser);
        }
        catch (Exception e)
        {
            LOG.error("Overlay failed: " + e.getMessage(), e);
            throw e;
View Full Code Here

Examples of org.apache.pdfbox.util.Overlay

     * @param args command line arguments
     * @throws Exception if something went wrong
     */
    public static void main(final String[] args) throws Exception
    {
        Overlay overlayer = new Overlay();
        Map<Integer, String> specificPageOverlayFile = new HashMap<Integer, String>();
        boolean useNonSeqParser = false;
        // input arguments
        for (int i = 0; i < args.length; i++)
        {
            String arg = args[i].trim();
            if (i == 0)
            {
                overlayer.setInputFile(arg);
            }
            else if (i == (args.length - 1))
            {
                overlayer.setOutputFile(arg);
            }
            else if (arg.equals(POSITION) && ((i + 1) < args.length))
            {
                if (Position.FOREGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.FOREGROUND);
                }
                else if (Position.BACKGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.BACKGROUND);
                }
                else
                {
                    usage();
                }
                i += 1;
            }
            else if (arg.equals(ODD) && ((i + 1) < args.length))
            {
                overlayer.setOddPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(EVEN) && ((i + 1) < args.length))
            {
                overlayer.setEvenPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(FIRST) && ((i + 1) < args.length))
            {
                overlayer.setFirstPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(LAST) && ((i + 1) < args.length))
            {
                overlayer.setLastPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(PAGE) && ((i + 2) < args.length) && (isInteger(args[i + 1].trim())))
            {
                specificPageOverlayFile.put(Integer.parseInt(args[i + 1].trim()), args[i + 2].trim());
                i += 2;
            }
            else if( args[i].equals( NONSEQ ) )
            {
                useNonSeqParser = true;
            }
            else if (overlayer.getDefaultOverlayFile() == null)
            {
                overlayer.setDefaultOverlayFile(arg);
            }
            else
            {
                usage();
            }
        }
       
        if (overlayer.getInputFile() == null || overlayer.getOutputFile() == null)
        {
            usage();
        }
       
        try
        {
            overlayer.overlay(specificPageOverlayFile,useNonSeqParser);
        }
        catch (Exception e)
        {
            LOG.error("Overlay failed: " + e.getMessage(), e);
            throw e;
View Full Code Here

Examples of org.apache.pdfbox.util.Overlay

     * @param args command line arguments
     * @throws Exception if something went wrong
     */
    public static void main(final String[] args) throws Exception
    {
        Overlay overlayer = new Overlay();
        Map<Integer, String> specificPageOverlayFile = new HashMap<Integer, String>();
        boolean useNonSeqParser = false;
        // input arguments
        for (int i = 0; i < args.length; i++)
        {
            String arg = args[i].trim();
            if (i == 0)
            {
                overlayer.setInputFile(arg);
            }
            else if (i == (args.length - 1))
            {
                overlayer.setOutputFile(arg);
            }
            else if (arg.equals(POSITION) && ((i + 1) < args.length))
            {
                if (Position.FOREGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.FOREGROUND);
                }
                else if (Position.BACKGROUND.toString().equalsIgnoreCase(args[i + 1].trim()))
                {
                    overlayer.setOverlayPosition(Position.BACKGROUND);
                }
                else
                {
                    usage();
                }
                i += 1;
            }
            else if (arg.equals(ODD) && ((i + 1) < args.length))
            {
                overlayer.setOddPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(EVEN) && ((i + 1) < args.length))
            {
                overlayer.setEvenPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(FIRST) && ((i + 1) < args.length))
            {
                overlayer.setFirstPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(LAST) && ((i + 1) < args.length))
            {
                overlayer.setLastPageOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(USEALLPAGES) && ((i + 1) < args.length))
            {
                overlayer.setAllPagesOverlayFile(args[i + 1].trim());
                i += 1;
            }
            else if (arg.equals(PAGE) && ((i + 2) < args.length) && (isInteger(args[i + 1].trim())))
            {
                specificPageOverlayFile.put(Integer.parseInt(args[i + 1].trim()), args[i + 2].trim());
                i += 2;
            }
            else if( args[i].equals( NONSEQ ) )
            {
                useNonSeqParser = true;
            }
            else if (overlayer.getDefaultOverlayFile() == null)
            {
                overlayer.setDefaultOverlayFile(arg);
            }
            else
            {
                usage();
            }
        }
       
        if (overlayer.getInputFile() == null || overlayer.getOutputFile() == null)
        {
            usage();
        }
       
        try
        {
            overlayer.overlay(specificPageOverlayFile,useNonSeqParser);
        }
        catch (Exception e)
        {
            LOG.error("Overlay failed: " + e.getMessage(), e);
            throw e;
View Full Code Here

Examples of org.jfree.chart.panel.Overlay

      }

      Iterator iterator = this.overlays.iterator();
      while (iterator.hasNext())
      {
         Overlay overlay = (Overlay) iterator.next();
         overlay.paintOverlay(g2, this);
      }

      // redraw the zoom rectangle (if present) - if useBuffer is false,
      // we use XOR so we can XOR the rectangle away again without redrawing
      // the chart
View Full Code Here

Examples of org.jfree.chart.panel.Overlay

        }

        Iterator iterator = this.overlays.iterator();
        while (iterator.hasNext()) {
            Overlay overlay = (Overlay) iterator.next();
            overlay.paintOverlay(g2, this);
        }

        // redraw the zoom rectangle (if present) - if useBuffer is false,
        // we use XOR so we can XOR the rectangle away again without redrawing
        // the chart
View Full Code Here

Examples of org.jfree.chart.panel.Overlay

        }

        Iterator iterator = this.overlays.iterator();
        while (iterator.hasNext()) {
            Overlay overlay = (Overlay) iterator.next();
            overlay.paintOverlay(g2, this);
        }

        // redraw the zoom rectangle (if present) - if useBuffer is false,
        // we use XOR so we can XOR the rectangle away again without redrawing
        // the chart
View Full Code Here

Examples of org.jfree.chart.panel.Overlay

        }

        Iterator iterator = this.overlays.iterator();
        while (iterator.hasNext()) {
            Overlay overlay = (Overlay) iterator.next();
            overlay.paintOverlay(g2, this);
        }

        // redraw the zoom rectangle (if present) - if useBuffer is false,
        // we use XOR so we can XOR the rectangle away again without redrawing
        // the chart
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.