com.threerings.opengl.gui.tools
Class InterfaceTester

java.lang.Object
  extended by com.threerings.expr.DynamicScope
      extended by com.threerings.opengl.GlApp
          extended by com.threerings.opengl.GlCanvasApp
              extended by com.threerings.opengl.GlCanvasTool
                  extended by com.threerings.opengl.gui.tools.InterfaceTester
All Implemented Interfaces:
ConfigUpdateListener<UserInterfaceConfig>, EditorContext, Scope, ScopeUpdateListener, AlContext, Enqueueable, GlContext, ActionListener, EventListener, ChangeListener

public class InterfaceTester
extends GlCanvasTool
implements ChangeListener, ConfigUpdateListener<UserInterfaceConfig>

Tool for testing user interfaces.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.opengl.GlCanvasTool
GlCanvasTool.CanvasToolPrefs
 
Field Summary
protected  ChangeBlock _block
          Indicates that we should ignore any changes, because we're the one effecting them.
protected  JPanel _cpanel
          The panel that holds the control bits.
protected  EditorPanel _epanel
          The editor panel we use to edit the interface configuration.
protected  DraggableSpinner _height
          The width and height controls.
protected static Preferences _prefs
          The application preferences.
protected  Root _root
          The user interface root.
protected  UserInterface _userInterface
          The user interface component.
protected  DraggableSpinner _width
          The width and height controls.
 
Fields inherited from class com.threerings.opengl.GlCanvasTool
_bounds, _compass, _eprefs, _grid, _msgs, _pdialog, _showBounds, _showCompass, _showGrid, _showStats, _stats
 
Fields inherited from class com.threerings.opengl.GlCanvasApp
_canvas, _canvasRoot, _frame, _keymgr
 
Fields inherited from class com.threerings.opengl.GlApp
_at, _billboardRotation, _camhand, _cfgmgr, _clipprov, _colorpos, _compatibilityMode, _compositor, _epoch, _imgcache, _msgmgr, _now, _renderEffects, _renderer, _renderScheme, _rsrcmgr, _shadcache, _soundmgr, _streamGain, _up, _viewTransform, _viewTransformState, _worldTransform, PIXEL_FORMATS
 
Fields inherited from class com.threerings.expr.DynamicScope
_compoundDepth, _listeners, _owner, _parentScope, _scopeName, _symbols, INVALID_SCOPE
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
InterfaceTester(String userInterface)
          Creates the interface tester with (optionally) the path to an interface to load.
 
Method Summary
protected  void compositeView()
          Gives the application a chance to composite anything it might want rendered.
 void configUpdated(ConfigEvent<UserInterfaceConfig> event)
          Called when a configuration has been updated.
protected  JComponent createCanvasContainer()
          Creates and returns the component that contains the canvas (after the canvas has been created).
protected  GlCanvasTool.CanvasToolPrefs createEditablePrefs()
          Creates and returns the editable preferences.
protected  void didInit()
          Override to perform custom initialization after the render context is valid.
static void main(String[] args)
          The program entry point.
 void stateChanged(ChangeEvent event)
           
protected  void updateView(float elapsed)
          Performs any updates that are necessary even when not rendering.
 
Methods inherited from class com.threerings.opengl.GlCanvasTool
actionPerformed, createAction, createAction, createBounds, createButton, createButton, createCameraHandler, createCheckBoxMenuItem, createCheckBoxMenuItem, createGrid, createMenu, createMenuItem, createMenuItem, shouldCheckTimestamps
 
Methods inherited from class com.threerings.opengl.GlCanvasApp
createCanvas, createRoot, getCanvas, getFrame, getMouseRay, getPickRay, getRunQueue, initRenderer, makeCurrent, shutdown, startup, willShutdown
 
Methods inherited from class com.threerings.opengl.GlApp
createSnapshot, enqueue, getApp, getCameraHandler, getClipProvider, getColorPository, getCompatibilityMode, getCompositor, getConfigManager, getImageCache, getMessageManager, getRenderEffects, getRenderer, getRenderScheme, getResourceManager, getScope, getShaderCache, getSoundManager, getStreamGain, init, initSharedManagers, renderView, setCameraHandler, setCompatibilityMode, setRenderEffects, setRenderer, setRenderScheme, updateView, xlate
 
Methods inherited from class com.threerings.expr.DynamicScope
addListener, dispose, endCompoundUpdate, get, getParentScope, getScopeName, put, remove, removeListener, scopeUpdated, setParentScope, startCompoundUpdate, wasUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.editor.util.EditorContext
getColorPository, getConfigManager, getMessageManager, getResourceManager
 

Field Detail

_cpanel

protected JPanel _cpanel
The panel that holds the control bits.


_epanel

protected EditorPanel _epanel
The editor panel we use to edit the interface configuration.


_width

protected DraggableSpinner _width
The width and height controls.


_height

protected DraggableSpinner _height
The width and height controls.


_block

protected ChangeBlock _block
Indicates that we should ignore any changes, because we're the one effecting them.


_root

protected Root _root
The user interface root.


_userInterface

protected UserInterface _userInterface
The user interface component.


_prefs

protected static Preferences _prefs
The application preferences.

Constructor Detail

InterfaceTester

public InterfaceTester(String userInterface)
Creates the interface tester with (optionally) the path to an interface to load.

Method Detail

main

public static void main(String[] args)
The program entry point.


stateChanged

public void stateChanged(ChangeEvent event)
Specified by:
stateChanged in interface ChangeListener

configUpdated

public void configUpdated(ConfigEvent<UserInterfaceConfig> event)
Description copied from interface: ConfigUpdateListener
Called when a configuration has been updated.

Specified by:
configUpdated in interface ConfigUpdateListener<UserInterfaceConfig>

createCanvasContainer

protected JComponent createCanvasContainer()
Description copied from class: GlCanvasApp
Creates and returns the component that contains the canvas (after the canvas has been created).

Overrides:
createCanvasContainer in class GlCanvasApp

createEditablePrefs

protected GlCanvasTool.CanvasToolPrefs createEditablePrefs()
Description copied from class: GlCanvasTool
Creates and returns the editable preferences.

Specified by:
createEditablePrefs in class GlCanvasTool

didInit

protected void didInit()
Description copied from class: GlApp
Override to perform custom initialization after the render context is valid.

Overrides:
didInit in class GlCanvasTool

updateView

protected void updateView(float elapsed)
Description copied from class: GlApp
Performs any updates that are necessary even when not rendering.

Overrides:
updateView in class GlApp
Parameters:
elapsed - the elapsed time since the last update, in seconds.

compositeView

protected void compositeView()
Description copied from class: GlApp
Gives the application a chance to composite anything it might want rendered.

Overrides:
compositeView in class GlCanvasTool