net.rim.device.api.ui.container
Class AbsoluteFieldManager

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.container.AbsoluteFieldManager
All Implemented Interfaces:
AdjustmentListener
Direct Known Subclasses:
ViewfinderOverlay, ComponentCanvas, EyelidFieldManager

public class AbsoluteFieldManager
extends Manager

A manager that allows placement of fields at specific x-y positions. Rather than based on the extent of the surrounding fields, fields can be placed anywhere on the screen and can even overlap.

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
AbsoluteFieldManager()
          Creates a new AbsoluteFieldManager.
 
Method Summary
 void add(Field field, int x, int y)
          Adds the specified field to this manager at the location (x, y).
 int getPreferredHeight()
          Retrieves this manager's preferred height.
 int getPreferredWidth()
          Retrieves this manager's preferred width.
 void insert(Field field, int index, int x, int y)
          Inserts a field into this manager at the location (x, y).
protected  int nextFocus(int direction, int axis)
          Retrieves the index of the next field that should be given focus in the indicated direction of movement.
 void setPosChild(Field field, int x, int y)
          Set the position of a specified Field contained within this manager.
protected  void sublayout(int width, int height)
          Implements custom layout features for this manager.
 
Methods inherited from class net.rim.device.api.ui.Manager
add, addAll, cursorClick, 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, onFocus, onUnfocus, paint, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setPositionChild, setScrollingInertial, setVerticalQuantization, setVirtualExtent, subpaint, touchEvent, 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, 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
 



Constructor Detail

AbsoluteFieldManager

public AbsoluteFieldManager()
Creates a new AbsoluteFieldManager.

Since:
BlackBerry API 6.0.0


Method Detail

getPreferredHeight

public int getPreferredHeight()
Retrieves this manager's preferred height.

Overrides:
getPreferredHeight in class Field
Returns:
The height of the display.
Since:
BlackBerry API 6.0.0

getPreferredWidth

public int getPreferredWidth()
Retrieves this manager's preferred width.

Overrides:
getPreferredWidth in class Field
Returns:
The width of the display.
Since:
BlackBerry API 6.0.0

nextFocus

protected int nextFocus(int direction,
                        int axis)
Retrieves the index of the next field that should be given focus in the indicated direction of movement.

The framework calls this method during a trackball or trackpad focus move operation.

Overrides:
nextFocus in class Manager
Parameters:
direction - The direction in which the focus is moving: a value of 1 indicates that the focus is moving forward (generally down and to the right), while a value of -1 indicates that the focus is moving backwards (generally up and to the left).
axis - The axis of movement the direction is in. This can be one of Field.AXIS_SEQUENTIAL, Field.AXIS_HORIZONTAL or Field.AXIS_VERTICAL.
Returns:
Index of the next field that should receive focus or -1 if the focus should leave the manager.
Throws:
IllegalArgumentException - If direction parameter is a value other than 1 or -1.
IllegalArgumentException - If an axis parameter is a value other than AXIS_SEQUENTIAL, AXIS_HORIZONTAL or AXIS_VERTICAL.
Since:
BlackBerry API 6.0.0

setPosChild

public void setPosChild(Field field,
                        int x,
                        int y)
Set the position of a specified Field contained within this manager.

Parameters:
field - The field to position.
x - The horizontal position of the field's top-left corner.
y - The vertical position of the field's top-left corner.
Since:
BlackBerry API 6.0.0

sublayout

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

Specified by:
sublayout in class Manager
Parameters:
width - Width available for this manager in pixels.
height - Height available for this manager in pixels.
See Also:
Manager.sublayout(int, int)
Since:
BlackBerry API 6.0.0

add

public void add(Field field,
                int x,
                int y)
Adds the specified field to this manager at the location (x, y).

Parameters:
field - The field to add.
x - The horizontal co-ordinate at which to position the top-left corner of the field.
y - The vertical co-ordinate at which to position the top-left corner of the field.
Throws:
IllegalStateException - If the field has already been added to a manager.
IllegalArgumentException - If the field is being added to itself.
Since:
BlackBerry API 6.0.0

insert

public void insert(Field field,
                   int index,
                   int x,
                   int y)
Inserts a field into this manager at the location (x, y).

Parameters:
field - The field to insert.
index - The index position the field will occupy in the manager's list of controlled fields.
x - The horizontal coordinate at which to position the top-left corner of the field.
y - The vertical coordinate at which to position the top-left corner of the field.
Throws:
IndexOutOfBoundsException - If index is less than zero or greater than Manager.getFieldCount().
IllegalStateException - If the field has already been added to a manager.
IllegalArgumentException - If the field is being added to itself.
Since:
BlackBerry API 7.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