|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.slides.items.Bullet
public class Bullet
Class Bullet provides various kinds of bullets that can be added to a TextItem
. The bullet is always added to the left of
the text item, with a specified distance from the left side of the bullet to
the left side of the text item.
Field Summary | |
---|---|
static int |
BULLET_KIND_CIRCLE
A kind of bullet in the shape of a medium sized circle. |
static int |
BULLET_KIND_DOT
A kind of bullet in the shape of a medium sized dot. |
static int |
BULLET_KIND_NONE
A kind of bullet with no shape. |
static Bullet |
CIRCLE
A bullet in the shape of a medium sized circle, offset 36.0 (1/2 inch) from the text item. |
static Bullet |
DOT
A bullet in the shape of a medium sized dot, offset 36.0 (1/2 inch) from the text item. |
static Bullet |
NONE
A nonexistent bullet. |
static double |
NORMAL_OFFSET
The normal bullet offset, 36.0 (1/2 inch). |
Constructor Summary | |
---|---|
Bullet()
Construct a new empty bullet. |
|
Bullet(int theKind)
Construct a new bullet of the given kind. |
|
Bullet(int theKind,
double theOffset)
Construct a new bullet of the given kind with the given offset. |
Method Summary | |
---|---|
void |
draw(Graphics2D g2d,
double ascent,
double x,
double y)
Draw this bullet in the given graphics context. |
void |
readExternal(ObjectInput in)
Read this bullet from the given object input stream. |
void |
writeExternal(ObjectOutput out)
Write this bullet to the given object output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BULLET_KIND_NONE
public static final int BULLET_KIND_DOT
public static final int BULLET_KIND_CIRCLE
public static final double NORMAL_OFFSET
public static final Bullet NONE
public static final Bullet DOT
public static final Bullet CIRCLE
Constructor Detail |
---|
public Bullet()
public Bullet(int theKind)
theKind
- Kind of bullet (one of the BULLET_KIND_XXX
values).
IllegalArgumentException
- (unchecked exception) Thrown if theKind is not one of the
legal kinds of bullet.public Bullet(int theKind, double theOffset)
theKind
- Kind of bullet (one of the BULLET_KIND_XXX
values).theOffset
- Offset from left side of bullet to left side of text.
IllegalArgumentException
- (unchecked exception) Thrown if theKind is not one of the
legal kinds of bullet.Method Detail |
---|
public void draw(Graphics2D g2d, double ascent, double x, double y)
g2d
- 2-D graphics context.ascent
- Text font ascent.x
- X coordinate of the left end of the text baseline.y
- Y coordinate of the left end of the text baseline.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- Object output stream.
IOException
- Thrown if an I/O error occurred.public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- Object input stream.
IOException
- Thrown if an I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |