|
||||||||||
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 class pivot.wtk.media.drawing.Shape |
---|
Shape.Rotate, Shape.Scale, Shape.Transform, Shape.TransformSequence, Shape.Translate |
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. |
void |
draw(Graphics2D graphics)
|
Shape |
get(int index)
Retrieves the item at the given index. |
ListenerList<GroupListener> |
getGroupListeners()
|
int |
getLength()
Returns the length of the sequence. |
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. |
Iterator<Shape> |
iterator()
|
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. |
void |
setFill(Paint fill)
|
void |
setStroke(Paint stroke)
|
void |
setStrokeThickness(int strokeThickness)
|
Shape |
update(int index,
Shape shape)
Updates the item at the given index. |
protected void |
validate()
|
Methods inherited from class pivot.wtk.media.drawing.Shape |
---|
getBounds, getFill, getOrigin, getParent, getShapeListeners, getShapeTransformListeners, getStroke, getStrokeThickness, getTransformedBounds, getTransforms, getX, getY, invalidate, isValid, isVisible, setBounds, setFill, setOrigin, setOrigin, setParent, setStroke, setVisible, setX, setY, update, update, update |
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 void setFill(Paint fill)
setFill
in class Shape
public void setStroke(Paint stroke)
setStroke
in class Shape
public void setStrokeThickness(int strokeThickness)
setStrokeThickness
in class Shape
public void draw(Graphics2D graphics)
draw
in class Shape
protected void validate()
validate
in class Shape
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 Iterator<Shape> iterator()
iterator
in interface Iterable<Shape>
public ListenerList<GroupListener> getGroupListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |