|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavalib.worldimages.AImage
javalib.worldimages.ColoredImage
javalib.worldimages.TextImage
class TextImage
An image of some text.
Copyright 2012 Viera K. Proulx
This program is distributed under the terms of the GNU Lesser General Public License (LGPL)
Field Summary | |
---|---|
(package private) static float |
defaultSize
|
Fields inherited from class javalib.worldimages.ColoredImage |
---|
defaultColor |
Fields inherited from interface javalib.worldimages.WorldImage |
---|
LOOKS_SAME |
Method Summary | |
---|---|
void |
draw(Graphics2D g)
Draw this image in the provided Graphics2D context. |
boolean |
equals(Object o)
Is this TextImage same as the given object? |
int |
getBottom()
Produce the height of this text image (based on its size) |
int |
getRight()
Produce the width of this image. |
int |
hashCode()
The hashCode to match the equals method |
(package private) static TextImage |
make(String text)
|
(package private) static TextImage |
make(String text,
Color color)
|
(package private) static TextImage |
make(String text,
float size)
|
(package private) static TextImage |
make(String text,
float size,
Color color)
|
(package private) static TextImage |
make(String text,
float size,
IColor color)
|
(package private) static TextImage |
make(String text,
float size,
TextStyle style)
|
(package private) static TextImage |
make(String text,
float size,
TextStyle style,
Color color)
|
(package private) static TextImage |
make(String text,
float size,
TextStyle style,
IColor color)
|
(package private) static TextImage |
make(String text,
IColor color)
|
(package private) static TextImage |
make(String text,
TextStyle style)
|
(package private) static TextImage |
make(String text,
TextStyle style,
Color color)
|
(package private) static TextImage |
make(String text,
TextStyle style,
IColor color)
|
(package private) ColoredImage |
replaceColor(Color color)
Functional setter for the color field Define this in all concrete subclasses. |
(package private) ColoredImage |
replaceMode(Mode newMode)
Functional setter for the mode field Define this in all concrete subclasses. |
protected void |
setWidthHeight()
Compute and set the width and the height for this text in the given style and size. |
String |
toIndentedString(String indent)
Produce a String that represents this image,
indented by the given indent |
Methods inherited from class javalib.worldimages.ColoredImage |
---|
getColor, getMode, replaceColor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final float defaultSize
Method Detail |
---|
public void draw(Graphics2D g)
Graphics2D
context.
g
- the provided Graphics2D
contextpublic boolean equals(Object o)
TextImage
same as the given object?
equals
in interface WorldImage
equals
in class ColoredImage
o
- the object to compare with this
public int getBottom()
public int getRight()
public int hashCode()
hashCode
in interface WorldImage
hashCode
in class ColoredImage
static TextImage make(String text)
static TextImage make(String text, Color color)
static TextImage make(String text, float size)
static TextImage make(String text, float size, Color color)
static TextImage make(String text, float size, IColor color)
static TextImage make(String text, float size, TextStyle style)
static TextImage make(String text, float size, TextStyle style, Color color)
static TextImage make(String text, float size, TextStyle style, IColor color)
static TextImage make(String text, IColor color)
static TextImage make(String text, TextStyle style)
static TextImage make(String text, TextStyle style, Color color)
static TextImage make(String text, TextStyle style, IColor color)
ColoredImage replaceColor(Color color)
ColoredImage
replaceColor
in class ColoredImage
ColoredImage replaceMode(Mode newMode)
ColoredImage
replaceMode
in class ColoredImage
protected void setWidthHeight()
public String toIndentedString(String indent)
String
that represents this image,
indented by the given indent
indent
- the given prefix representing the desired indentation
String
representation of this image
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |