Section 10.2. Creating Splash Screens


10.2. Creating Splash Screens

This task creates a splash screen displayed while the build is progressing. In Example 10-1, I'm using a splash screen that the Apache Jakarta Project makes available at http://jakarta.apache.org/images/jakarta-logo.gif, and I'm displaying it for five seconds.

Example 10-1. Using a splash screen (ch10/splash/build.xml)
<?xml version="1.0"?> <project default="main" basedir=".">     <property name="cvs.dir" value="project" />     <target name="main" depends="splash">         <echo>             Checking out and updating....         </echo>     </target>     <target name="splash">         <splash imageurl="http://jakarta.apache.org/images/jakarta-logo.gif"         showduration="5000"/>     </target> </project>

You can see the Apache Jakarta logo that appears when this task executes in Figure 10-1. This task provides a nice touch if you're distributing your build files to a team.

Figure 10-1. Sample build splash logo


The attributes of this task appear in Table 10-2.

Table 10-2. The splash attributes

Attribute

Description

Required

Default

imageurl

Specifies an URL that points to the image you want the splash screen to display.

No

antlogo.gif from the classpath

showduration

Sets the length of time the splash screen should be visible. Set to a value in milliseconds.

No

5000


If you need to retrieve an image from behind a firewall, use the Ant setproxy task.




    Ant. The Definitive Guide
    Ant: The Definitive Guide, 2nd Edition
    ISBN: 0596006098
    EAN: 2147483647
    Year: 2003
    Pages: 115
    Authors: Steve Holzner

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net