net.rim.device.api.ui.component.pane
Class TitleView

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.ScrollView
          extended by net.rim.device.api.ui.Manager
              extended by net.rim.device.api.ui.component.pane.TitleView
All Implemented Interfaces:
AdjustmentListener
Direct Known Subclasses:
HorizontalScrollableTitleView, HorizontalTabTitleView

public abstract class TitleView
extends Manager

TitleView lays out and renders the titles of Pane objects. It can display a subset of the titles of the available Pane objects in the data set.

This class is updated by PaneManagerModel as the data set is changed. You can use Pane.getPane() to get the content.

Lets you get and set Bitmap images to display on the left and right side of this view. The images are called arrows and indicate that you can scroll to additional titles offscreen.

Since:
BlackBerry API 6.0.0

Field Summary
 
Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK
 
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
TitleView(long style)
          Class constructor that accepts a long of style bit flags and sets the Field.FOCUSABLE style bit.
 
Method Summary
abstract  void drag(int dx, int dy, int index, int leftIndex, int rightIndex)
          Offsets the positions of the current titles.
 Bitmap getLeftArrow()
          Returns the left arrow image.
 PaneManagerModel getModel()
          Returns the PaneManagerModel for this view.
abstract  int getNumberOfDisplayedPanes()
          The number of panes who have titles being displayed at any given time.
abstract  XYRect getRegionExtent(int index)
          Provides the region of the Field that represents a title within the currently pushed region.
 Bitmap getRightArrow()
          Provides access to the image that is currently set to use for the right arrow.
abstract  boolean isAnimating()
          Returns whether or not the view is currently animating the transition between panes.
abstract  void jumpBackwards(boolean animate, int duration)
          As in TitleView.jumpTo(int, int, int, boolean, int, int) except this only causes a transition from the currently selected title to the one that preceeds it in the model.
abstract  void jumpForwards(boolean animate, int duration)
          As in TitleView.jumpTo(int, int, int, boolean, int, int) except this only causes a transition from the currently selected title to the one that follows it in the model.
abstract  void jumpTo(int index, int leftIndex, int rightIndex, boolean animate, int direction, int duration)
          Tells the view to move from the currently selected pane to the pane at the index provided.
 void setLeftArrow(Bitmap arrow)
          Allows for the association of an image to use when rendering an arrow on the left.
 void setModel(PaneManagerModel model)
          Allows for the association of a PaneManagerModel to this view.
 void setRightArrow(Bitmap arrow)
          Allows for the association of an image to use when rendering an arrow on the right.
abstract  void snapToCurrent(boolean animate, int duration, int direction)
          Tells this view to move the currently selectly pane back to its default layout positioning.
 
Methods inherited from class net.rim.device.api.ui.Manager
add, addAll, cursorClick, cursorMovement, cursorUnclick, delete, deleteAll, deleteRange, getAccessibleContext, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, insert, insertAll, invalidate, invalidate, invalidateFieldRange, invokeAction, isDataValid, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layout, layoutChild, makeMenu, moveFocus, moveFocus, navigationClick, navigationMovement, navigationUnclick, nextFocus, nextFocus, onFocus, onUnfocus, paint, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setPositionChild, setScrollingInertial, setVerticalQuantization, setVirtualExtent, shouldCursorScroll, sublayout, subpaint, touchEvent, trackwheelClick, trackwheelUnclick
 
Methods inherited from class net.rim.device.api.ui.ScrollView
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onExposed, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getCommandItemProvider, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTextFillColor, getTextStrokeColor, getTop, getVisualState, getWidth, invalidateAll, isEditable, isEnabled, isFocus, isLeftToRight, isPasteable, isScrollCopyable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, onDisplay, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCommandItemProvider, setCookie, setEditable, setEnabled, setFocus, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

TitleView

public TitleView(long style)

Class constructor that accepts a long of style bit flags and sets the Field.FOCUSABLE style bit.

Parameters:
style - style bit flags to use for this Manager
Since:
BlackBerry API 6.0.0


Method Detail

drag

public abstract void drag(int dx,
                          int dy,
                          int index,
                          int leftIndex,
                          int rightIndex)

Offsets the positions of the current titles.

Parameters:
dx - the horizontal offset (in pixels) from the default position.
dy - the vertical offset (in pixels) from the default position.
index - the index of the pane that is to be offset.
leftIndex - the index of the pane to display to the left of the pane specified by the index parameter.
rightIndex - the index of the pane to display to the right of the pane specified by the index parameter.
Since:
BlackBerry API 6.0.0

getLeftArrow

public Bitmap getLeftArrow()

Returns the left arrow image.

Returns:
the Bitmap set to represent the left arrow, or null if none has been set.
Since:
BlackBerry API 6.0.0

getModel

public PaneManagerModel getModel()

Returns the PaneManagerModel for this view.

Returns:
the PaneManagerModel that is associated with this view, or null if none has been set.
Since:
BlackBerry API 6.0.0

getNumberOfDisplayedPanes

public abstract int getNumberOfDisplayedPanes()

The number of panes who have titles being displayed at any given time. This number may not reflect the ammount rendered during an animated transition between panes.

Returns:
the number of titles of panes that are to being displayed when the field is static.
Since:
BlackBerry API 6.0.0

getRegionExtent

public abstract XYRect getRegionExtent(int index)

Provides the region of the Field that represents a title within the currently pushed region.

The index is that of the title.

Parameters:
index - the title who's region is to be retrieved.
Returns:
the XYRect of the title at the provided index.
Since:
BlackBerry API 6.0.0

getRightArrow

public Bitmap getRightArrow()

Provides access to the image that is currently set to use for the right arrow.

Returns:
the Bitmap that is set to use for the right arrow, or null if none has been set.
Since:
BlackBerry API 6.0.0

isAnimating

public abstract boolean isAnimating()

Returns whether or not the view is currently animating the transition between panes.

Returns:
true if the view is currently animating the transition between panes or false if the view is not currently animating the transition between pane.
Since:
BlackBerry API 6.0.0

jumpBackwards

public abstract void jumpBackwards(boolean animate,
                                   int duration)

As in TitleView.jumpTo(int, int, int, boolean, int, int) except this only causes a transition from the currently selected title to the one that preceeds it in the model.

Parameters:
animate - true to animate the transition false to just change the positions of the titles.
duration - the amount of time to animate the transition, in milliseconds
Since:
BlackBerry API 6.0.0

jumpForwards

public abstract void jumpForwards(boolean animate,
                                  int duration)

As in TitleView.jumpTo(int, int, int, boolean, int, int) except this only causes a transition from the currently selected title to the one that follows it in the model.

Parameters:
animate - true to animate the transition false to just change the positions of the titles.
duration - the amount of time to animate the transition, in milliseconds.
Since:
BlackBerry API 6.0.0

jumpTo

public abstract void jumpTo(int index,
                            int leftIndex,
                            int rightIndex,
                            boolean animate,
                            int direction,
                            int duration)

Tells the view to move from the currently selected pane to the pane at the index provided. The direction is used to control the animation of the change from the currently selected pane to the new pane.

Parameters:
index - the index of the pane to become the currently selected pane.
leftIndex - index of the content Field to render to the left the one we are transitioning to.
rightIndex - index of the content Field to render to the right of the one we are transitioning to.
animate - true to animate this change, false to just render the new content pane in the final position.
direction - the control value for the animation to take place PaneManagerView.DIRECTION_BACKWARDS, PaneManagerView.DIRECTION_FADE_IN, PaneManagerView.DIRECTION_FORWARDS, PaneManagerView.DIRECTION_NONE
duration - the amount of time to animate the transition, in milliseconds.
Since:
BlackBerry API 6.0.0

setLeftArrow

public void setLeftArrow(Bitmap arrow)

Allows for the association of an image to use when rendering an arrow on the left.

Parameters:
arrow - the Bitmap to associate with this view for rendering the left arrow.
Since:
BlackBerry API 6.0.0

setModel

public void setModel(PaneManagerModel model)

Allows for the association of a PaneManagerModel to this view.

Parameters:
model - the PaneManagerModel to associate to this view.
Since:
BlackBerry API 6.0.0

setRightArrow

public void setRightArrow(Bitmap arrow)

Allows for the association of an image to use when rendering an arrow on the right.

Parameters:
arrow - the Bitmap to associate with this view for rendering the right arrow.
Since:
BlackBerry API 6.0.0

snapToCurrent

public abstract void snapToCurrent(boolean animate,
                                   int duration,
                                   int direction)

Tells this view to move the currently selectly pane back to its default layout positioning. This undoes any offsets applied by calling #drag(int, int).

The titles will also be reset to the default position corresponding to the currently selected pane.

This transition will be animated based on the provided direction.

If the view has been offset by calling #drag(int, int) then calling this method will result in a visual effect of the pane having performed a slight bounce.

Parameters:
animate - true to animate the transition false to just change the positions of the titles.
duration - the amount of time to animate the transition, in milliseconds
direction - the animation control for which direction the panes should move with respect to the model: PaneManagerView.DIRECTION_BACKWARDS, PaneManagerView.DIRECTION_FADE_IN, PaneManagerView.DIRECTION_FORWARDS, PaneManagerView.DIRECTION_NONE.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal