GSC
Class SkandhaBox

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--GSC.SkandhaBox
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class SkandhaBox
extends java.awt.Canvas

The SkandhaBox is a simplified BeanBox for working with the skandha graphics server to create, view, and edit skandha graphics scenes. The SkandhaBox can be used to build GUIs or open and close existing GUIs that have been saved as serialized objects. The SkandhaBox manages the handle to the skandha graphics server communications class (through which all skandha graphics server requests are made), manages messages to the SkandhaUpdater class (which requests updates to the currently viewed skandha graphics image), draws all graphics user interface icons and images, and distributes messages to the appropriate graphical user interface component when mouse or keyboard events occur (GUI component classes must be subclasses of the SkandhaGUIComponent class) based on mouse and keyboard events that occur within the SkandhaBox container. Note: Currently, serialization and saving/loading of SkandhaBox state has not been implemented.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
 java.lang.String resultsdir
          The results directory where skandha4 stores the current skandha4 scene image
static SkandhaBox s_instance
          The one and only instance of the SkandhaBox (Singleton pattern)
 SkandhaUpdater skandhaUpdater
          The skandha image updater class
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SkandhaBox(Starter starter_in)
          The SkandhaBox construtor.
 
Method Summary
 java.lang.String createSkandhaForm()
          Writes out the current tool as a Web publishable HTML document with built-in CGI communications
 int createSkandhaTool()
          Serializes and saves the current tool to storage as created in this SkandhaBox Provides a process for loading the saved tool
 void createSkanOutputArea()
          Creates an area in the skandha Box where images returned by the skandha graphics server can visually be seen.
static SkandhaBox getInstanceOf()
          To get a handle to the only instance of the SkandhaBox
 SkandhaGUIComponent getSkandhaOutput()
          Returns a handle to the SkandhaOutput control
 boolean makeSkandhaCall(java.lang.String command)
          Makes a call to the skandha graphics server to update the current scene
 boolean mouseDown(java.awt.Event e, int x, int y)
          handles mouse down events that occur within the bounds of the SkandhaBox, forwarding processing responsibility to the appropriate GUI component
 boolean mouseDrag(java.awt.Event e, int x, int y)
          handles mouse drag events that occur within the bounds of the SkandhaBox
 boolean mouseUp(java.awt.Event e, int x, int y)
          handles mouse up events that occur within the bounds of the SkandhaBox
 void paint(java.awt.Graphics g)
          Paints the skandha Box components
 int saveSkandhaScene()
          Saves the current skandha4 scene
 void setCurrentUser(java.lang.String cu)
          Sets the current user of the skandha Box applet
 
Methods inherited from class java.awt.Canvas
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseEnter, mouseExit, mouseMove, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_instance

public static SkandhaBox s_instance
The one and only instance of the SkandhaBox (Singleton pattern)

skandhaUpdater

public SkandhaUpdater skandhaUpdater
The skandha image updater class

resultsdir

public java.lang.String resultsdir
The results directory where skandha4 stores the current skandha4 scene image
Constructor Detail

SkandhaBox

public SkandhaBox(Starter starter_in)
The SkandhaBox construtor.
Parameters:
starter_in - The applicaton or applet in which the skandha Box is being used.
Method Detail

getInstanceOf

public static SkandhaBox getInstanceOf()
To get a handle to the only instance of the SkandhaBox

createSkanOutputArea

public void createSkanOutputArea()
Creates an area in the skandha Box where images returned by the skandha graphics server can visually be seen.

makeSkandhaCall

public boolean makeSkandhaCall(java.lang.String command)
Makes a call to the skandha graphics server to update the current scene
Parameters:
command - The current command to be processed by the skandha graphics server

createSkandhaTool

public int createSkandhaTool()
Serializes and saves the current tool to storage as created in this SkandhaBox Provides a process for loading the saved tool

saveSkandhaScene

public int saveSkandhaScene()
Saves the current skandha4 scene

createSkandhaForm

public java.lang.String createSkandhaForm()
Writes out the current tool as a Web publishable HTML document with built-in CGI communications

setCurrentUser

public void setCurrentUser(java.lang.String cu)
Sets the current user of the skandha Box applet
Parameters:
cu - The login name of the current user

paint

public void paint(java.awt.Graphics g)
Paints the skandha Box components
Overrides:
paint in class java.awt.Canvas
Parameters:
g - The graphics context

getSkandhaOutput

public SkandhaGUIComponent getSkandhaOutput()
Returns a handle to the SkandhaOutput control

mouseUp

public boolean mouseUp(java.awt.Event e,
                       int x,
                       int y)
handles mouse up events that occur within the bounds of the SkandhaBox
Overrides:
mouseUp in class java.awt.Component
Parameters:
e - The mouse up event
x - The x location of the mouse
y - The y location of the mouse

mouseDown

public boolean mouseDown(java.awt.Event e,
                         int x,
                         int y)
handles mouse down events that occur within the bounds of the SkandhaBox, forwarding processing responsibility to the appropriate GUI component
Overrides:
mouseDown in class java.awt.Component
Parameters:
e - The mouse down event
x - The x location of the mouse
y - The y location of the mouse

mouseDrag

public boolean mouseDrag(java.awt.Event e,
                         int x,
                         int y)
handles mouse drag events that occur within the bounds of the SkandhaBox
Overrides:
mouseDrag in class java.awt.Component
Parameters:
e - The mouse drag event
x - The x location of the mouse
y - The y location of the mouse