com.sybase.uep.bobclient.controls
Class ToolbarItem

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by com.sybase.uep.bobclient.controls.Button
          extended by com.sybase.uep.bobclient.controls.ToolbarItem
All Implemented Interfaces:
Control, net.rim.device.api.ui.DrawStyle

public class ToolbarItem
extends Button


Field Summary
 
Fields inherited from class com.sybase.uep.bobclient.controls.Button
_appLogger, _controlID, _cushion, _customEventsHandler, _eImage, _focusFontStyle, _image, _imageAlignment, _orientation, _unfocusFontStyle, BUTTON_TOP_BOTTOM_CUSHION, IMAGE_ALIGN_CENTER, IMAGE_ALIGN_LEFT, IMAGE_ALIGN_RIGHT
 
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
 
Fields inherited from interface net.rim.device.api.ui.DrawStyle
BASELINE, BOTTOM, ELLIPSIS, HALIGN_MASK, HCENTER, HDEFAULT, HFULL, LEADING, LEFT, RIGHT, TOP, TRAILING, TRUNCATE_BEGINNING, VALIGN_MASK, VCENTER, VDEFAULT, VFULL
 
Constructor Summary
ToolbarItem()
           
 
Method Summary
protected  void drawBorder(net.rim.device.api.ui.Graphics g, FontStyle buttonFontStyle)
           
protected  void drawGradient(net.rim.device.api.ui.Graphics g, FontStyle fontStyle, int height, int width)
           
 java.lang.String getName()
          (non-Javadoc)
 int getPreferredHeight()
          (non-Javadoc)
 int getPreferredWidth()
          (non-Javadoc)
 ToolbarManager getToolbarManager()
          Returns toolbar manager
protected  void paint(net.rim.device.api.ui.Graphics g)
          (non-Javadoc)
 void setImage(java.lang.String image, int alignment)
          Add image to the button
 void setName(java.lang.String name)
          the name works as tooltip value also
 void setToolbarManager(ToolbarManager tbm)
          Set toolbar manager
protected  boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
          (non-Javadoc)
 
Methods inherited from class com.sybase.uep.bobclient.controls.Button
drawButton, drawFocus, getAction, getBorderColor, getButtonWidth, getColSpan, getControlID, getCustomEventsDelegate, getFocusFontStyle, getHorizontalAlignment, getRowSpan, getUnfocusFontStyle, getValue, getVerticalAlignment, layout, navigationClick, navigationMovement, navigationUnclick, onFocus, onUnfocus, refresh, refreshFooter, runAction, setAction, setBackgroundColor, setBorderColor, setColSpan, setControlID, setCustomEventsDelegate, setFocusFontStyle, setFooterField, setImage, setImage, setImage, setImageAlignment, setLabel, setLabel, setLayoutHeight, setLayoutWidth, setProperty, setProperty, setProperty, setRowSpan, setUnfocusFontStyle, setVariableLabel, toString
 
Methods inherited from class net.rim.device.api.ui.Field
drawHighlightRegion, fieldChangeNotify, focusAdd, focusChangeNotify, focusRemove, getAccessibleContext, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, 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, getState, 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, makeContextMenu, moveFocus, moveFocus, onDisplay, onExposed, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onVisibilityChange, paintBackground, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setDirty, setEditable, setExtent, setFocus, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, trackwheelClick, trackwheelUnclick, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolbarItem

public ToolbarItem()
Method Detail

getToolbarManager

public ToolbarManager getToolbarManager()
Returns toolbar manager

Returns:
toolbar manager

setToolbarManager

public void setToolbarManager(ToolbarManager tbm)
Set toolbar manager

Parameters:
tbm - the toolbar manager to set

getPreferredHeight

public int getPreferredHeight()
(non-Javadoc)

Specified by:
getPreferredHeight in interface Control
Overrides:
getPreferredHeight in class Button
Returns:
int value of the available layout height
See Also:
Field.getPreferredHeight()

getPreferredWidth

public int getPreferredWidth()
(non-Javadoc)

Specified by:
getPreferredWidth in interface Control
Overrides:
getPreferredWidth in class Button
Returns:
int value of the available layout width
See Also:
Field.getPreferredWidth()

getName

public java.lang.String getName()
Description copied from class: Button
(non-Javadoc)

Specified by:
getName in interface Control
Overrides:
getName in class Button
Returns:
the name of toolbar item
See Also:
Control.getName()

setName

public void setName(java.lang.String name)
the name works as tooltip value also

Parameters:
name -

paint

protected void paint(net.rim.device.api.ui.Graphics g)
(non-Javadoc)

Overrides:
paint in class Button
See Also:
Field.paint(Graphics g)

drawGradient

protected void drawGradient(net.rim.device.api.ui.Graphics g,
                            FontStyle fontStyle,
                            int height,
                            int width)
Overrides:
drawGradient in class Button

drawBorder

protected void drawBorder(net.rim.device.api.ui.Graphics g,
                          FontStyle buttonFontStyle)
Overrides:
drawBorder in class Button

touchEvent

protected boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
Description copied from class: Button
(non-Javadoc)

Overrides:
touchEvent in class Button
See Also:
Field.touchEvent(TouchEvent message)

setImage

public void setImage(java.lang.String image,
                     int alignment)
Description copied from class: Button
Add image to the button

Overrides:
setImage in class Button
Parameters:
image - String for the file name of the image
alignment - int value for the alignment of the button. Can be IMAGE_ALIGN_LEFT (image will be to the left of the text if any), IMAGE_ALIGN_RIGHT (image will be to the right of the text if any), or IMAGE_ALIGN_CENTER (image will be to the center and there shouldn't be text otherwise it will paint over the text)
See Also:
Button.setImage(String, int)