flatscape.glyph
Class ImageGlyph

java.lang.Object
  |
  +--manifold.base.Glyph
        |
        +--flatscape.FGlyph
              |
              +--flatscape.glyph.ImageGlyph
All Implemented Interfaces:
java.lang.Cloneable, Configurable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class ImageGlyph
extends FGlyph

Glyph to render bitmap images.

Properties:

source The URL of the image

Copyright (c) 2003 Rutgers, The State University of New Jersey

Since:
flatscape v3.0
Version:
$Revision: 1.2 $

Field Summary
protected  double height_
           
protected  java.awt.Image image_
          Symbol image for faster redraw
protected  java.awt.Shape shape_
           
protected  double width_
           
 
Fields inherited from class flatscape.FGlyph
curInteractionPoint, DEFAULT, interactionPoints, POINTSIZE, selected_
 
Fields inherited from class manifold.base.Glyph
model_, TRANSFORM, viewer_, visible_
 
Constructor Summary
ImageGlyph()
           
 
Method Summary
 void draw(Traversal t)
          Draws the image, called by the traverse method of FGlyph.
protected  java.awt.Shape getBoundingShape()
          Gets the bounding shape of the glyph.
protected  void loadImage(java.lang.String urlString)
          Loads the image and sets the bounding box - shape_.
 void propertyChange(org.w3c.dom.Element model, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
          Method called by FSceneGraph when a change of a property has occured.
 
Methods inherited from class flatscape.FGlyph
addInteractionPoint, children, config, constructGlyph, drawSelectionBox, getAllowsChildren, getChildAt, getChildCount, getIndex, getInteractionPoint, getLimits, getParent, getTransform, getTransform, insert, isLeaf, moveInteractionPoint, pick, pickInteractionPoint, remove, remove, removeFromParent, setInteractionPoint, setModel, setParent, setSelected, setUserObject, toString, traverse, updateInteractionPoints, updateProperties, validTypes
 
Methods inherited from class manifold.base.Glyph
getModel, getViewer, isVisible, setViewer, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width_

protected double width_

height_

protected double height_

image_

protected java.awt.Image image_
Symbol image for faster redraw


shape_

protected java.awt.Shape shape_
Constructor Detail

ImageGlyph

public ImageGlyph()
Method Detail

getBoundingShape

protected java.awt.Shape getBoundingShape()
Description copied from class: FGlyph
Gets the bounding shape of the glyph. Must be overridden by sub-classes if the pick(Traversal t) method of FGlyph is to be used

Overrides:
getBoundingShape in class FGlyph
Returns:
the bounding shape of the image, used for select indicators

draw

public void draw(Traversal t)
Draws the image, called by the traverse method of FGlyph.

Overrides:
draw in class FGlyph
Parameters:
t - keeps the state of the traversal

loadImage

protected void loadImage(java.lang.String urlString)
Loads the image and sets the bounding box - shape_.


propertyChange

public void propertyChange(org.w3c.dom.Element model,
                           java.lang.String name,
                           java.lang.Object oldValue,
                           java.lang.Object newValue)
Method called by FSceneGraph when a change of a property has occured.

Overrides:
propertyChange in class FGlyph
Parameters:
name - the name of the property
oldValue - the old value of the property
newValue - the new value of the property


Copyright (c) 2003 Rutgers, The State University of New Jersey