KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > java > plugin > boot > SplashHandler


1 /*****************************************************************************
2  * Java Plug-in Framework (JPF)
3  * Copyright (C) 2006-2007 Dmitry Olshansky
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *****************************************************************************/

19 package org.java.plugin.boot;
20
21 import java.net.URL JavaDoc;
22
23 import org.java.plugin.util.ExtendedProperties;
24
25 /**
26  * Interface to control application splash screen.
27  *
28  * @see org.java.plugin.boot.Boot#getSplashHandler()
29  *
30  * @version $Id: SplashHandler.java,v 1.3 2007/01/04 17:10:34 ddimon Exp $
31  */

32 public interface SplashHandler {
33     /**
34      * Configures this handler instance. This method is called ones immediately
35      * after handler instantiation.
36      * @param config handler configuration data, here included all configuration
37      * parameters which name starts with
38      * <code>org.java.plugin.boot.splash.</code> prefix
39      */

40     void configure(ExtendedProperties config);
41     
42     /**
43      * @return boot progress value that is normalized to [0; 1] interval
44      */

45     float getProgress();
46     
47     /**
48      * Sets boot progress value and optionally adjust visual progress bar
49      * control. The value should be in [0; 1] interval.
50      * @param value new progress value
51      */

52     void setProgress(float value);
53     
54     /**
55      * @return current text caption
56      */

57     String JavaDoc getText();
58     
59     /**
60      * Sets new text caption and optionally display it on the screen.
61      * @param value new text caption
62      */

63     void setText(String JavaDoc value);
64     
65     /**
66      * @return current image URL
67      */

68     URL JavaDoc getImage();
69     
70     /**
71      * Sets new image URL and optionally displays it on the splash screen.
72      * @param value new image URL
73      */

74     void setImage(URL JavaDoc value);
75     
76     /**
77      * @return <code>true</code> if splash screen is displayed now
78      */

79     boolean isVisible();
80     
81     /**
82      * Shows/hides splash screen.
83      * @param value <code>true</code> to show splash screen, <code>false</code>
84      * - to hide and dispose it
85      */

86     void setVisible(boolean value);
87     
88     /**
89      * Useful method to get access to handler internals. The actually returned
90      * object depends on handler implementation.
91      * @return original implementation of this handler, usually you return
92      * <code>this</code> (useful for handler wrappers)
93      */

94     Object JavaDoc getImplementation();
95 }
96
Popular Tags