Package com.ms.fx Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class FxCaret

Constructor , Methods

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.


Constructor


FxCaret

public FxCaret(Component c, int w, int h);

Creates a caret and links it to a component.

Return Value:

Returns true or false.

ParameterDescription
comp The component where the caret should be displayed.
w The width of the caret.
h The height of the caret.


Methods


show

public void show();

Shows the caret. The caret can only be active in one component at a time.

Return Value:

No return value.


getHeight

public int getHeight();

Retrieves the current height of the caret.

Return Value:

Returns the height of the caret.


getWidth

public int getWidth();

Retrieves the current width of the caret.

Return Value:

Returns the width of the caret.


hide

public void hide();

Hides the caret.

Return Value:

No return value.


setPos

public void setPos(Point p);

Sets the caret position, relative to the owning componet's top left corner.

Return Value:

No return value.

ParameterDescription
p Offset for the caret.


setPos

public void setPos(int px, int py);

Sets the caret position, relative to the owning componets top left corner.

Return Value:

No return value.

ParameterDescription
px The x offset for the caret.
py The y offset for the caret.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.