|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.swt.widgets.Decorations
org.eclipse.swt.widgets.Shell
net.xoetrope.swt.splash.XSplashWindow
public class XSplashWindow
A Splash window.
Usage: MyApplication is your application class. Create a Splasher class which opens the splash window, invokes the main method of your Application class, and disposes the splash window afterwards. Please note that we want to keep the Splasher class and the XSplashWindow class as small as possible. The less code and the less classes must be loaded into the JVM to open the splash screen, the faster it will appear.
class Splasher
{
public static void main( String[] args )
{
XSplashWindow.splash( Splasher.class.getResource( "splash.gif" ) );
String[] appArgs = new String[args.length - 1];
for ( int i = 1; i < args.length; i++ )
appArgs[ i - 1 ] = args[ i ];
XSplashWindow.disposeSplash( 8000 );
XSplashWindow.invokeMain( args[ 0 ], appArgs );
}
}
http://www.randelshofer.ch/oop/javasplash/javasplash.html| Field Summary |
|---|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Method Summary | |
|---|---|
protected void |
checkSubclass()
Suppress the subclassing exception. |
static void |
disposeSplash(int delay)
Closes the splash window. |
static void |
invokeMain(java.lang.String className,
java.lang.String[] args)
Invokes the main method of the provided class name. |
static void |
splash(org.eclipse.swt.graphics.Image image)
Open's a splash window using the specified image. |
static void |
splash(java.net.URL imageURL)
Open's a splash window using the specified image. |
void |
update(org.eclipse.swt.graphics.GC g)
Updates the display area of the window. |
| Methods inherited from class org.eclipse.swt.widgets.Shell |
|---|
addShellListener, close, dispose, forceActive, getBounds, getEnabled, getImeInputMode, getLocation, getMinimumSize, getRegion, getShell, getShells, getSize, isEnabled, isVisible, open, removeShellListener, setActive, setEnabled, setImeInputMode, setMinimumSize, setMinimumSize, setRegion, setVisible, win32_new |
| Methods inherited from class org.eclipse.swt.widgets.Decorations |
|---|
computeTrim, getClientArea, getDefaultButton, getImage, getImages, getMaximized, getMenuBar, getMinimized, getText, isReparentable, setDefaultButton, setImage, setImages, setMaximized, setMenuBar, setMinimized, setText |
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
|---|
drawBackground, getCaret, scroll, setCaret, setFont |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getFont, getForeground, getLayoutData, getMenu, getMonitor, getParent, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isFocusControl, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
protected void checkSubclass()
checkSubclass in class org.eclipse.swt.widgets.Decorationspublic void update(org.eclipse.swt.graphics.GC g)
g - The graphic component.public static void splash(org.eclipse.swt.graphics.Image image)
image - The splash image.public static void splash(java.net.URL imageURL)
imageURL - The url of the splash image.public static void disposeSplash(int delay)
delay - The dealy in milliseconds.
public static void invokeMain(java.lang.String className,
java.lang.String[] args)
className - The name of the class to be invoked.args - The command line arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||