com.sun.scenario.scenegraph
Class SGComponent

java.lang.Object
  extended by com.sun.scenario.scenegraph.SGNode
      extended by com.sun.scenario.scenegraph.SGLeaf
          extended by com.sun.scenario.scenegraph.SGComponent

public class SGComponent
extends SGLeaf

A scene graph node that renders a Swing component.


Constructor Summary
SGComponent()
           
 
Method Summary
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform transform)
          Returns the bounding box of this node relative to the specified coordinate space.
 java.awt.Component getComponent()
           
 java.awt.Dimension getSize()
          Returns the target size of this SGComponent, which may be null if it has not already been set, or if it was explicitly set to null.
 void paint(java.awt.Graphics2D g)
           
 void setComponent(java.awt.Component component)
           
 void setSize(java.awt.Dimension size)
          Sets the target size of this SGComponent.
 void setSize(int width, int height)
          Sets the target size of this SGComponent.
 
Methods inherited from class com.sun.scenario.scenegraph.SGLeaf
repaint, repaint
 
Methods inherited from class com.sun.scenario.scenegraph.SGNode
addFocusListener, addKeyListener, addMouseListener, addNodeListener, contains, getAttribute, getBounds, getID, getPanel, getParent, globalToLocal, isVisible, localToGlobal, pick, putAttribute, removeFocusListener, removeKeyListener, removeMouseListener, removeNodeListener, requestFocus, setID, setVisible, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SGComponent

public SGComponent()
Method Detail

getComponent

public final java.awt.Component getComponent()

setComponent

public void setComponent(java.awt.Component component)

getSize

public java.awt.Dimension getSize()
Returns the target size of this SGComponent, which may be null if it has not already been set, or if it was explicitly set to null.


setSize

public void setSize(java.awt.Dimension size)
Sets the target size of this SGComponent. If size is null, this node will be laid out according to the preferred size of its Component.


setSize

public void setSize(int width,
                    int height)
Sets the target size of this SGComponent. This is equivalent to calling:
     setSize(new Dimension(width, height));
 


paint

public void paint(java.awt.Graphics2D g)
Specified by:
paint in class SGLeaf

getBounds

public final java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform transform)
Description copied from class: SGNode
Returns the bounding box of this node relative to the specified coordinate space.

Specified by:
getBounds in class SGNode
Parameters:
transform - the transform applied to the geometry