56 |
super(elem); |
super(elem); |
57 |
} |
} |
58 |
|
|
59 |
|
/** |
60 |
|
* Draws one echo character at a given position. |
61 |
|
* |
62 |
|
* @param g the <code>Graphics</code> object to draw to |
63 |
|
* @param x the x-position |
64 |
|
* @param y the y-position |
65 |
|
* @param ch the echo character |
66 |
|
* |
67 |
|
* @return the next x position right of the drawn character |
68 |
|
*/ |
69 |
protected int drawEchoCharacter(Graphics g, int x, int y, char ch) |
protected int drawEchoCharacter(Graphics g, int x, int y, char ch) |
70 |
{ |
{ |
71 |
// Update font metrics. |
// Update font metrics. |
89 |
return ch; |
return ch; |
90 |
} |
} |
91 |
|
|
92 |
|
/** |
93 |
|
* Draws selected text at a given position. |
94 |
|
* |
95 |
|
* @param g the <code>Graphics</code> object to draw to |
96 |
|
* @param x the x-position |
97 |
|
* @param y the y-position |
98 |
|
* @param p0 the position of the first character to draw |
99 |
|
* @param p1 the position of the first character not to draw |
100 |
|
* |
101 |
|
* @return the next x position right of the drawn character |
102 |
|
*/ |
103 |
protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) |
protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) |
104 |
throws BadLocationException |
throws BadLocationException |
105 |
{ |
{ |
128 |
return x + len * metrics.charWidth(ch); |
return x + len * metrics.charWidth(ch); |
129 |
} |
} |
130 |
|
|
131 |
|
/** |
132 |
|
* Draws unselected text at a given position. |
133 |
|
* |
134 |
|
* @param g the <code>Graphics</code> object to draw to |
135 |
|
* @param x the x-position |
136 |
|
* @param y the y-position |
137 |
|
* @param p0 the position of the first character to draw |
138 |
|
* @param p1 the position of the first character not to draw |
139 |
|
* |
140 |
|
* @return the next x position right of the drawn character |
141 |
|
*/ |
142 |
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) |
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) |
143 |
throws BadLocationException |
throws BadLocationException |
144 |
{ |
{ |