public abstract class SwtDemoCase extends AbstractDemoCase implements ISwtDemoCase
Constructor and Description |
---|
SwtDemoCase() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Give this DemoCase the chance to exit.
|
protected java.lang.Object |
clone()
Returns a clone of this democase, that is a new instance being the same
demonstration case, but not having any listeners or other temporary
fields.
|
IDemoCaseRunnable |
createRunnable(boolean allowExternalLaunches)
Creates a runnable for running this demo case.
|
protected org.eclipse.swt.widgets.Shell |
createShell()
Creates a new
Shell object that can be used for adding widgets. |
void |
executeTearDown()
Called by the DemoCaseRunner to invoke the tearDown method.
|
protected org.eclipse.swt.widgets.Display |
getDisplay() |
void |
runDemo()
Override to run the demo and assert its state.
|
accept, after, assertNotNull, assertNull, assertTrue, before, createThreadGroup, executeSetUp, exit, fail, getClone, getIdentifier, getName, getRunnable, setName, setRunnable, setUp, tearDown, toString
public IDemoCaseRunnable createRunnable(boolean allowExternalLaunches)
IDemoCase
createRunnable
in interface IDemoCase
allowExternalLaunches
- indicates whether this demo is allowed e.g. to launch a file in
an external software. This flag will be false if this demo is executed as test for example.public void executeTearDown() throws java.lang.Exception
AbstractDemoCase
executeTearDown
in class AbstractDemoCase
java.lang.Exception
protected java.lang.Object clone()
AbstractDemoCase
clone
in class AbstractDemoCase
public void cancel()
AbstractDemoCase
IDemoCaseRunnable
when the user requests termination of the
Demo.
Should not be called from within a demo.cancel
in class AbstractDemoCase
protected org.eclipse.swt.widgets.Display getDisplay()
protected org.eclipse.swt.widgets.Shell createShell()
Shell
object that can be used for adding widgets.
The shell will automatically be made visible when returning from the
demo...
method. Not that calling this method more often than once will
result in a DemoExecutionFailedError
.public void runDemo() throws java.lang.Throwable
AbstractDemoCase
runDemo
in class AbstractDemoCase
java.lang.Throwable
- if any exception is thrown
JDemo homepage: http://www.jdemo.de
Copyright © 2003-2012 Markus Gebhard. All Rights Reserved.