01: /*****************************************************************************
02: * Java Plug-in Framework (JPF)
03: * Copyright (C) 2006-2007 Dmitry Olshansky
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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: *****************************************************************************/package org.java.plugin.boot;
19:
20: import java.net.URL;
21:
22: import org.java.plugin.util.ExtendedProperties;
23:
24: /**
25: * Interface to control application splash screen.
26: *
27: * @see org.java.plugin.boot.Boot#getSplashHandler()
28: *
29: * @version $Id$
30: */
31: public interface SplashHandler {
32: /**
33: * Configures this handler instance. This method is called ones immediately
34: * after handler instantiation.
35: * @param config handler configuration data, here included all configuration
36: * parameters which name starts with
37: * <code>org.java.plugin.boot.splash.</code> prefix
38: */
39: void configure(ExtendedProperties config);
40:
41: /**
42: * @return boot progress value that is normalized to [0; 1] interval
43: */
44: float getProgress();
45:
46: /**
47: * Sets boot progress value and optionally adjust visual progress bar
48: * control. The value should be in [0; 1] interval.
49: * @param value new progress value
50: */
51: void setProgress(float value);
52:
53: /**
54: * @return current text caption
55: */
56: String getText();
57:
58: /**
59: * Sets new text caption and optionally display it on the screen.
60: * @param value new text caption
61: */
62: void setText(String value);
63:
64: /**
65: * @return current image URL
66: */
67: URL getImage();
68:
69: /**
70: * Sets new image URL and optionally displays it on the splash screen.
71: * @param value new image URL
72: */
73: void setImage(URL value);
74:
75: /**
76: * @return <code>true</code> if splash screen is displayed now
77: */
78: boolean isVisible();
79:
80: /**
81: * Shows/hides splash screen.
82: * @param value <code>true</code> to show splash screen, <code>false</code>
83: * - to hide and dispose it
84: */
85: void setVisible(boolean value);
86:
87: /**
88: * Useful method to get access to handler internals. The actually returned
89: * object depends on handler implementation.
90: * @return original implementation of this handler, usually you return
91: * <code>this</code> (useful for handler wrappers)
92: */
93: Object getImplementation();
94: }
|