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