public interface StrPaintInterface
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getCurrentString()
返回当前的字符串
|
void |
init(int width,
int hight)
以指定宽高初始化一段缓存
|
void |
paintLine(int x1,
int y1,
int x2,
int y2,
char ch)
画一个直线
|
void |
paintPoint(int x,
int y,
char ch)
将指定点设置为指定字符
|
void |
paintRect(int x1,
int y1,
int x2,
int y2,
char ch)
使用指定字符填充矩形
|
void |
paintStr(int x,
int y,
java.lang.String str)
从指定位置开始填充一段字符串
|
void |
setCharAt(int pBuffer,
char ch)
以实际字符串中的位置设置字符
|
void |
setStrAt(int pBuffer,
java.lang.String str)
以实际字符串中的位置设置字符串
|
void init(int width, int hight) throws java.lang.RuntimeException
width
- 单行宽度hight
- 行数java.lang.RuntimeException
- 宽度或高度非法的情况下void setCharAt(int pBuffer, char ch) throws java.lang.IndexOutOfBoundsException
pBuffer
- 要设置的位置的指针ch
- 要设置为的字符java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下void setStrAt(int pBuffer, java.lang.String str) throws java.lang.IndexOutOfBoundsException
pBuffer
- 要设置的位置的指针str
- 要设置为的字符串java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下void paintPoint(int x, int y, char ch) throws java.lang.IndexOutOfBoundsException
x
- 要操作的x坐标y
- 要操作的y坐标ch
- 要设置为的字符java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下void paintRect(int x1, int y1, int x2, int y2, char ch) throws java.lang.IndexOutOfBoundsException
x1
- 起始点的x坐标y1
- 起始点的y坐标x2
- 结束点的x坐标y2
- 结束点的y坐标ch
- 要设置为的字符java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下void paintStr(int x, int y, java.lang.String str) throws java.lang.IndexOutOfBoundsException
x
- 要操作的x坐标y
- 要操作的y坐标str
- 要设置为的字符串java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下void paintLine(int x1, int y1, int x2, int y2, char ch) throws java.lang.IndexOutOfBoundsException
x1
- 起始点的x坐标y1
- 起始点的y坐标x2
- 结束点的x坐标y2
- 结束点的y坐标ch
- 要设置为的字符java.lang.IndexOutOfBoundsException
- 如果要设置的位置超出有效范围或会覆盖换行的情况下java.lang.String getCurrentString() throws java.lang.RuntimeException
java.lang.RuntimeException
- 还未曾执行过init时