net.officefloor.demo.gui
Class DemoTool

java.lang.Object
  extended by net.officefloor.demo.gui.DemoTool
All Implemented Interfaces:
MacroIndexFactory

public class DemoTool
extends java.lang.Object
implements MacroIndexFactory


Field Summary
static java.lang.String RECORDING_FILE_EXTENSION
          Extension for recording file.
 
Constructor Summary
DemoTool()
           
 
Method Summary
 void attachComponents(java.awt.Frame frame, FrameVisibilityListener visibilityListener, java.awt.Container container, MacroSource... macroSources)
          Attaches the Component instances for demo generation.
 int createMacroIndex()
          Creates the Macro index.
 MacroList getMacroList()
          Obtains the MacroList.
 java.awt.Rectangle getRecordingArea()
          Obtains the Rectangle providing the absolute location of the recording area.
 int[] getSelectedMacroIndices()
          Obtains the indices of the selected Macro instances.
 Macro[] getSelectedMacros(boolean isReturnAllIfNoneSelected)
          Obtains the selected Macro instances.
static void main(java.lang.String[] args)
          Provides ability to run the Demo Tool from command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECORDING_FILE_EXTENSION

public static final java.lang.String RECORDING_FILE_EXTENSION
Extension for recording file.

See Also:
Constant Field Values
Constructor Detail

DemoTool

public DemoTool()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.awt.AWTException
Provides ability to run the Demo Tool from command line.

Parameters:
args - Command line arguments.
Throws:
java.awt.AWTException

attachComponents

public void attachComponents(java.awt.Frame frame,
                             FrameVisibilityListener visibilityListener,
                             java.awt.Container container,
                             MacroSource... macroSources)
                      throws java.awt.AWTException
Attaches the Component instances for demo generation.

Parameters:
frame - Frame containing the Container.
visibilityListener - FrameVisibilityListener. May be null.
container - Container to attach the Component instances.
macroSources - Optional additional MacroSource instances.
Throws:
java.awt.AWTException - If running in headless environment.

getRecordingArea

public java.awt.Rectangle getRecordingArea()
Obtains the Rectangle providing the absolute location of the recording area.

Returns:
Rectangle providing the absolute location of the recording area.

getSelectedMacros

public Macro[] getSelectedMacros(boolean isReturnAllIfNoneSelected)
Obtains the selected Macro instances.

Parameters:
isReturnAllIfNoneSelected - true indicates to return all Macro instances if none are selected.
Returns:
Selected Macro instances.

getSelectedMacroIndices

public int[] getSelectedMacroIndices()
Obtains the indices of the selected Macro instances.

Returns:
Indices of the selected Macro instances.

getMacroList

public MacroList getMacroList()
Obtains the MacroList.

Returns:
MacroList.

createMacroIndex

public int createMacroIndex()
Description copied from interface: MacroIndexFactory
Creates the Macro index.

Specified by:
createMacroIndex in interface MacroIndexFactory
Returns:
Macro index or -1 indicating not specified.


Copyright © 2005-2012. All Rights Reserved.