net.rim.device.api.ui.component
Class SeparatorField
java.lang.Object
|
+--net.rim.device.api.ui.Field
|
+--net.rim.device.api.ui.component.SeparatorField
- All Implemented Interfaces:
- IComponent, InputMethodListener
- public class SeparatorField
- extends Field
A field which draws a horizontal line across its width.
Behaviour
Displays a separator, currently always a horizontal line.
A SeparatorField object can be added to a menu in the following
ways:
|
Field Summary |
static long |
LINE_HORIZONTAL
Field should draw a horizontal line. |
static long |
LINE_MASK
Mask for which way line should be drawn. |
static long |
LINE_VERTICAL
Field should draw a vertical line. |
| Fields inherited from class net.rim.device.api.ui.Field |
ACTION_INVOKE, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEADING, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_TRAILING, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH, VISUAL_STATE_ACTIVE, VISUAL_STATE_DISABLED, VISUAL_STATE_DISABLED_FOCUS, VISUAL_STATE_FOCUS, VISUAL_STATE_NORMAL |
|
Constructor Summary |
SeparatorField()
Creates a new SeparatorField object. |
|
Method Summary |
protected int |
getLinePosition()
Retrieves the vertical position of the separator line. |
int |
getPreferredHeight()
Retrieves this field's preferred height. |
protected void |
layout(int width,
int height)
Lays out this field's contents. |
protected void |
paint(Graphics graphics)
Redraws this field. |
String |
toString()
Represent a seperator as a string of 20 dashes. |
| Methods inherited from class net.rim.device.api.ui.Field |
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getAccessibleContext, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFocusRect, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getOriginal, getPreferredWidth, getScreen, getStyle, getTop, getVisualState, getWidth, invalidate, invalidate, invalidateAll, invokeAction, isDataValid, isDirty, isEditable, isFocus, isFocusable, isMuddy, isPasteable, isSelectable, isSelecting, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, makeContextMenu, moveFocus, moveFocus, navigationClick, navigationMovement, navigationUnclick, onDisplay, onExposed, onFocus, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onUnfocus, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setDirty, setEditable, setExtent, setFocus, setFocusListener, setFont, setMuddy, setNonSpellCheckable, setPosition, setVisualState, touchEvent, trackwheelClick, trackwheelUnclick, updateLayout |
LINE_HORIZONTAL
public static final long LINE_HORIZONTAL
- Field should draw a horizontal line.
- Since:
- JDE 4.0.0
LINE_MASK
public static final long LINE_MASK
- Mask for which way line should be drawn.
- Since:
- JDE 4.0.0
LINE_VERTICAL
public static final long LINE_VERTICAL
- Field should draw a vertical line.
- Since:
- JDE 4.0.0
SeparatorField
public SeparatorField()
- Creates a new SeparatorField object.
getLinePosition
protected int getLinePosition()
- Retrieves the vertical position of the separator line.
- Returns:
- Distance in pixels from the top edge of this field's client area.
getPreferredHeight
public int getPreferredHeight()
- Retrieves this field's preferred height.
See
Field.getPreferredHeight() for more information.
This field's manager invokes this method during the layout process to
determine this field's desired height.
If the current font is a small font (8 pixel), then separators like
to be one pixel high; otherwise, they prefer to be three pixels high.
- Overrides:
getPreferredHeight in class Field
- Returns:
- Preferred height for this field.
layout
protected void layout(int width,
int height)
- Lays out this field's contents.
This field's manager invokes this method during the layout process to
instruct this field to arrange its contents, given an amount of available
space.
- Overrides:
layout in class Field
- Parameters:
width - Horizontal space available.height - Vertical space available.
paint
protected void paint(Graphics graphics)
- Redraws this field.
This field's manager invokes this method during the repainting
process to instruct this field to repaint itself.
- Overrides:
paint in class Field
- Parameters:
graphics - Graphics context for repainting this field.
toString
public String toString()
- Represent a seperator as a string of 20 dashes.
- Overrides:
toString in class Object
- Since:
- JDE 4.2.0
- Following copied from class:
Object- Returns:
- a string representation of the object.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.