com.wirefusion.player
Class SceneWobBase
java.lang.Object
com.wirefusion.player.Wob
com.wirefusion.player.SceneWobBase
- Direct Known Subclasses:
- SceneWob
public abstract class SceneWobBase
- extends Wob
The super class of SceneWob
|
Method Summary |
int |
getMemoryUsage()
Returns the approximate memory used by this
object (in bytes). |
java.awt.Dimension |
getStageDimension()
Returns the stage dimension |
WfImage |
getStageImage()
Returns a WFImage object containing the stage pixels. |
void |
paint(java.awt.Graphics g)
Paints this component. |
void |
printMemoryUsageInfo(java.io.PrintStream out)
Prints information about the memory usage to the PrintStream parameter. |
void |
render()
Renders this scene if its contents has changed since the last time it was rendered. |
| Methods inherited from class com.wirefusion.player.Wob |
addChild, addFocusListener, addInteractiveSceneChild, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, contains, destroy, disableEvents, enableEvents, filterPixels, getAwtComponent, getBounds, getChild, getChildren, getCore, getCursor, getInPort, getName, getOutPort, getParent, getResource, getResourceById, getSize, init, isFocusable, isVisible, prepareForSceneRender, processComponentEvent, processEvent, processFocusEvent, processInportEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processPlayerEvent, readData, removeChild, repaint, repaint, requestFocus, send, sendBoolean, sendColor, sendNumber, sendNumber2D, sendPulse, sendText, setBounds, setCursor, setLayer, setLocation, setName, setSize, setVisible, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getStageDimension
public java.awt.Dimension getStageDimension()
- Returns the stage dimension
- Returns:
- the stage dimension
getStageImage
public WfImage getStageImage()
- Returns a WFImage object containing the stage pixels.
Note: If graphical objects have only been "stamped" on the Scene, not activated,
a special "stamp buffer" WFImage will be returned instead of the normal stage image
object (to preserve memory). Because of this, make sure to update any references to
the stage image in each frame.
- Returns:
- a WFImage object containing the stage pixels
getMemoryUsage
public int getMemoryUsage()
- Description copied from class:
Wob
- Returns the approximate memory used by this
object (in bytes). The returned value is used by the memory profiler.
If no more than a few kilobytes is used by the Wob, or if you don't
have a need for memory profiling of this object, then you can skip
overriding this method. The default value returned is 0.
- Overrides:
getMemoryUsage in class Wob
- Returns:
- the approximate number of bytes used by this object
printMemoryUsageInfo
public void printMemoryUsageInfo(java.io.PrintStream out)
- Description copied from class:
Wob
- Prints information about the memory usage to the PrintStream parameter.
This method is invoked when you call the memory profiling command
"showxd" for this object. Override if you want the memory profiler to
be able to display memory information about this object (in addition
to the total memory used by the object).
- Overrides:
printMemoryUsageInfo in class Wob
render
public void render()
- Renders this scene if its contents has changed since the last time it was rendered.
Only has effect for "real" scenes, i.e. offscreen Scenes and Scenes with opaque background. This method should only be called from
the method prepareForSceneRender() in Wob objects.
paint
public void paint(java.awt.Graphics g)
- Description copied from class:
Wob
- Paints this component.
This method is called when the contents of the object should be
painted; such as when the component is first being shown or is
damaged and in need of repair. The method is similar to
java.awt.Component.paint(). The graphics parameter can
be cast to the class com.wirefusion.player.WFGraphics for access to
more functions. If this method is not overridden, it will call the
filterPixels() method. Do not call super.paint() in this method.
- Overrides:
paint in class Wob
- Parameters:
g - the graphics context to use for painting