|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.ScrollView
net.rim.device.api.ui.Manager
net.rim.device.api.ui.component.pane.TitleView
public abstract class TitleView
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.
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 |
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.ScrollView |
---|
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onUndisplay, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TitleView(long style)
Class constructor that accepts a long
of style bit flags and sets the Field.FOCUSABLE
style bit.
style
- style bit flags to use for this Manager
Method Detail |
---|
public abstract void drag(int dx, int dy, int index, int leftIndex, int rightIndex)
Offsets the positions of the current titles.
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.public Bitmap getLeftArrow()
Returns the left arrow image.
Bitmap
set to represent the left arrow,
or null
if none has been set.public PaneManagerModel getModel()
Returns the PaneManagerModel
for this view.
PaneManagerModel
that is associated with this view,
or null
if none has been set.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.
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.
index
- the title who's region is to be retrieved.
XYRect
of the title at the provided index.public Bitmap getRightArrow()
Provides access to the image that is currently set to use for the right arrow.
Bitmap
that is set to use for the right arrow,
or null if none has been set.public abstract boolean isAnimating()
Returns whether or not the view is currently animating the transition between panes.
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.
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 millisecondspublic 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.
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.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.
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.public void setLeftArrow(Bitmap arrow)
Allows for the association of an image to use when rendering an arrow on the left.
arrow
- the Bitmap
to associate with this view for rendering the left arrow.public void setModel(PaneManagerModel model)
Allows for the association of a PaneManagerModel
to this view.
model
- the PaneManagerModel
to associate to this view.public void setRightArrow(Bitmap arrow)
Allows for the association of an image to use when rendering an arrow on the right.
arrow
- the Bitmap
to associate with this view for rendering the right arrow.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.
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 millisecondsdirection
- 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
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.