|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.slides.items.SlideItem
edu.rit.slides.items.TextItem
public class TextItem
Class TextItem provides a slide item consisting of a single line of text. The text is all one font and color.
The line of text occupies a certain rectangular box. The text box includes the text's ascenders and descenders, but not the leading. The text box may be placed on the slide at one of nine positions relative to a specified "anchor point." The text position is specified by one of the following constants:
The text may optionally have a Bullet
attached.
The bullet is always located to the left of the text. The offset from the
left side of the bullet to the left side of the text is specified when the
bullet object is constructed.
Class TextItem keeps track of the "last text item." The static TextItem.last() method returns a reference to the last created text item.
When a TextItem is created, the "last point" (returned by the Point.last() method) is set to the text item's anchor point, offset in the positive Y direction by a distance equal to the "newline factor" times the font size. This is typically the point at which to place the next text item.
Static setDefaultXXX() methods are provided to set the default attribute values (position, font, fill, bullet, and newline factor). If an attribute value is not specified when constructing a text item, the current default attribute value is used.
Field Summary | |
---|---|
static int |
ABOVE
The text box is positioned above the anchor point. |
static int |
ABOVE_LEFT
The text box is positioned above and to the left of the anchor point. |
static int |
ABOVE_RIGHT
The text box is positioned above and to the right of the anchor point. |
static int |
BELOW
The text box is positioned below the anchor point. |
static int |
BELOW_LEFT
The text box is positioned below and to the left of the anchor point. |
static int |
BELOW_RIGHT
The text box is positioned below and to the right of the anchor point. |
static int |
CENTER
The text box is centered on the anchor point. |
static int |
LEFT
The text box is positioned to the left of the anchor point. |
static Fill |
NORMAL_FILL
The normal fill (black). |
static Font |
NORMAL_FONT
The normal text font (sanserif, plain, 24 point). |
static double |
NORMAL_NEWLINE
The normal newline factor (1.25). |
static int |
RIGHT
The text box is positioned to the right of the anchor point. |
Constructor Summary | |
---|---|
TextItem()
Construct a new, empty text item. |
|
TextItem(String theText)
Construct a new text item with the given text. |
|
TextItem(String theText,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Fill theFill)
Construct a new text item with the given text. |
|
TextItem(String theText,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Fill theFill,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Fill theFill)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Font theFont,
Fill theFill,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Fill theFill)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Fill theFill,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Fill theFill)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
int thePosition,
Font theFont,
Fill theFill,
double theNewline)
Construct a new text item with the given text. |
|
TextItem(String theText,
Point theAnchor)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Fill theFill)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Fill theFill,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Fill theFill)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
Font theFont,
Fill theFill,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Fill theFill)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Fill theFill,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Fill theFill)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Fill theFill,
Bullet theBullet)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Fill theFill,
Bullet theBullet,
double theNewline)
Construct a new text item with the given text and anchor point. |
|
TextItem(String theText,
Point theAnchor,
int thePosition,
Font theFont,
Fill theFill,
double theNewline)
Construct a new text item with the given text and anchor point. |
Method Summary | |
---|---|
void |
draw(Graphics2D g2d)
Draw this slide item in the given graphics context. |
static TextItem |
last()
Returns the last text item created. |
Point |
location()
Returns this text item's location, namely its anchor point. |
Point |
next()
Returns this text item's next location. |
void |
readExternal(ObjectInput in)
Read this text item from the given object input stream. |
static void |
setDefaultBullet(Bullet theBullet)
Set the default bullet. |
static void |
setDefaultFill(Fill theFill)
Set the default fill paint. |
static void |
setDefaultFont(Font theFont)
Set the default font. |
static void |
setDefaultNewline(double theNewline)
Set the default newline factor. |
static void |
setDefaultPosition(int thePosition)
Set the default text position. |
void |
writeExternal(ObjectOutput out)
Write this text item 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 ABOVE_LEFT
public static final int ABOVE
public static final int ABOVE_RIGHT
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BELOW_LEFT
public static final int BELOW
public static final int BELOW_RIGHT
public static final Font NORMAL_FONT
public static final Fill NORMAL_FILL
public static final double NORMAL_NEWLINE
Constructor Detail |
---|
public TextItem()
public TextItem(String theText)
theText
- Text.
NullPointerException
- (unchecked exception) Thrown if theText is null.public TextItem(String theText, double theNewline)
theText
- Text.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null.public TextItem(String theText, Bullet theBullet)
theText
- Text.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null.public TextItem(String theText, Bullet theBullet, double theNewline)
theText
- Text.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null.public TextItem(String theText, Fill theFill)
theText
- Text.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.public TextItem(String theText, Fill theFill, double theNewline)
theText
- Text.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.public TextItem(String theText, Fill theFill, Bullet theBullet)
theText
- Text.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.public TextItem(String theText, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.public TextItem(String theText, Font theFont)
theText
- Text.theFont
- Font.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.public TextItem(String theText, Font theFont, double theNewline)
theText
- Text.theFont
- Font.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.public TextItem(String theText, Font theFont, Bullet theBullet)
theText
- Text.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.public TextItem(String theText, Font theFont, Bullet theBullet, double theNewline)
theText
- Text.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.public TextItem(String theText, Font theFont, Fill theFill)
theText
- Text.theFont
- Font.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.public TextItem(String theText, Font theFont, Fill theFill, double theNewline)
theText
- Text.theFont
- Font.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.public TextItem(String theText, Font theFont, Fill theFill, Bullet theBullet)
theText
- Text.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.public TextItem(String theText, Font theFont, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.public TextItem(String theText, int thePosition)
theText
- Text.thePosition
- Text position relative to the anchor point.
NullPointerException
- (unchecked exception) Thrown if theText is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Bullet theBullet)
theText
- Text.thePosition
- Text position relative to the anchor point.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Bullet theBullet, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Fill theFill)
theText
- Text.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Fill theFill, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Fill theFill, Bullet theBullet)
theText
- Text.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Bullet theBullet)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Bullet theBullet, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Fill theFill)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Fill theFill, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Fill theFill, Bullet theBullet)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, int thePosition, Font theFont, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theFont is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor)
theText
- Text.theAnchor
- Anchor point.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.public TextItem(String theText, Point theAnchor, double theNewline)
theText
- Text.theAnchor
- Anchor point.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.public TextItem(String theText, Point theAnchor, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.public TextItem(String theText, Point theAnchor, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.public TextItem(String theText, Point theAnchor, Fill theFill)
theText
- Text.theAnchor
- Anchor point.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.public TextItem(String theText, Point theAnchor, Fill theFill, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.public TextItem(String theText, Point theAnchor, Fill theFill, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.public TextItem(String theText, Point theAnchor, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.public TextItem(String theText, Point theAnchor, Font theFont)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.public TextItem(String theText, Point theAnchor, Font theFont, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.public TextItem(String theText, Point theAnchor, Font theFont, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.public TextItem(String theText, Point theAnchor, Font theFont, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.public TextItem(String theText, Point theAnchor, Font theFont, Fill theFill)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.public TextItem(String theText, Point theAnchor, Font theFont, Fill theFill, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.public TextItem(String theText, Point theAnchor, Font theFont, Fill theFill, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.public TextItem(String theText, Point theAnchor, Font theFont, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.public TextItem(String theText, Point theAnchor, int thePosition)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Fill theFill)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Fill theFill, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Fill theFill, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Fill theFill)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Fill theFill, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Fill theFill, Bullet theBullet)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public TextItem(String theText, Point theAnchor, int thePosition, Font theFont, Fill theFill, Bullet theBullet, double theNewline)
theText
- Text.theAnchor
- Anchor point.thePosition
- Text position relative to the anchor point.theFont
- Font.theFill
- Fill paint.theBullet
- Bullet. If null, no bullet is drawn.theNewline
- Newline factor.
NullPointerException
- (unchecked exception) Thrown if theText is null or
theAnchor is null or theFont is null or
theFill is null.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.Method Detail |
---|
public static TextItem last()
public static void setDefaultPosition(int thePosition)
thePosition
- Default text position relative to the anchor point.
IllegalArgumentException
- (unchecked exception) Thrown if thePosition is not one of
the allowed values.public static void setDefaultFont(Font theFont)
theFont
- Font.
NullPointerException
- (unchecked exception) Thrown if theFont is null.public static void setDefaultFill(Fill theFill)
theFill
- Fill paint.
NullPointerException
- (unchecked exception) Thrown if theFill is null.public static void setDefaultBullet(Bullet theBullet)
theBullet
- Bullet. If null, no bullet is drawn.public static void setDefaultNewline(double theNewline)
theNewline
- Newline factor.public Point location()
public Point next()
public void draw(Graphics2D g2d)
draw
in class SlideItem
g2d
- 2-D graphics context.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, ClassNotFoundException
readExternal
in interface Externalizable
in
- Object input stream.
IOException
- Thrown if an I/O error occurred.
ClassNotFoundException
- Thrown if any class needed to deserialize this text item cannot be
found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |