Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.widgets
Class Caret  view Caret download Caret.java

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Caret

public class Caret
extends Widget

Instances of this class provide an i-beam that is typically used as the insertion point for text.

Styles:
(none)
Events:
(none)

IMPORTANT: This class is intended to be subclassed only within the SWT implementation.


Field Summary
(package private)  int blinkRate
           
(package private)  org.eclipse.swt.graphics.Font font
           
(package private)  int height
           
(package private)  org.eclipse.swt.graphics.Image image
           
(package private)  boolean isShowing
           
(package private)  boolean isVisible
           
(package private)  Canvas parent
           
(package private)  int width
           
(package private)  int x
           
(package private)  int y
           
 
Fields inherited from class org.eclipse.swt.widgets.Widget
ACTIVATE, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, CANVAS, CHANGED, CLICKED, COMMIT, CONFIGURE_EVENT, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DELETE_EVENT, DELETE_RANGE, DELETE_TEXT, DISABLED, display, DISPOSED, ENTER_NOTIFY_EVENT, EVENT, EVENT_AFTER, eventTable, EXPOSE_EVENT, FOCUS, FOCUS_IN_EVENT, FOCUS_OUT_EVENT, handle, HANDLE, HIDE, INSERT_TEXT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, KEYED_DATA, LEAVE_NOTIFY_EVENT, MAP_EVENT, MENU, MNEMONIC_ACTIVATE, MOTION_NOTIFY_EVENT, OBSCURED, POPUP_MENU, PREEDIT_CHANGED, REALIZE, ROW_ACTIVATED, SCROLL_CHILD, SELECT, SHOW, SHOW_HELP, SIZE_ALLOCATE, state, style, STYLE_SET, SWITCH_PAGE, TEST_COLLAPSE_ROW, TEST_EXPAND_ROW, TOGGLED, UNMAP_EVENT, UNREALIZE, VALUE_CHANGED, VISIBILITY_NOTIFY_EVENT, WINDOW_STATE_EVENT
 
Constructor Summary
Caret(Canvas parent, int style)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
(package private)  boolean blinkCaret()
           
(package private)  void createWidget(int index)
           
(package private)  boolean drawCaret()
           
 org.eclipse.swt.graphics.Rectangle getBounds()
          Returns a rectangle describing the receiver's size and location relative to its parent (or its display if its parent is null).
 org.eclipse.swt.graphics.Font getFont()
          Returns the font that the receiver will use to paint textual information.
 org.eclipse.swt.graphics.Image getImage()
          Returns the image that the receiver will use to paint the caret.
 org.eclipse.swt.graphics.Point getLocation()
          Returns a point describing the receiver's location relative to its parent (or its display if its parent is null).
 Canvas getParent()
          Returns the receiver's parent, which must be a Canvas.
 org.eclipse.swt.graphics.Point getSize()
          Returns a point describing the receiver's size.
 boolean getVisible()
          Returns true if the receiver is visible, and false otherwise.
(package private)  boolean hideCaret()
           
(package private)  boolean isFocusCaret()
           
 boolean isVisible()
          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 releaseChild()
           
(package private)  void releaseWidget()
           
 void setBounds(int x, int y, int width, int height)
          Sets the receiver's size and location to the rectangular area specified by the arguments.
 void setBounds(org.eclipse.swt.graphics.Rectangle rect)
          Sets the receiver's size and location to the rectangular area specified by the argument.
(package private)  void setFocus()
           
 void setFont(org.eclipse.swt.graphics.Font font)
          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(org.eclipse.swt.graphics.Image image)
          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
 void setLocation(int x, int y)
          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(org.eclipse.swt.graphics.Point location)
          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)
          Sets the receiver's size to the point specified by the arguments.
 void setSize(org.eclipse.swt.graphics.Point size)
          Sets the receiver's size to the point specified by the argument.
 void setVisible(boolean visible)
          Marks the receiver as visible if the argument is true, and marks it invisible otherwise.
(package private)  boolean showCaret()
           
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkSubclass, checkWidget, createHandle, deregister, destroyWidget, dispose, error, filterProc, filters, fixMnemonic, fontHeight, getData, getData, getDisplay, getName, getNameText, getStyle, gtk_activate, gtk_button_press_event, gtk_button_release_event, gtk_changed, gtk_clicked, gtk_commit, gtk_configure_event, gtk_delete_event, gtk_delete_range, gtk_delete_text, gtk_enter_notify_event, gtk_event_after, gtk_event, gtk_expose_event, gtk_focus_in_event, gtk_focus_out_event, gtk_focus, gtk_hide, gtk_insert_text, gtk_key_press_event, gtk_key_release_event, gtk_leave_notify_event, gtk_map_event, gtk_mnemonic_activate, gtk_motion_notify_event, gtk_popup_menu, gtk_preedit_changed, gtk_realize, gtk_row_activated, gtk_scroll_child, gtk_select, gtk_show_help, gtk_show, gtk_size_allocate, gtk_style_set, gtk_switch_page, gtk_test_collapse_row, gtk_test_expand_row, gtk_timer, gtk_toggled, gtk_unmap_event, gtk_unrealize, gtk_value_changed, gtk_visibility_notify_event, gtk_window_state_event, hookEvents, hooks, hoverProc, isDisposed, isListening, isValidSubclass, isValidThread, isValidWidget, menuPositionProc, mnemonicHit, mnemonicMatch, notifyListeners, pixbufCellDataProc, postEvent, postEvent, register, releaseHandle, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, setOrientation, shellMapProc, textCellDataProc, timerProc, topHandle, toString, translateTraversal, treeSelectionProc, windowProc, windowProc, windowProc, windowProc
 
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

isVisible

boolean isVisible

isShowing

boolean isShowing

blinkRate

int blinkRate

image

org.eclipse.swt.graphics.Image image

font

org.eclipse.swt.graphics.Font font
Constructor Detail

Caret

public Caret(Canvas parent,
             int style)
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.

Method Detail

blinkCaret

boolean blinkCaret()

createWidget

void createWidget(int index)
Overrides:
createWidget in class Widget

drawCaret

boolean drawCaret()

getBounds

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


getFont

public org.eclipse.swt.graphics.Font getFont()
Returns the font that the receiver will use to paint textual information.


getImage

public org.eclipse.swt.graphics.Image getImage()
Returns the image that the receiver will use to paint the caret.


getLocation

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


getParent

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


getSize

public org.eclipse.swt.graphics.Point getSize()
Returns a point describing the receiver's size.


getVisible

public boolean getVisible()
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.


hideCaret

boolean hideCaret()

isVisible

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


isFocusCaret

boolean isFocusCaret()

killFocus

void killFocus()

releaseChild

void releaseChild()
Overrides:
releaseChild in class Widget

releaseWidget

void releaseWidget()
Overrides:
releaseWidget in class Widget

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
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).


setBounds

public void setBounds(org.eclipse.swt.graphics.Rectangle rect)
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).


setFocus

void setFocus()

setFont

public void setFont(org.eclipse.swt.graphics.Font font)
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.


setImage

public void setImage(org.eclipse.swt.graphics.Image image)
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


setLocation

public void setLocation(int x,
                        int y)
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).


setLocation

public void setLocation(org.eclipse.swt.graphics.Point location)
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).


setSize

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


setSize

public void setSize(org.eclipse.swt.graphics.Point size)
Sets the receiver's size to the point specified by the argument.


setVisible

public void setVisible(boolean visible)
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.


showCaret

boolean showCaret()