de.jdemo.extensions
Class GuiDemoCase

java.lang.Object
  extended by de.jdemo.framework.AbstractDemoCase
      extended by de.jdemo.extensions.GuiDemoCase
All Implemented Interfaces:
IDemo, IDemoCase, java.lang.Cloneable
Direct Known Subclasses:
AwtDemoCase

public abstract class GuiDemoCase
extends AbstractDemoCase

Author:
Markus Gebhard

Constructor Summary
GuiDemoCase()
           
GuiDemoCase(java.lang.String name)
           
 
Method Summary
 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  void disposeDemoWindow()
           
 void executeTearDown()
          Called by the DemoCaseRunner to invoke the tearDown method.
protected  void exit()
          Can be called from within the demonstration code to indicate that this demonstration has been finished.
 java.awt.Window getRegisteredDemoWindow()
          Returns the demo window registered with this GuiDemoCase or null if there is none registered.
 boolean isRegisteredDemoWindowOpened()
           
protected  void registerDemoWindow(java.awt.Window window)
          Registers the given window as demo window for this GuiDemoCase.
protected  void setRegisteredDemoWindowOpened(boolean opened)
           
 
Methods inherited from class de.jdemo.framework.AbstractDemoCase
accept, after, assertNotNull, assertNull, assertTrue, before, createThreadGroup, executeSetUp, fail, getClone, getIdentifier, getName, getRunnable, runDemo, setName, setRunnable, setUp, tearDown, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GuiDemoCase

public GuiDemoCase()

GuiDemoCase

public GuiDemoCase(java.lang.String name)
Method Detail

clone

protected java.lang.Object clone()
Description copied from class: AbstractDemoCase
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. This is intended for starting each demo case from scratch.

Overrides:
clone in class AbstractDemoCase

createRunnable

public IDemoCaseRunnable createRunnable(boolean allowExternalLaunches)
Description copied from interface: IDemoCase
Creates a runnable for running this demo case.

Parameters:
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.

disposeDemoWindow

protected void disposeDemoWindow()

registerDemoWindow

protected final void registerDemoWindow(java.awt.Window window)
Registers the given window as demo window for this GuiDemoCase. Usually called by any framework method that displays a window object.


cancel

public void cancel()
Description copied from class: AbstractDemoCase
Give this DemoCase the chance to exit. Can be overriden by subclasses e.g. to dispose windows or dispose other resources. Usually invoked from an IDemoCaseRunnable when the user requests termination of the Demo. Should not be called from within a demo.

Overrides:
cancel in class AbstractDemoCase

exit

protected void exit()
Description copied from class: AbstractDemoCase
Can be called from within the demonstration code to indicate that this demonstration has been finished.

Overrides:
exit in class AbstractDemoCase
See Also:
AbstractDemoCase.cancel()

getRegisteredDemoWindow

public java.awt.Window getRegisteredDemoWindow()
Returns the demo window registered with this GuiDemoCase or null if there is none registered.

See Also:
registerDemoWindow(Window)

executeTearDown

public void executeTearDown()
                     throws java.lang.Exception
Description copied from class: AbstractDemoCase
Called by the DemoCaseRunner to invoke the tearDown method. Should not be called from within a demo.

Overrides:
executeTearDown in class AbstractDemoCase
Throws:
java.lang.Exception

isRegisteredDemoWindowOpened

public boolean isRegisteredDemoWindowOpened()

setRegisteredDemoWindowOpened

protected void setRegisteredDemoWindowOpened(boolean opened)


JDemo homepage: http://www.jdemo.de
Copyright © 2003-2008 Markus Gebhard. All Rights Reserved.