|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.ShapeDrawable
public class ShapeDrawable
A convenience class that makes it easy to specify a Drawable
using any
Shape
instance.
Constructor Summary | |
---|---|
ShapeDrawable(Shape shape,
Color fillColor)
Creates a new instance of ShapeDrawable |
|
ShapeDrawable(Shape shape,
Color fillColor,
Color lineColor)
Creates a new instance of ShapeDrawable |
|
ShapeDrawable(Shape shape,
Color fillColor,
Paint paint,
Color lineColor,
Stroke stroke)
Creates a new instance of ShapeDrawable |
Method Summary | |
---|---|
Rectangle |
getBounds()
returns the bounds of this drawable. |
Color |
getFillColor()
Getter for property fillColor. |
Color |
getLineColor()
Getter for property lineColor. |
Paint |
getPaint()
Getter for property paint. |
Shape |
getShape()
Getter for property shape. |
Stroke |
getStroke()
Getter for property stroke. |
void |
paint(Graphics2D g)
Paints itself on the given graphics context. |
void |
setFillColor(Color fillColor)
Setter for property fillColor. |
void |
setLineColor(Color lineColor)
Setter for property lineColor. |
void |
setPaint(Paint paint)
Setter for property paint. |
void |
setShape(Shape shape)
Setter for property shape. |
void |
setStroke(Stroke stroke)
Setter for property stroke. |
void |
updateBounds()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeDrawable(Shape shape, Color fillColor)
public ShapeDrawable(Shape shape, Color fillColor, Color lineColor)
public ShapeDrawable(Shape shape, Color fillColor, Paint paint, Color lineColor, Stroke stroke)
Method Detail |
---|
public Rectangle getBounds()
Drawable
getBounds
in interface Drawable
public void paint(Graphics2D g)
Drawable
paint
in interface Drawable
public Shape getShape()
public void setShape(Shape shape)
shape
- New value of property shape.public void updateBounds()
public Color getFillColor()
public void setFillColor(Color fillColor)
fillColor
- New value of property fillColor.public Color getLineColor()
public void setLineColor(Color lineColor)
lineColor
- New value of property lineColor.public Stroke getStroke()
public void setStroke(Stroke stroke)
stroke
- New value of property stroke.public Paint getPaint()
public void setPaint(Paint paint)
paint
- New value of property paint.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |