de.mud.bsx
Class BSXDisplay

java.lang.Object
  |
  +--java.awt.Component
        |
        +--de.mud.bsx.BSXDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public final class BSXDisplay
extends java.awt.Component

the visual component for displaying bsx data. Implementation of a BSX Display capable of handling basic BSX-Calls. Handles: @SCE, @DFS, @VIO, @RMO, @DFO, @RFS Uses: BSXCache, BSXObject, BSXScene

Version:
1.0
Author:
Thomas Kriegelstein (tk4@rb.mud.de)
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  BSXScene bsxscene
          drawable scene data
protected  java.awt.Dimension dim
          my minimum Dimension
protected static int[][] EMPTY_SCENE
          an empty scene (black rectangle)
protected  BSXCache objects
          the object-cache
protected  java.awt.Image picture
          The offscreen doublebuffer
protected  java.lang.String scene
          current scene name
protected  boolean sceneChanged
          redraw info
protected  BSXCache scenes
          the scene-cache
protected  BSXScene working
          current scene data
 
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
BSXDisplay()
           
 
Method Summary
 void addNotify()
           
 void defineObject(java.lang.String id, int[][] data)
           
 void defineScene(java.lang.String scene, int[][] data)
           
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
static void main(java.lang.String[] args)
           
 void paint(java.awt.Graphics g)
           
 void refreshScene()
           
 void removeNotify()
           
 void removeObject(java.lang.String obj)
           
 java.lang.String showObject(java.lang.String obj, int x, int y)
           
 java.lang.String showScene(java.lang.String scene)
           
 void update(java.awt.Graphics g)
           
 
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, getAccessibleContext, 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, getName, getParent, getPeer, 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, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, 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, 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, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

picture

protected java.awt.Image picture
The offscreen doublebuffer

scenes

protected BSXCache scenes
the scene-cache

objects

protected BSXCache objects
the object-cache

scene

protected java.lang.String scene
current scene name

bsxscene

protected BSXScene bsxscene
drawable scene data

working

protected BSXScene working
current scene data

sceneChanged

protected boolean sceneChanged
redraw info

dim

protected java.awt.Dimension dim
my minimum Dimension

EMPTY_SCENE

protected static final int[][] EMPTY_SCENE
an empty scene (black rectangle)
Constructor Detail

BSXDisplay

public BSXDisplay()
Method Detail

showScene

public java.lang.String showScene(java.lang.String scene)
Returns:
query for scene data if not in cache

defineScene

public void defineScene(java.lang.String scene,
                        int[][] data)

showObject

public java.lang.String showObject(java.lang.String obj,
                                   int x,
                                   int y)
Returns:
query for object data if not in cache

removeObject

public void removeObject(java.lang.String obj)

defineObject

public void defineObject(java.lang.String id,
                         int[][] data)

refreshScene

public void refreshScene()

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Component

addNotify

public void addNotify()
Overrides:
addNotify in class java.awt.Component

removeNotify

public void removeNotify()
Overrides:
removeNotify in class java.awt.Component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Component

main

public static void main(java.lang.String[] args)