fr.inria.insitu.glite
Class LiteComponent

java.lang.Object
  extended by fr.inria.insitu.glite.Lite
      extended by fr.inria.insitu.glite.nodes.LiteBounded
          extended by fr.inria.insitu.glite.LiteComponent
All Implemented Interfaces:
Bounded, Colored

public class LiteComponent
extends LiteBounded

LiteComponent is a toplevel Java component and the root Lite object holding a LiteGroup.

To create a LiteComponent, use the following code:

 Frame frame = new Frame();
 frame.setSize(500, 500);
 GLCanvas canvas = new GLCanvas();
 frame.add(canvas);
 
 LiteComponent liteComp = new LiteComponent(canvas);
 LiteGroup group = liteComp.getLite();
 

Version:
$Revision: 1.18 $
Author:
Jean-Daniel Fekete

Constructor Summary
LiteComponent(javax.media.opengl.GLAutoDrawable drawable)
          Creates a LiteComponent with a specified GLAutoDrawable.
 
Method Summary
 void addActivity(Activity activity)
          Adds an activity to the ActivityScheduler.
 void dispose()
          Releases all the resources maintained by this LiteComponent.
 ActivityScheduler getActivityScheduler()
           
 LiteComponent getComponent()
          
 javax.media.opengl.GLAutoDrawable getDrawable()
          Returns the drawable.
 LiteGroup getLite()
          Returns the LiteGroup managed by this LiteComponent.
 void paint(LitePaintContext ctx)
          Abstract method to called when the Lite should be painted.
 void repaint()
          Triggers a repaint in the future.
 void setLite(LiteGroup group)
          Sets the toplevel LiteGroup on this LiteComponent.
 
Methods inherited from class fr.inria.insitu.glite.nodes.LiteBounded
getBounds, getBoundsReference, getColor, getPosition, pick, pickAll, setBounds, setBounds, setColor, setPosition
 
Methods inherited from class fr.inria.insitu.glite.Lite
descendantModified, getChild, getChildrenCount, getHeight, getParent, getWidth, getX, getY, indexOf, modified, moveBy, pick, setParent, setPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteComponent

public LiteComponent(javax.media.opengl.GLAutoDrawable drawable)
Creates a LiteComponent with a specified GLAutoDrawable.

Parameters:
drawable - the GLAutoDrawable
Method Detail

dispose

public void dispose()
Releases all the resources maintained by this LiteComponent.


getLite

public LiteGroup getLite()
Returns the LiteGroup managed by this LiteComponent.

Returns:
the LiteGroup managed by this LiteComponent

setLite

public void setLite(LiteGroup group)
Sets the toplevel LiteGroup on this LiteComponent.

Parameters:
group - the new LiteGroup

getDrawable

public javax.media.opengl.GLAutoDrawable getDrawable()
Returns the drawable.

Returns:
the drawable

repaint

public void repaint()
Triggers a repaint in the future.


getActivityScheduler

public ActivityScheduler getActivityScheduler()
Returns:
Returns the activityScheduler.

addActivity

public void addActivity(Activity activity)
Adds an activity to the ActivityScheduler.

Parameters:
activity - the activity

paint

public void paint(LitePaintContext ctx)
Abstract method to called when the Lite should be painted.

Overrides:
paint in class LiteBounded
Parameters:
ctx - the LitePaintContext

getComponent

public LiteComponent getComponent()

Overrides:
getComponent in class Lite
Returns:
the LiteComponent or null


Copyright © 2006 by Jean-Daniel Fekete and INRIA, France All rights reserved.