240 * to be implemented.
241 * @see java.awt.peer.TextComponentPeer
242 */
243 public void setCaretPosition(int position) {
244 if (xtext != null) xtext.setCaretPosition(position);
245 }
246
247 /**
248 * DEPRECATED
249 * @see java.awt.peer.TextFieldPeer
250 */
251 public void setEchoCharacter(char c) {
252 setEchoChar(c);
253 }
254
255 void repaintText() {
256 xtext.repaintNow();
257 }
258
259 public void setBackground(Color c) {
260 if (log.isLoggable(Level.FINE)) log.fine("target="+ target + ", old=" + background + ", new=" + c);
261 background = c;
262 if (xtext != null) {
263 xtext.setBackground(c);
264 xtext.setSelectedTextColor(c);
265 }
266 repaintText();
267 }
268
269 public void setForeground(Color c) {
270 foreground = c;
271 if (xtext != null) {
272 xtext.setForeground(foreground);
273 xtext.setSelectionColor(foreground);
274 xtext.setCaretColor(foreground);
275 }
276 repaintText();
277 }
278
279 public void setFont(Font f) {
280 synchronized (getStateLock()) {
|
240 * to be implemented.
241 * @see java.awt.peer.TextComponentPeer
242 */
243 public void setCaretPosition(int position) {
244 if (xtext != null) xtext.setCaretPosition(position);
245 }
246
247 /**
248 * DEPRECATED
249 * @see java.awt.peer.TextFieldPeer
250 */
251 public void setEchoCharacter(char c) {
252 setEchoChar(c);
253 }
254
255 void repaintText() {
256 xtext.repaintNow();
257 }
258
259 public void setBackground(Color c) {
260 if (log.isLoggable(Level.FINE)) {
261 log.fine("target="+ target + ", old=" + background + ", new=" + c);
262 }
263 background = c;
264 if (xtext != null) {
265 xtext.setBackground(c);
266 xtext.setSelectedTextColor(c);
267 }
268 repaintText();
269 }
270
271 public void setForeground(Color c) {
272 foreground = c;
273 if (xtext != null) {
274 xtext.setForeground(foreground);
275 xtext.setSelectionColor(foreground);
276 xtext.setCaretColor(foreground);
277 }
278 repaintText();
279 }
280
281 public void setFont(Font f) {
282 synchronized (getStateLock()) {
|