public class BreadcrumbItem
extends org.eclipse.swt.widgets.Item
Constructor and Description |
---|
BreadcrumbItem(Breadcrumb parent)
Constructs a new instance of this class given its parent (which must be a
Breadcrumb ) and a style value describing its behavior and
appearance. |
BreadcrumbItem(Breadcrumb parent,
int style)
Constructs a new instance of this class given its parent (which must be a
Breadcrumb ) and a style value describing its behavior and
appearance. |
Modifier and Type | Method and Description |
---|---|
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when
the control is selected by the user, by sending it one of the messages
defined in the
SelectionListener interface. |
void |
dispose() |
(package private) void |
drawButtonAtPosition(int x) |
(package private) void |
fireSelectionEvent() |
int |
getAlignment()
Returns a value which describes the position of the text in the receiver.
|
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), unless the receiver is a
shell.
|
org.eclipse.swt.graphics.Image |
getDisabledImage() |
boolean |
getEnabled()
Returns
true if the receiver is enabled, and false
otherwise. |
int |
getHeight()
Returns the whole height of the item.
|
Breadcrumb |
getParent()
Returns the receiver's parent, which must be a
Breadcrumb . |
boolean |
getSelection()
Returns
true if the receiver is selected, and false otherwise. |
org.eclipse.swt.graphics.Image |
getSelectionImage() |
org.eclipse.swt.graphics.Color |
getTextColor()
Returns the color of the text when the button is enabled and not selected.
|
org.eclipse.swt.graphics.Color |
getTextColorSelected()
Returns the color of the text when the button is not selected.
|
java.lang.String |
getTooltipText()
Returns the receiver's tool tip text, or null if it has not been set.
|
int |
getWidth()
Returns the whole width of the item.
|
boolean |
isEnabled()
Returns
true if the receiver is enabled, and false
otherwise. |
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified
when the control is selected by the user.
|
void |
setAlignment(int alignment)
Controls how text will be displayed in the receiver.
|
void |
setBounds(org.eclipse.swt.graphics.Rectangle rectangle)
Sets the receiver's size and location to the rectangular area specified by
the argument.
|
void |
setDisabledImage(org.eclipse.swt.graphics.Image image)
Sets the receiver's image to the argument when this is one is disabled, which
may be null indicating that no image should be displayed.
|
void |
setEnabled(boolean enabled)
Enables the receiver if the argument is
true , and disables it
otherwise. |
(package private) BreadcrumbItem |
setGc(org.eclipse.swt.graphics.GC gc) |
void |
setHeight(int height)
Sets the height of the receiver.
|
(package private) BreadcrumbItem |
setIsLastItemOfTheBreadCrumb(boolean isLastItemOfTheBreadCrumb) |
void |
setSelection(boolean selected)
Sets the selection state of the receiver.
|
void |
setSelectionImage(org.eclipse.swt.graphics.Image image)
Sets the receiver's image to the argument when this one is selected, which
may be null indicating that no image should be displayed.
|
void |
setTextColor(org.eclipse.swt.graphics.Color textColor)
Sets the receiver's text color to the argument, which may be null indicating
that no image should be displayed.
|
void |
setTextColorSelected(org.eclipse.swt.graphics.Color textColor)
Sets the receiver's text color to the argument when this one is selected,
which may be null indicating that no image should be displayed.
|
(package private) BreadcrumbItem |
setToolbarHeight(int toolbarHeight) |
void |
setTooltipText(java.lang.String string)
Sets the receiver's tool tip text to the argument, which may be null
indicating that the default tool tip for the control will be shown.
|
void |
setWidth(int width)
Sets the width of the receiver.
|
checkSubclass, getImage, getText, setImage, setText
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public BreadcrumbItem(Breadcrumb parent)
Breadcrumb
) and a style value describing its behavior and
appearance. The item is added to the end of the items maintained by its
parent.
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.
parent
- a composite control which will be the parent of the new
instance (cannot be null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Widget.getStyle()
public BreadcrumbItem(Breadcrumb parent, int style)
Breadcrumb
) and a style value describing its behavior and
appearance. The item is added to the end of the items maintained by its
parent.
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.
parent
- a composite control which will be the parent of the new
instance (cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Widget.getStyle()
public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
SelectionListener
interface.
widgetDefaultSelected
is not called.
listener
- the listener which should be notified when the control is
selected by the user,java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
Widget.dispose()
public int getAlignment()
LEFT
, RIGHT
or
CENTER
.org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Rectangle getBounds()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Image getDisabledImage()
org.eclipse.swt.SWTException
- public boolean getEnabled()
true
if the receiver is enabled, and false
otherwise. A disabled control is typically not selectable from the user
interface and draws with an inactive or "grayed" look.org.eclipse.swt.SWTException
- isEnabled()
public int getHeight()
org.eclipse.swt.SWTException
- public Breadcrumb getParent()
Breadcrumb
.org.eclipse.swt.SWTException
- public boolean getSelection()
true
if the receiver is selected, and false otherwise.org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Image getSelectionImage()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Color getTextColor()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Color getTextColorSelected()
org.eclipse.swt.SWTException
- public java.lang.String getTooltipText()
org.eclipse.swt.SWTException
- public int getWidth()
org.eclipse.swt.SWTException
- public boolean isEnabled()
true
if the receiver is enabled, and false
otherwise. A disabled control is typically not selectable from the user
interface and draws with an inactive or "grayed" look.org.eclipse.swt.SWTException
- getEnabled()
public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
listener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void setAlignment(int alignment)
LEFT
, RIGHT
or CENTER
.alignment
- the new alignmentorg.eclipse.swt.SWTException
- public void setBounds(org.eclipse.swt.graphics.Rectangle rectangle)
x
and y
fields of the rectangle
are relative to the receiver's parent (or its display if its parent is null).
Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.
rect
- the new bounds for the receiverorg.eclipse.swt.SWTException
- public void setDisabledImage(org.eclipse.swt.graphics.Image image)
image
- the image to display on the receiver (may be null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setEnabled(boolean enabled)
true
, and disables it
otherwise.
A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.
enabled
- the new enabled stateorg.eclipse.swt.SWTException
- public void setHeight(int height)
Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.
height
- the new widthorg.eclipse.swt.SWTException
- public void setSelection(boolean selected)
selected
- the new selection stateorg.eclipse.swt.SWTException
- public void setSelectionImage(org.eclipse.swt.graphics.Image image)
image
- the image to display on the receiver (may be null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setTextColor(org.eclipse.swt.graphics.Color textColor)
textColor
- the text color to display on the receiver (may be null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setTextColorSelected(org.eclipse.swt.graphics.Color textColor)
textColor
- the text color to display on the receiver (may be null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setTooltipText(java.lang.String string)
The mnemonic indicator (character '&') is not displayed in a tool tip. To display a single '&' in the tool tip, the character '&' can be escaped by doubling it in the string.
string
- the new tool tip text (or null)org.eclipse.swt.SWTException
- public void setWidth(int width)
Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.
width
- the new widthorg.eclipse.swt.SWTException
- void fireSelectionEvent()
void drawButtonAtPosition(int x)
BreadcrumbItem setGc(org.eclipse.swt.graphics.GC gc)
BreadcrumbItem setToolbarHeight(int toolbarHeight)
BreadcrumbItem setIsLastItemOfTheBreadCrumb(boolean isLastItemOfTheBreadCrumb)