Package com.ms.fx |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class FxCaret implements TimerListener { // Constructor public FxCaret(Component c, int w, int h); // Methods public void show(); public int getHeight(); public int getWidth(); public void hide(); public void setPos(Point p); public void setPos(int px, int py); }
A cross-platform class that manages a caret object. The caret can also connect to an IME (Input Method Editor) and will pass all messages on to it.
public FxCaret(Component c, int w, int h);Creates a caret and links it to a component.
Return Value:
Returns true or false.
Parameter Description comp The component where the caret should be displayed. w The width of the caret. h The height of the caret.
public void show();Shows the caret. The caret can only be active in one component at a time.
Return Value:
No return value.
public int getHeight();Retrieves the current height of the caret.
Return Value:
Returns the height of the caret.
public int getWidth();Retrieves the current width of the caret.
Return Value:
Returns the width of the caret.
public void hide();Hides the caret.
Return Value:
No return value.
public void setPos(Point p);Sets the caret position, relative to the owning componet's top left corner.
Return Value:
No return value.
Parameter Description p Offset for the caret.
public void setPos(int px, int py);Sets the caret position, relative to the owning componets top left corner.
Return Value:
No return value.
Parameter Description px The x offset for the caret. py The y offset for the caret.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.