Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.ui
Class Components

java.lang.Object
  extended by oracle.javatools.ui.Components

public final class Components
extends java.lang.Object

Utilities for working with Swing components.

Since:
11.1.1.0.0

Method Summary
static javax.swing.JLayeredPane findLayeredPane(java.awt.Component target)
          Finds the layered pane for a component.
static void moveCaretPositionCenter(javax.swing.text.JTextComponent c, int position)
          Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called.
static void setCaretPositionCenter(javax.swing.text.JTextComponent c, int position)
          Sets the position of the text insertion caret for the TextComponent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findLayeredPane

public static javax.swing.JLayeredPane findLayeredPane(java.awt.Component target)
Finds the layered pane for a component.

Parameters:
target -
Returns:

setCaretPositionCenter

public static void setCaretPositionCenter(javax.swing.text.JTextComponent c,
                                          int position)
Sets the position of the text insertion caret for the TextComponent. This works the same way as setCaretPosition() except that if the new caret position is offscreen, it recenters the new position vertically into the center of the parent view port.

Parameters:
position - the position

moveCaretPositionCenter

public static void moveCaretPositionCenter(javax.swing.text.JTextComponent c,
                                           int position)
Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called. This is similar to setCaretPositionCenter in that if the new position is offscreen, it recenters the new position vertically into the center of the parent view port.

Parameters:
position - the position

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.