|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.media.drawing.Shape
pivot.wtk.media.drawing.Group
public class Group
Shape representing a collection of other shapes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Constructor Summary | |
---|---|
Group()
|
Method Summary | |
---|---|
int |
add(Shape shape)
Adds an item to the sequence. |
boolean |
contains(int x,
int y)
TODO Subclasses should override this method to perform an inverse transformation and map to the untransformed coordinate space. |
Shape |
get(int index)
Retrieves the item at the given index. |
Shape |
getDescendantAt(int x,
int y)
|
int |
getHeight()
Returns the visual's height. |
int |
getLength()
Returns the length of the sequence. |
Shape |
getShapeAt(int x,
int y)
|
int |
getWidth()
Returns the visual's width. |
int |
indexOf(Shape shape)
Returns the index of an item in the sequence. |
void |
insert(Shape shape,
int index)
Inserts an item into the sequence at a specific index. |
java.util.Iterator<Shape> |
iterator()
|
void |
paint(java.awt.Graphics2D graphics)
Paints the visual. |
Sequence<Shape> |
remove(int index,
int count)
Removes one or more items from the sequence. |
int |
remove(Shape shape)
Removes the first occurrence of the given item from the sequence. |
Shape |
update(int index,
Shape shape)
Updates the item at the given index. |
Methods inherited from class pivot.wtk.media.drawing.Shape |
---|
getBounds, getFill, getOrigin, getParent, getRotation, getScaleX, getScaleY, getStroke, getStrokeThickness, getTransform, getTranslateX, getTranslateY, getX, getY, setFill, setFill, setOrigin, setOrigin, setParent, setRotation, setScaleX, setScaleY, setStroke, setStroke, setStrokeThickness, setTranslateX, setTranslateY, setX, setY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Group()
Method Detail |
---|
public int getWidth()
Visual
getWidth
in interface Visual
public int getHeight()
Visual
getHeight
in interface Visual
public void paint(java.awt.Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public int add(Shape shape)
Sequence
add
in interface Sequence<Shape>
shape
- The item to be added to the sequence.
public void insert(Shape shape, int index)
Sequence
insert
in interface Sequence<Shape>
shape
- The item to be added to the sequence.index
- The index at which the item should be inserted. Must be a value between
0 and getLength().public Shape update(int index, Shape shape)
Sequence
update
in interface Sequence<Shape>
index
- The index of the item to update.shape
- The item that will replace any existing value at the given index.
public int remove(Shape shape)
Sequence
remove
in interface Sequence<Shape>
shape
- The item to remove.
Sequence.remove(int, int)
public Sequence<Shape> remove(int index, int count)
Sequence
remove
in interface Sequence<Shape>
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
public Shape get(int index)
Sequence
get
in interface Sequence<Shape>
index
- The index of the item to retrieve.public int indexOf(Shape shape)
Sequence
indexOf
in interface Sequence<Shape>
shape
- The item to locate.
public int getLength()
Sequence
getLength
in interface Sequence<Shape>
public boolean contains(int x, int y)
Shape
contains
in class Shape
public Shape getShapeAt(int x, int y)
public Shape getDescendantAt(int x, int y)
public java.util.Iterator<Shape> iterator()
iterator
in interface java.lang.Iterable<Shape>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |