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

java.lang.Object
  extended by net.rim.device.api.ui.component.pane.PaneManagerController
      extended by net.rim.device.api.ui.component.pane.HorizontalScrollableController

public class HorizontalScrollableController
extends PaneManagerController

Extension of PaneManagerController that implements a controller for the HorizontalScrollableTitleView.

Navigation movement that occurs in the HorizontalScrollableTitleView causes the Pane to change.

TouchGesture.TAP on either the left or right title causes the Pane to change. When either occurs on the current title, the associated Command is invoked Command.execute(Object) and the current instance of this class is passed in as the contextual object.

TouchGesture.SWIPE will cause the Pane to change.

TouchEvent.MOVE that occurs in the region of the HorizontalScrollableTitleView moves the title and content around the screen.

Since:
BlackBerry API 6.0.0

Constructor Summary
HorizontalScrollableController()
          Basic class constructor, initializes the component.
 
Method Summary
 boolean navigationClick(int status, int time)
          Invoked when the navigational action is selected.
 boolean navigationMovement(int dx, int dy, int status, int time)
          Invoked in response to a navigational motion.
 boolean touchEvent(TouchEvent message)
          Handles touch input events (see TouchEvent).
 
Methods inherited from class net.rim.device.api.ui.component.pane.PaneManagerController
getCommand, getModel, getView, isInBounds, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, setCommand, setModel, setView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

HorizontalScrollableController

public HorizontalScrollableController()

Basic class constructor, initializes the component.

Since:
BlackBerry API 6.0.0


Method Detail

navigationClick

public boolean navigationClick(int status,
                               int time)
Invoked when the navigational action is selected.

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

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.

Overrides:
navigationClick in class PaneManagerController
Parameters:
status - Bitfield of values defined by KeypadListener.
time - Number of milliseconds since the device was turned on.
Returns:
True if this method consumed the event; otherwise, false.
Since:
BlackBerry API 6.0.0

navigationMovement

public boolean navigationMovement(int dx,
                                  int dy,
                                  int status,
                                  int time)
Invoked in response to a navigational motion.

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.

Overrides:
navigationMovement in class PaneManagerController
Parameters:
dx - Magnitude of navigational motion: negative for a move left and postive for a move right.
dy - Magnitude of navigational motion: negative for an upwards move, and positive for a downwards move.
status - Bitfield of values defined by KeypadListener.
time - Number of milliseconds since the device was turned on.
Returns:
True if event was consumed; otherwise, false.
Since:
BlackBerry API 6.0.0

touchEvent

public 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 the associated view. The x, y coordinates are then further mapped to the top-left corner of the field with input.

Overrides:
touchEvent in class PaneManagerController
Parameters:
message - TouchEvent object containing various input parameters including the event type and touch coordinates.
Returns:
True if event consumed; otherwise, false.
Throws:
IllegalArgumentException - If message is null.
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.