net.rim.device.api.ui.toolbar
Class ToolbarSpacer

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.toolbar.ToolbarButtonField
          extended by net.rim.device.api.ui.toolbar.ToolbarSpacer
All Implemented Interfaces:
Runnable

public class ToolbarSpacer
extends ToolbarButtonField

A spacer used in ToolbarManager or ToolbarSetManager when a particular arrangement of ToolbarButtonFields is desired. It has no image, no text, no tooltip and is disabled by default. It occupies the same amount of space as any other ToolbarButtonField.

Since:
BlackBerry API 6.0.0

Field Summary
static long ELASTIC
          Deprecated. All spacers take up the same space as any ToolbarButtonField
static long RIGID
          Deprecated. All spacers take up the same space as any ToolbarButtonField
 
Fields inherited from class net.rim.device.api.ui.Field
ACTION_INVOKE, AXIS_HORIZONTAL, AXIS_SEQUENTIAL, AXIS_VERTICAL, 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
ToolbarSpacer()
          Creates a ToolbarSpacer with the an ordinal of 0.
ToolbarSpacer(int ordinal)
          Creates a ToolbarSpacer with the specified ordinal.
ToolbarSpacer(long style, int ordinal)
          Creates a ToolbarSpacer with a specified style and ordinal.
 
Method Summary
 Image getImage()
          Returns the Image associated with this ToolbarSpacer.
 String getText()
          Returns the text associated with this ToolbarSpacer.
 String getToolTip()
          Returns the tooltip text associated with this ToolbarSpacer.
 void invoke()
          Invokes the Command associated with this ToolbarSpacer.
 boolean isEnabled()
          Indicates whether the ToolbarSpacer is clickable.
 
Methods inherited from class net.rim.device.api.ui.toolbar.ToolbarButtonField
getCommand, getOrdinal, getPreferredHeight, getPreferredWidth, getTooltip, layout, onDisplay, onExposed, onObscured, paint, run, setCommand, setCommandContext, setEnabled, setImage, setText, setTooltip, touchEvent
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getAccessibleContext, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getCommandItemProvider, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFocusRect, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getScreen, getStyle, getTop, getVisualState, getWidth, invalidate, invalidate, invalidateAll, invokeAction, isDataValid, isDirty, isEditable, isFocus, isFocusable, isMuddy, isPasteable, isScrollCopyable, isSelectable, isSelecting, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, makeContextMenu, moveFocus, moveFocus, navigationClick, navigationMovement, navigationUnclick, onFocus, onMenuDismissed, onMenuDismissed, onUndisplay, onUnfocus, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCommandItemProvider, setCookie, setDirty, setEditable, setExtent, setFocus, setFocusListener, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, trackwheelClick, trackwheelUnclick, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

RIGID

public static final long RIGID
Deprecated. All spacers take up the same space as any ToolbarButtonField
Style for a rigid spacer. A rigid spacer occupies fixed width.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ELASTIC

public static final long ELASTIC
Deprecated. All spacers take up the same space as any ToolbarButtonField
Style for an elastic spacer. An elastic spacer occupies leftover width in the toolbar.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

ToolbarSpacer

public ToolbarSpacer()
Creates a ToolbarSpacer with the an ordinal of 0.

Since:
BlackBerry API 6.0.0

ToolbarSpacer

public ToolbarSpacer(int ordinal)
Creates a ToolbarSpacer with the specified ordinal.

Parameters:
ordinal - Ordinal for this spacer.
Since:
BlackBerry API 6.0.0

ToolbarSpacer

public ToolbarSpacer(long style,
                     int ordinal)
Creates a ToolbarSpacer with a specified style and ordinal.

Parameters:
style - Was once one of RIGID or ELASTIC, is now ignored
ordinal - Ordinal for this spacer.
Since:
BlackBerry API 6.0.0


Method Detail

getImage

public final Image getImage()
Returns the Image associated with this ToolbarSpacer.

Overrides:
getImage in class ToolbarButtonField
Returns:
null since a ToolbarSpacer has no image associated with it.
Since:
BlackBerry API 6.0.0

getText

public final String getText()
Returns the text associated with this ToolbarSpacer.

Overrides:
getText in class ToolbarButtonField
Returns:
null since a ToolbarSpacer has no text associated with it.
Since:
BlackBerry API 6.0.0

getToolTip

public final String getToolTip()
Returns the tooltip text associated with this ToolbarSpacer.

Overrides:
getToolTip in class ToolbarButtonField
Returns:
null since a ToolbarSpacer has no tooltip text associated with it.
Since:
BlackBerry API 6.0.0

invoke

public final void invoke()
Invokes the Command associated with this ToolbarSpacer.

Note: Since a ToolbarSpacer> has no Command associated with it, this method does nothing.

Overrides:
invoke in class ToolbarButtonField
Since:
BlackBerry API 6.0.0

isEnabled

public final boolean isEnabled()
Indicates whether the ToolbarSpacer is clickable.

Overrides:
isEnabled in class ToolbarButtonField
Returns:
false since a ToolbarSpacer is always disabled and does not accept focus or input.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.