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

java.lang.Object
  |
  +--net.rim.device.api.ui.Field
        |
        +--net.rim.device.api.ui.Manager
              |
              +--net.rim.device.api.ui.container.DialogFieldManager
All Implemented Interfaces:
IComponent, InputMethodListener

public class DialogFieldManager
extends Manager

A field manager used for laying out Dialog and Status screens.

Behaviour
This manager handles an icon, a message, and a special area which can hold a list of user-specified custom fields. To manage the list of fields in its user area, this manager employs a simple vertical field manager.

This manager lays out its icon in the top left corner, and its message label in the top left corner. The rich text field object containing the message label specifies the formatting and alignment of the label.

This manager lays out the subordinate field manager controlling the user field area below its icon and label. The task of laying out the user fields is delegated to the subordinate field manager.


Field Summary
 
Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLL_MASK, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_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_SCROLL_MASK, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK
 
Fields inherited from class net.rim.device.api.ui.Field
ACTION_INVOKE, 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
DialogFieldManager()
          Constructs a dialog field manager.
DialogFieldManager(long style)
          Constructs a dialog field manager with provided style.
DialogFieldManager(long style, long messageStyle)
          Constructs a dialog field manager with provided style.
 
Method Summary
 void addCustomField(Field f)
          Adds a user field to this manager.
 void deleteCustomField(Field field)
          Deletes a user field from this manager.
 void deleteCustomFields()
          Deletes all user fields from this manager.
 Field getCustomField(int index)
          Retrieves one of this manager's user fields.
 Manager getCustomManager()
          Retrieves the manager for this manager's user field area.
 void insertCustomField(Field f, int index)
          Inserts a user field to this manager.
protected  int moveFocus(int amount, int status, int time)
          Invoked by the framework to move focus within this manager.
 void setIcon(BitmapField icon)
          Adds or removes this manager's icon.
 void setMessage(RichTextField label)
          Sets this manager's title.
protected  void sublayout(int width, int height)
          Lays out this manager's contents.
 
Methods inherited from class net.rim.device.api.ui.Manager
add, delete, deleteAll, deleteRange, getAccessibleContext, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, insert, invalidate, invalidate, invalidateFieldRange, invokeAction, isDataValid, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layout, layoutChild, makeMenu, moveFocus, navigationClick, navigationMovement, navigationUnclick, nextFocus, onFocus, onUndisplay, onUnfocus, paint, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setHorizontalScroll, setPositionChild, setScrollListener, setVerticalQuantization, setVerticalScroll, setVirtualExtent, subpaint, touchEvent, trackwheelClick, trackwheelUnclick
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getOriginal, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTop, getVisualState, getWidth, invalidateAll, isEditable, isFocus, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, onDisplay, onExposed, onMenuDismissed, onMenuDismissed, onObscured, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setEditable, setExtent, setFocus, setFocusListener, setFont, setMuddy, setNonSpellCheckable, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogFieldManager

public DialogFieldManager()
Constructs a dialog field manager.

Use this method to build a dialog field manager with no scrolling style.


DialogFieldManager

public DialogFieldManager(long style)
Constructs a dialog field manager with provided style.

Use this method to build a dialog field manager with the specified scrolling style.

Parameters:
style - Scrolling style for this manager (can be Manager.VERTICAL_SCROLL or Manager.VERTICAL_SCROLLBAR).

DialogFieldManager

public DialogFieldManager(long style,
                          long messageStyle)
Constructs a dialog field manager with provided style.

Use this method to build a dialog field manager with the specified scrolling style.

Parameters:
style - Scrolling style for this manager (can be Manager.VERTICAL_SCROLL or Manager.VERTICAL_SCROLLBAR).
messageStyle - Scrolling style for this manager used for the message portion (can be Manager.VERTICAL_SCROLL or Manager.VERTICAL_SCROLLBAR).
Since:
JDE 4.0.0
Method Detail

addCustomField

public void addCustomField(Field f)
Adds a user field to this manager.
Parameters:
f - Field to add to this manager.

deleteCustomField

public void deleteCustomField(Field field)
Deletes a user field from this manager.
Parameters:
field - Field to delete from this manager.
Since:
JDE 3.6.0

deleteCustomFields

public void deleteCustomFields()
Deletes all user fields from this manager.
Since:
JDE 4.3.0

getCustomField

public Field getCustomField(int index)
Retrieves one of this manager's user fields.
Parameters:
index - Position of field within this manager's user field list.

getCustomManager

public Manager getCustomManager()
Retrieves the manager for this manager's user field area.

This dialog field manager uses another manager to control its user field area; use this method to retrieve that manager.

Returns:
Manager for this manager's user field area.

insertCustomField

public void insertCustomField(Field f,
                              int index)
Inserts a user field to this manager.
Parameters:
f - Field to add to this manager.
index - Position of field within this manager's user field list.
Since:
JDE 4.2.0

moveFocus

protected int moveFocus(int amount,
                        int status,
                        int time)
Invoked by the framework to move focus within this manager.
Overrides:
moveFocus in class Manager
Parameters:
amount - If positive, move focus forward this many index positions; if negative, move focus backwards this many index positions.
status - Trackwheel event modifiers.
time - Number of milliseconds since the device was turned on.
Returns:
Remaining scroll amount not used up, with the same sign as was originally provided with the amount parameter.
Since:
JDE 3.6.0

setIcon

public void setIcon(BitmapField icon)
Adds or removes this manager's icon.
Parameters:
icon - Icon to add, or null to remove this manager's icon.

setMessage

public void setMessage(RichTextField label)
Sets this manager's title.
Parameters:
label - Formatted string to use as this manager's title.

sublayout

protected void sublayout(int width,
                         int height)
Lays out this manager's contents.

This system invokes this method to prompt this manager to lay out its contents. Note that dialog field manager will in turn prompt its user field manager to layout any extra fields in its user field area.

Overrides:
sublayout in class Manager
Parameters:
width - Horizontal space available to this manager.
height - Vertical space available to this manager.



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.