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
|
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.Level.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
|