|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.slashie.libjcsi.textcomponents.TextComponent
public abstract class TextComponent
Basic framework for all text components.
| Constructor Summary | |
|---|---|
TextComponent(ConsoleSystemInterface si)
Creates a new TextComponent within the specified interface. |
|
| Method Summary | |
|---|---|
void |
clearBox()
Erases content of the component, but leaves component. |
abstract void |
draw()
Prints the componenet to the interface. |
void |
drawBorder()
If there is supposed to be a border then draws a border, otherwise returns without doing anything. |
int |
getForeColor()
|
int |
getHeight()
|
int |
getWidth()
|
boolean |
hasBorder()
|
void |
setBorder(boolean value)
Allows for setting whether there should be a border. |
void |
setBorderColor(CSIColor color)
Allows for the setting of the border's color independently of the content's color. |
void |
setBorderColor(int color)
Allows for the setting of the border's color independently of the content's color. |
void |
setBounds(int x,
int y,
int width,
int height)
Allows for setting the upper left corner and width and height in one method. |
void |
setForeColor(CSIColor color)
Allows for setting of the color using CSIColor. |
void |
setForeColor(int color)
Allows for setting of the color using int codes. |
void |
setHeight(int value)
|
void |
setPosition(int x,
int y)
Sets the upper left corner of text component within its interface. |
void |
setWidth(int value)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextComponent(ConsoleSystemInterface si)
si - interface to be created within| Method Detail |
|---|
public void setPosition(int x,
int y)
x - horizontal positiony - vertical positionpublic int getWidth()
public void setWidth(int value)
value - how wide the componenet should be.public int getHeight()
public void setHeight(int value)
value - the desired height of the componentpublic abstract void draw()
public int getForeColor()
public void setForeColor(int color)
color - int code for color desiredpublic void setForeColor(CSIColor color)
color - color desiredpublic void setBorder(boolean value)
value - true if border desired
public void setBounds(int x,
int y,
int width,
int height)
x - horizontal starting pointy - vertical starting pointwidth - horizontal widthheight - vertical heightpublic void clearBox()
public boolean hasBorder()
public void drawBorder()
public void setBorderColor(int color)
color - the int code for the color desiredpublic void setBorderColor(CSIColor color)
color - color desired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||