|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.swt.widgets
Class Caret

java.lang.Objectorg.eclipse.swt.widgets.Widget
org.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 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle 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:
createWidgetin classWidget
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
trueif the receiver is visible, andfalseotherwise.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
trueif the receiver is visible and all of the receiver's ancestors are visible andfalseotherwise.
isFocusCaret
boolean isFocusCaret()
killFocus
void killFocus()
releaseChild
void releaseChild()
- Overrides:
releaseChildin classWidget
releaseWidget
void releaseWidget()
- Overrides:
releaseWidgetin classWidget
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
xandyarguments 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
xandyfields 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()
|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC