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

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.PaneManagerView
All Implemented Interfaces:
AdjustmentListener

public class PaneManagerView
extends Manager

PaneManagerView is a Manager that displays information in tabbed panes. The information is stored in Pane objects that are contained in a PaneManagerModel.

The Pane Manager classes conform to the Model-View-Controller design pattern. PaneManagerView implements the View. It lays out and renders the panes. PaneManagerModel implements the Model. It maintains the Pane objects that represent the data and tracks the current position within the model. PaneManagerController implments the Controller. It handles all user input received by the Pane Manager. If the Controller cannot handle a user event, PaneManagerView forwards the event to the contained Field objects.

PaneManagerView delegates layout and rendering to two other classes. PaneView handles the content Field objects. You can get these fields from the current set of Pane objects by using Pane.getPane(). TitleView handles the title Field objects. You can get these fields from the current set of Pane objects by using Pane.getTitle(). TitleView lays out the titles above the content. You can create alternate layouts by specifying a delegate Manager by using PaneManagerView.setDelegate(Manager).

Unlike Manager, PaneManagerView does not let you add or remove Field objects. PaneManagerView does not support PaneManagerView.add(Field), PaneManagerView.addAll(Field[]), PaneManagerView.delete(Field), PaneManagerView.deleteAll(), PaneManagerView.deleteRange(int, int),PaneManagerView.insert(Field, int), PaneManagerView.insertAll(Field[], int), or PaneManagerView.replace(Field, Field). To modify content, add or remove Pane objects contained in the associated PaneManagerModel. To do this, use PaneManagerModel.addPane(Pane), PaneManagerModel.deletePane(Pane), PaneManagerModel.insertPane(Pane, int), and PaneManagerModel.replacePane(Pane, Pane).

Since:
BlackBerry API 6.0.0

Field Summary
static int DEFAULT_ANIMATION_DURATION
          Deprecated. Replaced by PaneManagerView.getDefaultAnimationDuration()
static int DIRECTION_BACKWARDS
          Specifies that the tab focus order of the tabbed panes should be the reverse of the order that Panes are stored in the Model.
static int DIRECTION_FADE_IN
          Specifies that, when switching from one Pane to another, the target pane should fade into view over the top of the current pane.
static int DIRECTION_FORWARDS
          Specifies that the tab focus order of the tabbed panes should be the order that Panes are stored in the Model.
static int DIRECTION_NONE
          Specifies that there is no preferred direction for the Pane to end the current view.
 
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
PaneManagerView(long style, TitleView title, PaneView pane)
          Class constructor that requires a TitleView and PaneView and lets you specify style bits.
 
Method Summary
 void add(Field field)
          Throws an UnsupportedOperationException.
 void addAll(Field[] fields)
          Throws an UnsupportedOperationException.
 void clearOverriddenTitle()
          Removes the currently set overridden header.
 void delete(Field field)
          This view does not support direct manipulation of its contents.
 void deleteAll()
          This view does not support direct manipulation of its contents.
 void deleteRange(int start, int count)
          This view does not support direct manipulation of its contents.
 float drag(int dx, int dy)
          Moves both the title and the content pane by the specified number of pixels.
 int getAnimationDuration()
          Returns the current value that specifies the duration of all animations controlled by this view.
 XYRect getContentExtent()
          Returns the extent of the PaneView associated with this view.
 PaneManagerController getController()
          Returns the PaneManagerController for this view.
 Manager getDelegate()
          Returns the layout delegate for this view.
 PaneManagerModel getModel()
           Returns the PaneManagerModel for this view.
 PaneView getPane()
          Returns the associated pane for this view.
 TitleView getTitle()
          Returns the TitleView for this view.
 XYRect getTitleExtent()
          Returns the extent of the TitleView associated to this view.
 void insert(Field field, int index)
          This view does not support direct manipulation of its contents.
 void insertAll(Field[] fields, int index)
          This view does not support direct manipulation of its contents.
 boolean isAnimating()
          Indicates if this view is currently animating the transition between panes.
 void jumpTo(int index, int direction)
          Causes this view to move from the currently selected pane to the pane at the index provided.
protected  boolean keyChar(char ch, int status, int time)
          Handles key generation events.
protected  boolean keyControl(char ch, int status, int time)
          Sends key generation event to the controlled field with focus.
protected  boolean keyDown(int keycode, int time)
          Sends key down event to the controlled field with focus.
protected  boolean keyRepeat(int keycode, int time)
          Sends key repeat event to the controlled field with focus.
protected  boolean keyStatus(int keycode, int time)
          Sends key status event to the controlled field with focus.
protected  boolean keyUp(int keycode, int time)
          Sends key up event to the controlled field with focus.
protected  boolean navigationClick(int status, int time)
          Invoked when a navigational action is performed.
protected  boolean navigationMovement(int dx, int dy, int status, int time)
          Invoked when a navigational motion occurs.
 void replace(Field oldField, Field newField)
          This view does not support direct manipulation of its contents.
 void setAnimationDuration(int duration)
          Specifies animation duration.
 void setController(PaneManagerController controller)
          Sets the controller for this view.
 void setDelegate(Manager delegate)
          Sets an optional Manager to handle the layout of the TitleView and PaneView.
 void setModel(PaneManagerModel model)
          Sets the model to this view, as well as to the TitleView and PaneView view associated to this view.
 void setOverriddenTitle(TitleView title)
          Sets an optional TitleView to provide a customized rendering in place of the titles contained within the associated PaneManagerModel.
 void setPane(PaneView pane)
          Sets the PaneView asssociated with this view.
 void setTitle(TitleView title)
          Sets the TitleView asssociated with this view.
 void snapToCurrent(int direction)
          Moves the currently selected pane back to its default layout position.
protected  void sublayout(int width, int height)
          Implements custom layout features for this manager.
protected  boolean touchEvent(TouchEvent message)
          Handles touch input events (see TouchEvent).
 
Methods inherited from class net.rim.device.api.ui.Manager
cursorClick, cursorUnclick, getAccessibleContext, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, invalidate, invalidate, invalidateFieldRange, invokeAction, isDataValid, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, layout, layoutChild, makeMenu, moveFocus, moveFocus, navigationUnclick, nextFocus, nextFocus, onFocus, onUnfocus, paint, paintChild, setDirty, setFocus, setHorizontalQuantization, setPositionChild, setScrollingInertial, setVerticalQuantization, setVirtualExtent, subpaint, trackwheelClick, trackwheelUnclick
 
Methods inherited from class net.rim.device.api.ui.ScrollView
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onExposed, onUndisplay, 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, onMenuDismissed, onMenuDismissed, onObscured, 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
 



Field Detail

DEFAULT_ANIMATION_DURATION

public static final int DEFAULT_ANIMATION_DURATION
Deprecated. Replaced by PaneManagerView.getDefaultAnimationDuration()

Default time (in milliseconds) to animate moving from one Pane to the next or previous Pane.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DIRECTION_BACKWARDS

public static final int DIRECTION_BACKWARDS

Specifies that the tab focus order of the tabbed panes should be the reverse of the order that Panes are stored in the Model. Reverse order tab focusing is implemented by calling PaneManagerModel.getLeftIndexOf(int) and PaneManagerModel.previousIndex().

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DIRECTION_FADE_IN

public static final int DIRECTION_FADE_IN

Specifies that, when switching from one Pane to another, the target pane should fade into view over the top of the current pane.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DIRECTION_FORWARDS

public static final int DIRECTION_FORWARDS

Specifies that the tab focus order of the tabbed panes should be the order that Panes are stored in the Model. The order is based on PaneManagerModel.getLeftIndexOf(int) and PaneManagerModel.nextIndex().

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DIRECTION_NONE

public static final int DIRECTION_NONE

Specifies that there is no preferred direction for the Pane to end the current view. If desired it can simply be rendered over top of the current one without any interm steps.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

PaneManagerView

public PaneManagerView(long style,
                       TitleView title,
                       PaneView pane)

Class constructor that requires a TitleView and PaneView and lets you specify style bits.

Parameters:
style - The set of style bits to apply to this view. This value is constructed by bitwise ORing style constants defined in Field and Manager.
title - The TitleView to layout and render titles.
pane - The PaneView to layout and render the content.
Throws:
IllegalArgumentException - if title or pane is null.
Since:
BlackBerry API 6.0.0


Method Detail

add

public void add(Field field)

Throws an UnsupportedOperationException. The add() method is not supported. To add content to this view, add it to the associated PaneManagerModel.

This view does not support direct manipulation of its contents. The view displays the provided contents with a paired header.

Overrides:
add in class Manager
Parameters:
field - This parameter is ignored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

addAll

public void addAll(Field[] fields)

Throws an UnsupportedOperationException. The addAll() method is not supported. To add content to this view, add it to the associated PaneManagerModel.

This view does not support direct manipulation of its contents. The view displays the provided contents with a paired header.

Overrides:
addAll in class Manager
Parameters:
fields - This parameter is ignored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

clearOverriddenTitle

public void clearOverriddenTitle()

Removes the currently set overridden header. Following rendering will once again be ran by the TitleView that was provided in the constructor.

Since:
BlackBerry API 6.0.0

delete

public void delete(Field field)

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Content can be removed from the PaneManagerModel associated to this view.

Overrides:
delete in class Manager
Parameters:
field - This parameter is ignored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

deleteAll

public void deleteAll()

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Content can be removed from the PaneManagerModel associated to this view.

Overrides:
deleteAll in class Manager
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

deleteRange

public void deleteRange(int start,
                        int count)

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Content can be removed the PaneManagerModel associated to this view.

Overrides:
deleteRange in class Manager
Parameters:
start - This parameter is ignored.
count - This parameter is ignored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

drag

public float drag(int dx,
                  int dy)

Moves both the title and the content pane by the specified number of pixels. Does nothing if the Model is null. Calls both TitleView.drag(int, int, int, int, int) and PaneView.drag(int, int, int, int, int) to place their contents appropriately.

Calling drag() invalidates this component.

Parameters:
dx - The number of pixels to move the title and content panes horizontally.
dy - The number of pixels to move the title and content panes vertically.
Returns:
The percentage of the width of this component that the horizontal move represented.
Since:
BlackBerry API 6.0.0

getAnimationDuration

public int getAnimationDuration()

Returns the current value that specifies the duration of all animations controlled by this view.

Returns:
The duration of animations (in milliseconds).
Since:
BlackBerry API 6.0.0

getContentExtent

public XYRect getContentExtent()

Returns the extent of the PaneView associated with this view. This is the same as calling Field.getExtent(). The returned object is not a copy.

Returns:
The extent of the PaneView or an empty XYRect if the associated pane is null.
Since:
BlackBerry API 6.0.0

getController

public PaneManagerController getController()

Returns the PaneManagerController for this view.

Returns:
The PaneManagerController associated with this view or null if no controller has been set.
Since:
BlackBerry API 6.0.0

getDelegate

public Manager getDelegate()

Returns the layout delegate for this view.

Returns:
The delegate Manager associated with this view 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 associated with this view or null if none has been set.
Since:
BlackBerry API 6.0.0

getPane

public PaneView getPane()

Returns the associated pane for this view.

Returns:
The PaneView associated with this view.
Since:
BlackBerry API 6.0.0

getTitle

public TitleView getTitle()

Returns the TitleView for this view.

Returns:
The TitleView associated with this view.
Since:
BlackBerry API 6.0.0

getTitleExtent

public XYRect getTitleExtent()

Returns the extent of the TitleView associated to this view. This is the same as calling Field.getExtent(). The returned object is not a copy.

Returns:
The extent of the TitleView or an empty XYRect if the associated pane is null.
Since:
BlackBerry API 6.0.0

insert

public void insert(Field field,
                   int index)

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Additional content can be added to the PaneManagerModel associated to this view.

Overrides:
insert in class Manager
Parameters:
field - This parameter is ignored.
index - This parameter is ignored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

insertAll

public void insertAll(Field[] fields,
                      int index)

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Additional content can be added to the PaneManagerModel associated to this view.

Overrides:
insertAll in class Manager
Parameters:
fields - This parameter is ignored.
index - This parameter is ingored.
Throws:
UnsupportedOperationException
Since:
BlackBerry API 6.0.0

keyChar

protected boolean keyChar(char ch,
                          int status,
                          int time)
Handles key generation events.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume the event, the view passes the event to its contents.

Overrides:
keyChar in class Manager
Parameters:
ch - The character generated.
status - The modifier key status.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

keyControl

protected boolean keyControl(char ch,
                             int status,
                             int time)
Sends key generation event to the controlled field with focus.

If no controlled field has the focus, this method does nothing and returns false.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
keyControl in class Manager
Parameters:
ch - The character generated.
status - The modifier key status.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

keyDown

protected boolean keyDown(int keycode,
                          int time)
Sends key down event to the controlled field with focus.

If no controlled field has the focus, this method does nothing and returns false.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
keyDown in class Manager
Parameters:
keycode - The code of the key that was pressed.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

keyRepeat

protected boolean keyRepeat(int keycode,
                            int time)
Sends key repeat event to the controlled field with focus.

If no controlled field has the focus, this method does nothing and returns false.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
keyRepeat in class Manager
Parameters:
keycode - The code of the key that was repeated.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

keyStatus

protected boolean keyStatus(int keycode,
                            int time)
Sends key status event to the controlled field with focus.

If no controlled field has the focus, this method does nothing and returns false.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
keyStatus in class Manager
Parameters:
keycode - The code of the status key.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

keyUp

protected boolean keyUp(int keycode,
                        int time)
Sends key up event to the controlled field with focus.

If no controlled field has the focus, this method does nothing and returns false.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
keyUp in class Manager
Parameters:
keycode - The code of the key that was released.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

navigationClick

protected boolean navigationClick(int status,
                                  int time)
Invoked when a navigational action is performed.

The system invokes this method when passing on a navigational click event.

The ALT-click combination will enter selection mode, or if in selection mode will copy.

The source of the navigation event can be determined by checking the KeypadListener.STATUS_TRACKWHEEL and KeypadListener.STATUS_FOUR_WAY bits of the status parameter; exactly one of them will be set.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
navigationClick in class Manager
Parameters:
status - A bitfield of values defined by KeypadListener.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

navigationMovement

protected boolean navigationMovement(int dx,
                                     int dy,
                                     int status,
                                     int time)
Invoked when a navigational motion occurs.

The source of the navigation event can be determined by checking the KeypadListener.STATUS_TRACKWHEEL and KeypadListener.STATUS_FOUR_WAY bits in the status parameter; exactly one of them will be set.

Prompts the PaneManagerController associated with this view to process the input event. If the controller does not consume this event, the view passes the event to its contents.

Overrides:
navigationMovement in class Manager
Parameters:
dx - The magnitude of navigational motion: negative for a move left and positive for a move right.
dy - The magnitude of navigational motion: negative for an upwards move, and positive for a downwards move.
status - A bitfield of values defined by KeypadListener.
time - The number of milliseconds since the device was turned on.
Returns:
true if event was consumed, false otherwise.
Since:
BlackBerry API 6.0.0

isAnimating

public boolean isAnimating()

Indicates if this view is currently animating the transition between panes.

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

jumpTo

public void jumpTo(int index,
                   int direction)

Causes this 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 select.
direction - The control value for the animation to take place PaneManagerView.DIRECTION_BACKWARDS, PaneManagerView.DIRECTION_FADE_IN, PaneManagerView.DIRECTION_FORWARDS, PaneManagerView.DIRECTION_NONE
Throws:
IllegalArgumentException - if the index is invalid.
Since:
BlackBerry API 6.0.0

replace

public void replace(Field oldField,
                    Field newField)

This view does not support direct manipulation of its contents. The view is intended for the displaying of provided contents with a paired header.

Additional content can be added to the PaneManagerModel associated to this view.

Overrides:
replace in class Manager
Parameters:
oldField - This parameter is ignored.
newField - This parameter is ignored.
Throws:
UnsupportedOperationException
See Also:
Manager.delete(Field), Manager.insert(Field, int), Field.getIndex(), Field.getManager(), Field.setFocus()
Since:
BlackBerry API 6.0.0

setAnimationDuration

public void setAnimationDuration(int duration)

Specifies animation duration. This is applied to all animations controlled by this view.

Parameters:
duration - The duration (in milliseconds) of animated transitions.
Throws:
IllegalArgumentException - if specified duration is less than 0 milliseconds.
Since:
BlackBerry API 6.0.0

setController

public void setController(PaneManagerController controller)

Sets the controller for this view. The controller handles all user input.

Parameters:
controller - The PaneManagerController to associate with this view.
Since:
BlackBerry API 6.0.0

setDelegate

public void setDelegate(Manager delegate)

Sets an optional Manager to handle the layout of the TitleView and PaneView.

Parameters:
delegate - The Manager to use as the delegate for this view.
Since:
BlackBerry API 6.0.0

setModel

public void setModel(PaneManagerModel model)

Sets the model to this view, as well as to the TitleView and PaneView view associated to this view. The model contains the set of Pane objects that this view should present.

Parameters:
model - The PaneManagerModel to use as the Model for this view.
Since:
BlackBerry API 6.0.0

setOverriddenTitle

public void setOverriddenTitle(TitleView title)

Sets an optional TitleView to provide a customized rendering in place of the titles contained within the associated PaneManagerModel.

This can be removed by PaneManagerView.clearOverriddenTitle().

Parameters:
title - The TitleView that will be an override for rendering. Providing null is the same as calling PaneManagerView.clearOverriddenTitle().
Since:
BlackBerry API 6.0.0

setPane

public void setPane(PaneView pane)

Sets the PaneView asssociated with this view. Lets you update the PaneView after creation of this view.

Parameters:
pane - The PaneView to use for layout and rendering of the content of panes.
Throws:
IllegalArgumentException - if pane is null.
Since:
BlackBerry API 6.0.0

setTitle

public void setTitle(TitleView title)

Sets the TitleView asssociated with this view. This lets you update the TitleView after creating this PaneManagerView.

Parameters:
title - The TitleView to use for layout and rendering of titles.
Throws:
IllegalArgumentException - if title is null.
Since:
BlackBerry API 6.0.0

snapToCurrent

public void snapToCurrent(int direction)

Moves the currently selected pane back to its default layout position. This reverts any offsets applied by calling PaneManagerView.drag(int, int).

Also resets the titles to the default position corresponding to the currently selected pane.

The transition animates in the specified direction.

If the view has been offset by calling PaneManagerView.drag(int, int) then this method will make the pane appear to bounce.

Parameters:
direction - An animation control flag indicating 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

sublayout

protected void sublayout(int width,
                         int height)
Implements custom layout features for this manager.

To create a manager with custom layout features, extend the Manager class and implement this method. Invoking the sublayout method prompts your manager subclass to lay out its fields. Manager.layout(int, int) invokes this method to perform custom layout handling. A manager must call setPositionChild for each child during sublayout. Note that setExtent must also be called, but it is the field's responsibility to do this in layout.

Specified by:
sublayout in class Manager
Parameters:
width - The width available for this manager.
height - The height available for this manager.
Since:
BlackBerry API 6.0.0

touchEvent

protected boolean touchEvent(TouchEvent message)
Handles touch input events (see TouchEvent). The coordinates reflect the location of the touch event with respect to the top-left of this Manager. The x, y coordinates are then further mapped to the top-left corner of the field with input.

This method prompts this view's controller to process the input event. If the controller does not consume this event the view passes the event to its contents.

Overrides:
touchEvent in class Manager
Parameters:
message - The TouchEvent object containing various input parameters including the event type and touch coordinates.
Returns:
true if this method consumes the event, false otherwise.
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