Graphics2D Actor API

g2d.glyph
Class GlyphList

java.lang.Object
  extended by g2d.jlambda.Identifiable
      extended by g2d.jlambda.Attributable
          extended by g2d.glyph.Glyphish
              extended by g2d.glyph.GlyphList
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
Direct Known Subclasses:
IOPGraph, Spline, SubTextGlyph

public class GlyphList
extends Glyphish

The start of our next generation Ezd package. This class that wraps multiple Glyphish things into one while being Glyphish.

Since:
April -- July 2004
Author:
Ian A. Mason (with help from Carolyn Talcott & Ben Funnell), Linda (javadoc and some additions; synchronization over collection), Ian genericized it in January 2007.

Field Summary
static boolean debug
           
 
Fields inherited from class g2d.glyph.Glyphish
DEBUG
 
Constructor Summary
GlyphList()
           
GlyphList(java.util.ArrayList<Glyphish> glyphs)
           
GlyphList(GlyphList copy)
           
 
Method Summary
 void add(Glyphish g)
          Add something glyphish to this list.
 void add(Glyphish g, java.awt.geom.AffineTransform a)
          Add something glyphish to this list transforming it beforehand using given affine transformation.
 void add(int index, Glyphish g)
          Add something glyphish to this list.
 void clear()
           
 boolean contains(Glyphish g)
          Obtain whether this list contains given glyphish thing.
 void dump()
           
 Glyphish get(int index)
           
 java.awt.geom.Rectangle2D getBounds()
           
 Glyphish getGlyphThing(java.awt.geom.Point2D p)
           
 java.util.ListIterator<Glyphish> getListIterator()
          Obtain list iterator through list of Glyphish things.
 boolean inside(java.awt.geom.Point2D p)
           
 boolean intersects(java.awt.geom.Rectangle2D rect)
           
 int length()
          Obtain the current number of glyphish things in this list.
 void paint(java.awt.Graphics2D g2d)
           
 void remove(Glyphish g)
          Remove all occurences of given glyphish thing from this list.
 java.lang.String toString()
           
 void transform(java.awt.geom.AffineTransform a)
           
 
Methods inherited from class g2d.glyph.Glyphish
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, rotate, rotate, scale, setKeyAction, setMouseAction, shear, translate, unsetMouseAction
 
Methods inherited from class g2d.jlambda.Attributable
_getAttribute, _setAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsChar, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsShort, getAttributeAsString, getKeys, getStaticAttribute, getStaticKeys, isAttribute, isStaticAttribute, removeAllAttributes, removeAllStaticAttributes, removeAttribute, removeStaticAttribute, setAttribute, setStaticAttribute, showAttributes, showAttributes
 
Methods inherited from class g2d.jlambda.Identifiable
getObject, getUID, setUID, unsetUID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

GlyphList

public GlyphList()

GlyphList

public GlyphList(GlyphList copy)

GlyphList

public GlyphList(java.util.ArrayList<Glyphish> glyphs)
Method Detail

get

public Glyphish get(int index)

getGlyphThing

public Glyphish getGlyphThing(java.awt.geom.Point2D p)

getBounds

public java.awt.geom.Rectangle2D getBounds()
Specified by:
getBounds in class Glyphish

inside

public boolean inside(java.awt.geom.Point2D p)
Specified by:
inside in class Glyphish

intersects

public boolean intersects(java.awt.geom.Rectangle2D rect)
Specified by:
intersects in class Glyphish

add

public void add(Glyphish g)
Add something glyphish to this list. Does nothing if given glyphish thing is null.

Parameters:
g - Glyphish thing to be added

add

public void add(int index,
                Glyphish g)
Add something glyphish to this list. Does nothing if given glyphish thing is null.

Parameters:
g - Glyphish thing to be added

add

public void add(Glyphish g,
                java.awt.geom.AffineTransform a)
Add something glyphish to this list transforming it beforehand using given affine transformation. Does nothing if given glyphish thing is null.

Parameters:
g - Glyphish thing to be added
a - AffineTransform to be applied before addition

clear

public void clear()

remove

public void remove(Glyphish g)
Remove all occurences of given glyphish thing from this list. Does nothing if given glyphish thing is null.

Parameters:
g - Glyphish to be removed

contains

public boolean contains(Glyphish g)
Obtain whether this list contains given glyphish thing.

Parameters:
g - Glyphish to query list about
Returns:
true if list contains g, false otherwise

getListIterator

public java.util.ListIterator<Glyphish> getListIterator()
Obtain list iterator through list of Glyphish things. List contains Glyphish things in order that they were added.

Returns:
List iterator through list of Glyphish things

length

public int length()
Obtain the current number of glyphish things in this list.

Returns:
Number of glyphish things in this list

paint

public void paint(java.awt.Graphics2D g2d)
Specified by:
paint in class Glyphish

transform

public void transform(java.awt.geom.AffineTransform a)
Specified by:
transform in class Glyphish

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dump

public void dump()

Graphics2D Actor API