org.eclipse.swt.widgets
Class Caret

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Caret

public class Caret
extends Widget

Unsafe:


Field Summary
(package private)  Font font
           
(package private)  int height
           
(package private)  Image image
           
(package private)  boolean isVisible
           
(package private)  boolean moved
           
(package private)  org.eclipse.swt.internal.win32.LOGFONT oldFont
           
(package private)  Canvas parent
           
(package private)  boolean resized
           
(package private)  int width
           
(package private)  int x
           
(package private)  int y
           
 
Fields inherited from class org.eclipse.swt.widgets.Widget
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values
 
Constructor Summary
Caret(Canvas parent, int style)
          Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
(package private)  void createWidget()
           
(package private)  int defaultFont()
           
 Rectangle getBounds()
          Enabled: Returns a rectangle describing the receiver's size and location relative to its parent (or its display if its parent is null).
 Display getDisplay()
          Suppressed:
 Font getFont()
          Enabled: Returns the font that the receiver will use to paint textual information.
 Image getImage()
          Enabled: Returns the image that the receiver will use to paint the caret.
 Point getLocation()
          Enabled: Returns a point describing the receiver's location relative to its parent (or its display if its parent is null).
 Canvas getParent()
          Suppressed: Returns the receiver's parent, which must be a Canvas.
 Point getSize()
          Enabled: Returns a point describing the receiver's size.
 boolean getVisible()
          Enabled: Returns true if the receiver is visible, and false otherwise.
(package private)  boolean hasFocus()
           
(package private)  boolean isFocusCaret()
           
 boolean isVisible()
          Enabled: Returns true if the receiver is visible and all of the receiver's ancestors are visible and false otherwise.
(package private)  void killFocus()
           
(package private)  void move()
           
(package private)  void releaseChild()
           
(package private)  void releaseWidget()
           
(package private)  void resize()
           
(package private)  void restoreIMEFont()
           
(package private)  void saveIMEFont()
           
 void setBounds(int x, int y, int width, int height)
          Enabled: Sets the receiver's size and location to the rectangular area specified by the arguments.
 void setBounds(Rectangle rect)
          Enabled: Sets the receiver's size and location to the rectangular area specified by the argument.
(package private)  void setFocus()
           
 void setFont(Font font)
          Enabled: Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
 void setImage(Image image)
          Enabled: Sets the image that the receiver will use to paint the caret to the image specified by the argument, or to the default which is a filled rectangle if the argument is null
(package private)  void setIMEFont(int hFont)
           
 void setLocation(int x, int y)
          Enabled: Sets the receiver's location to the point specified by the arguments which are relative to the receiver's parent (or its display if its parent is null).
 void setLocation(Point location)
          Enabled: Sets the receiver's location to the point specified by the argument which is relative to the receiver's parent (or its display if its parent is null).
 void setSize(int width, int height)
          Enabled: Sets the receiver's size to the point specified by the arguments.
 void setSize(Point size)
          Enabled: Sets the receiver's size to the point specified by the argument.
 void setVisible(boolean visible)
          Enabled: Marks the receiver as visible if the argument is true, and marks it invisible otherwise.
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkSubclass, checkWidget, destroyWidget, dispose, error, filters, getData, getData, getName, getNameText, getStyle, hooks, isDisposed, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseHandle, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

Canvas parent

x

int x

y

int y

width

int width

height

int height

moved

boolean moved

resized

boolean resized

isVisible

boolean isVisible

image

Image image

font

Font font

oldFont

org.eclipse.swt.internal.win32.LOGFONT oldFont
Constructor Detail

Caret

public Caret(Canvas parent,
             int style)
Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

Parameters:
parent - a composite control which will be the parent of the new instance (cannot be null)
style - the style of control to construct
See Also:
SWT, Widget.checkSubclass(), Widget.getStyle()
Method Detail

createWidget

void createWidget()

defaultFont

int defaultFont()

getBounds

public Rectangle getBounds()
Enabled: Returns a rectangle describing the receiver's size and location relative to its parent (or its display if its parent is null).

Returns:
the receiver's bounding rectangle

getDisplay

public Display getDisplay()
Suppressed:

Specified by:
getDisplay in class Widget
Returns:
the receiver's display

getFont

public Font getFont()
Enabled: Returns the font that the receiver will use to paint textual information.

Returns:
the receiver's font

getImage

public Image getImage()
Enabled: Returns the image that the receiver will use to paint the caret.

Returns:
the receiver's image

getLocation

public Point getLocation()
Enabled: Returns a point describing the receiver's location relative to its parent (or its display if its parent is null).

Returns:
the receiver's location

getParent

public Canvas getParent()
Suppressed: Returns the receiver's parent, which must be a Canvas.

Returns:
the receiver's parent

getSize

public Point getSize()
Enabled: Returns a point describing the receiver's size.

Returns:
the receiver's size

getVisible

public boolean getVisible()
Enabled: Returns true if the receiver is visible, and false otherwise.

If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.

Returns:
the receiver's visibility state

hasFocus

boolean hasFocus()

isFocusCaret

boolean isFocusCaret()

isVisible

public boolean isVisible()
Enabled: Returns true if the receiver is visible and all of the receiver's ancestors are visible and false otherwise.

Returns:
the receiver's visibility state
See Also:
getVisible()

killFocus

void killFocus()

move

void move()

releaseChild

void releaseChild()
Overrides:
releaseChild in class Widget

releaseWidget

void releaseWidget()
Overrides:
releaseWidget in class Widget

resize

void resize()

restoreIMEFont

void restoreIMEFont()

saveIMEFont

void saveIMEFont()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Enabled: Sets the receiver's size and location to the rectangular area specified by the arguments. The x and y arguments are relative to the receiver's parent (or its display if its parent is null).

Parameters:
x - the new x coordinate for the receiver
y - the new y coordinate for the receiver
width - the new width for the receiver
height - the new height for the receiver

setBounds

public void setBounds(Rectangle rect)
Enabled: Sets the receiver's size and location to the rectangular area specified by the argument. The x and y fields of the rectangle are relative to the receiver's parent (or its display if its parent is null).

Parameters:
rect - the new bounds for the receiver

setFocus

void setFocus()

setFont

public void setFont(Font font)
Enabled: Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.

Parameters:
font - the new font (or null)

setImage

public void setImage(Image image)
Enabled: Sets the image that the receiver will use to paint the caret to the image specified by the argument, or to the default which is a filled rectangle if the argument is null


setIMEFont

void setIMEFont(int hFont)

setLocation

public void setLocation(int x,
                        int y)
Enabled: Sets the receiver's location to the point specified by the arguments which are relative to the receiver's parent (or its display if its parent is null).

Parameters:
x - the new x coordinate for the receiver
y - the new y coordinate for the receiver

setLocation

public void setLocation(Point location)
Enabled: Sets the receiver's location to the point specified by the argument which is relative to the receiver's parent (or its display if its parent is null).

Parameters:
location - the new location for the receiver

setSize

public void setSize(int width,
                    int height)
Enabled: Sets the receiver's size to the point specified by the arguments.

Parameters:
width - the new width for the receiver
height - the new height for the receiver

setSize

public void setSize(Point size)
Enabled: Sets the receiver's size to the point specified by the argument.

Parameters:
size - the new extent for the receiver

setVisible

public void setVisible(boolean visible)
Enabled: Marks the receiver as visible if the argument is true, and marks it invisible otherwise.

If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.

Parameters:
visible - the new visibility state


comments?