All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.micronova.mnfc.IView

java.lang.Object
   |
   +----netscape.application.View
           |
           +----com.micronova.mnfc.IView

public class IView
extends View
implements IViewDelegate, IToolTipSource
IView is a View that dynamically delegates selected method calls (such as mouseDown(), drawView(), etc.) to its IViewDelegate object. Each method has its own bit flag (e.g., MOUSE_DOWN for mouseDown() method) to enable delegation. If the bit flag for a method is set (by setDelegateFlag()), whenever the method is called, the delegate object's delegate() method is called with the bit flag and the IView itself. Method parameters and return value are both instance variables of IView (parameters have '__' prefix, return values have '_' prefix) so IViewDelegate can examine method parameters and/or modify the return value during delegation.

Version:
1.0
Author:
Makoto Nagata, MicroNova

Variable Index

 o __event
Method parameter for MOUSE_XXX and KEY_XXX.
 o __g
Method parameter for DRAW_VIEW and SUBVIEWS_DRAWN.
 o __object
Free variable
 o __session
Method parameter for ACCEPTS_DRAG.
 o __view
Method parameter for SUBVIEW_XXX.
 o __x
Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
 o __y
Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
 o _acceptsDrag
Return value of acceptsDrag().
 o _canBecomeSelectedView
Return value of canBecomeSelectedView().
 o _cursorForPoint
Return value of cursorForPoint().
 o _getToolTipText
Return value of getToolTipText().
 o _hidesSubviewsFromKeyboard
Return value of hidesSubviewsFromKeyboard().
 o _isTransparent
Return value of isTransparent().
 o _mouseDown
Return value of mouseDown method.
 o _nextSelectableView
Return value of nextSelectableView().
 o _previousSelectableView
Return value of previousSelectableView().
 o _wantsAutoscrollEvents
Return value of wantsAutoScrollEvents().
 o _wantsMouseEventCoalescing
Return value of wantsMouseEventCoalescing().
 o ACCEPTS_DRAG
flag to delegate acceptsDrag().
 o ANCESTOR
flag to delegate all ANCESTOR_xxx notifications.
 o ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
flag to delegate notification after super.ancestorWasAddedToViewHierarchy().
 o ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
flag to delegate notification before super.ancestorWillRemoveFromViewHierarchy().
 o CAN_BECOME_SELECTED_VIEW
flag to delegate canBecomeSelectedView().
 o CURSOR_FOR_POINT
flag to delegate cursorForPoint().
 o delegateFlag
Defines which methods to be delegated (sum of bit flags).
 o DID_MOVE_BY
flag to delegate didMoveBy().
 o DID_SIZE_BY
flag to delegate didSizeBy().
 o DRAW_VIEW
flag to delegate drawView().
 o FOCUS
flag to delegate all focusXXX().
 o GET_TOOL_TIP_TEXT
flag to delegate getToolTipText().
 o HIDES_SUBVIEWS_FROM_KEYBOARD
flag to delegate hidesSubviewsFromKeyboard().
 o IS_TRANSPARENT
flag to delegate wantsMouseEventColalescing().
 o iViewDelegate
IViewDelegate object.
 o KEY
flag to delegate all KeyXXX() methods.
 o KEY_DOWN
flag to delegate keyDown().
 o KEY_UP
flag to delegate keyUp().
 o MOUSE
flag to delegate all mouseXXX() methods.
 o MOUSE_DOWN
flag to delegate mouseDown().
 o MOUSE_DRAGGED
flag to delegate mouseDragged().
 o MOUSE_ENTERED
flag to delegate mouseEntered().
 o MOUSE_EXITED
flag to delegate mouseExited().
 o MOUSE_MOVED
flag to delegate mouseMoved().
 o MOUSE_UP
flag to delegate mouseUp().
 o NEXT_SELECTABLE_VIEW
flag to delegate nextSelectableView().
 o PAUSE_FOCUS
flag to delegate pauseFocus().
 o PREVIOUS_SELECTABLE_VIEW
flag to delegate previousSelectableView().
 o RESUME_FOCUS
flag to delegate resumeFocus().
 o START_FOCUS
flag to delegate startFocus().
 o STOP_FOCUS
flag to delegate stopFocus().
 o SUBVIEW
flag to delegate all subviewXXX().
 o SUBVIEW_DID_MOVE
flag to delegate subviewDidMove().
 o SUBVIEW_DID_RESIZE
flag to delegate subviewDidResize().
 o SUBVIEWS_DRAWN
flag to delegate notification after drawSubviews().
 o WANTS_AUTOSCROLL_EVENTS
flag to delegate wantsAutoscrollEvents()
 o WANTS_MOUSE_EVENT_COALESCING
flag to delegate wantsMouseEventColalescing().
 o WILL_BECOME_SELECTED
flag to delegate willBecomeSelected().
 o WILL_BECOME_UNSELECTED
flag to delegate willBecomeUnselected().

Constructor Index

 o IView()
Constructs an IView with bounds (0, 0, 0, 0) and sets itself as the delegate object.
 o IView(int, int, int, int)
Constructs an IView with bounds (x, y, width, height) and sets itself as the delegate object.
 o IView(Rect)
Constructs an IView with bounds r and sets itself as the delegate object.

Method Index

 o acceptsDrag(DragSession, int, int)
If ACCEPTS_DRAG flag is set, sets '__session' to session and '__x' to x and '__y' to y and delegates.
 o ancestorWasAddedToViewHierarchy(View)
If ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY flag is set, delegates after calling the View's default implementation.
 o ancestorWillRemoveFromViewHierarchy(View)
If ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY flag is set, delegates before calling the View's default implementation.
 o canBecomeSelectedView()
Returns the value of _canBecomeSelectedView.
 o cursorForPoint(int, int)
If CURSOR_FOR_POINT flag is set, sets and '__x' to x and '__y' to y and delegates.
 o delegate(int, IView)
Dummy self-delegation.
 o didMoveBy(int, int)
If DID_MOVE_BY flag is set, sets '__x' to deltaX and '__y' to deltaY and delegates.
 o didSizeBy(int, int)
If DID_SIZE_BY flag is set, sets '__x' to deltaWidth and '__y' to deltaHeight and delegates.
 o drawSubviews(Graphics)
If SUBVIEWS_DRAWN flag is set, sets '__g' to the Graphics and delegates after calling the View's default implementation.
 o drawView(Graphics)
If DRAW_VIEW flag is set, sets '__g' to the Graphics and delegates.
 o getToolTipText(MouseEvent)
If GET_TOOL_TIP_TEXT flag is set, delegates.
 o hidesSubviewsFromKeyboard()
Returns the value of _hidesSubviewsFromKeyboard.
 o isTransparent()
Returns the value of _isTransparent.
 o keyDown(KeyEvent)
If KEY_DOWN flag is set, sets '__event' to the KeyEvent and delegates.
 o keyUp(KeyEvent)
If KEY_UP flag is set, sets '__event' to the KeyEvent and delegates.
 o mouseDown(MouseEvent)
If MOUSE_DOWN flag is set, sets '__event' to the MouseEvent and delegates.
 o mouseDragged(MouseEvent)
If MOUSE_DRAGGED flag is set, sets '__event' to the MouseEvent and delegates.
 o mouseEntered(MouseEvent)
If MOUSE_ENTERED flag is set, sets '__event' to the MouseEvent and delegates.
 o mouseExited(MouseEvent)
If MOUSE_EXITED flag is set, sets '__event' to the MouseEvent and delegates.
 o mouseMoved(MouseEvent)
If MOUSE_MOVED flag is set, sets '__event' to the MouseEvent and delegates.
 o mouseUp(MouseEvent)
If MOUSE_UP flag is set, sets '__event' to the MouseEvent and delegates.
 o nextSelectableView()
If NEXT_SELECTABLE_VIEW flag is set, delegates.
 o pauseFocus()
If PAUSE_FOCUS flag is set, delegates.
 o previousSelectableView()
If PREVIOUS_SELECTABLE_VIEW flag is set, delegates.
 o resumeFocus()
If RESUME_FOCUS flag is set, delegates.
 o setDelegateFlag(int)
Sets the delegateFlag (sum of bit flags); e.g., setDelegateFlag(MOUSE + KEY) to delegate all mouseXXX and keyXXX methods.
 o setDelegateFlag(int, boolean)
Sets/clears individual delegate flag (e.g., setDelegateFlag(MOUSE_DOWN, true) to delegate mouseDown().
 o setIViewDelegate(IViewDelegate)
Sets IViewDelegate object.
 o startFocus()
If START_FOCUS flag is set, delegates.
 o stopFocus()
If STOP_FOCUS flag is set, delegates.
 o subviewDidMove(View)
If SUBVIEW_DID_MOVE flag is set, sets '__view' to the subview and delegates.
 o subviewDidResize(View)
If SUBVIEW_DID_RESIZE flag is set, sets '__view' to the subview and delegates.
 o wantsAutoscrollEvents()
Returns the value of _wantsAutoscrollEvents.
 o wantsMouseEventCoalescing()
Returns the value of _wantsMouseEventCoalescing.
 o willBecomeSelected()
If WILL_BECOME_SELECTED flag is set, delegates.
 o willBecomeUnselected()
If WILL_BECOME_UNSELECTED flag is set, delegates.

Variables

 o iViewDelegate
 public IViewDelegate iViewDelegate
IViewDelegate object. Defaults to IView itself.

 o delegateFlag
 public int delegateFlag
Defines which methods to be delegated (sum of bit flags).

 o _mouseDown
 public boolean _mouseDown
Return value of mouseDown method.

 o _wantsAutoscrollEvents
 public boolean _wantsAutoscrollEvents
Return value of wantsAutoScrollEvents().

 o _wantsMouseEventCoalescing
 public boolean _wantsMouseEventCoalescing
Return value of wantsMouseEventCoalescing().

 o _isTransparent
 public boolean _isTransparent
Return value of isTransparent().

 o _acceptsDrag
 public DragDestination _acceptsDrag
Return value of acceptsDrag().

 o _cursorForPoint
 public int _cursorForPoint
Return value of cursorForPoint().

 o _nextSelectableView
 public View _nextSelectableView
Return value of nextSelectableView().

 o _previousSelectableView
 public View _previousSelectableView
Return value of previousSelectableView().

 o _canBecomeSelectedView
 public boolean _canBecomeSelectedView
Return value of canBecomeSelectedView().

 o _hidesSubviewsFromKeyboard
 public boolean _hidesSubviewsFromKeyboard
Return value of hidesSubviewsFromKeyboard().

 o _getToolTipText
 public String _getToolTipText
Return value of getToolTipText().

 o __event
 public Event __event
Method parameter for MOUSE_XXX and KEY_XXX.

 o __g
 public Graphics __g
Method parameter for DRAW_VIEW and SUBVIEWS_DRAWN.

 o __view
 public View __view
Method parameter for SUBVIEW_XXX.

 o __x
 public int __x
Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.

 o __y
 public int __y
Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.

 o __session
 public DragSession __session
Method parameter for ACCEPTS_DRAG.

 o __object
 public Object __object
Free variable

 o MOUSE_DOWN
 public static final int MOUSE_DOWN
flag to delegate mouseDown().

 o MOUSE_UP
 public static final int MOUSE_UP
flag to delegate mouseUp().

 o MOUSE_MOVED
 public static final int MOUSE_MOVED
flag to delegate mouseMoved().

 o MOUSE_ENTERED
 public static final int MOUSE_ENTERED
flag to delegate mouseEntered().

 o MOUSE_EXITED
 public static final int MOUSE_EXITED
flag to delegate mouseExited().

 o MOUSE_DRAGGED
 public static final int MOUSE_DRAGGED
flag to delegate mouseDragged().

 o MOUSE
 public static final int MOUSE
flag to delegate all mouseXXX() methods.

 o KEY_DOWN
 public static final int KEY_DOWN
flag to delegate keyDown().

 o KEY_UP
 public static final int KEY_UP
flag to delegate keyUp().

 o KEY
 public static final int KEY
flag to delegate all KeyXXX() methods.

 o START_FOCUS
 public static final int START_FOCUS
flag to delegate startFocus().

 o STOP_FOCUS
 public static final int STOP_FOCUS
flag to delegate stopFocus().

 o PAUSE_FOCUS
 public static final int PAUSE_FOCUS
flag to delegate pauseFocus().

 o RESUME_FOCUS
 public static final int RESUME_FOCUS
flag to delegate resumeFocus().

 o FOCUS
 public static final int FOCUS
flag to delegate all focusXXX().

 o ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
 public static final int ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
flag to delegate notification after super.ancestorWasAddedToViewHierarchy().

 o ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
 public static final int ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
flag to delegate notification before super.ancestorWillRemoveFromViewHierarchy().

 o ANCESTOR
 public static final int ANCESTOR
flag to delegate all ANCESTOR_xxx notifications.

 o SUBVIEW_DID_RESIZE
 public static final int SUBVIEW_DID_RESIZE
flag to delegate subviewDidResize().

 o SUBVIEW_DID_MOVE
 public static final int SUBVIEW_DID_MOVE
flag to delegate subviewDidMove().

 o SUBVIEW
 public static final int SUBVIEW
flag to delegate all subviewXXX().

 o DID_MOVE_BY
 public static final int DID_MOVE_BY
flag to delegate didMoveBy().

 o DID_SIZE_BY
 public static final int DID_SIZE_BY
flag to delegate didSizeBy().

 o DRAW_VIEW
 public static final int DRAW_VIEW
flag to delegate drawView().

 o SUBVIEWS_DRAWN
 public static final int SUBVIEWS_DRAWN
flag to delegate notification after drawSubviews().

 o ACCEPTS_DRAG
 public static final int ACCEPTS_DRAG
flag to delegate acceptsDrag().

 o CURSOR_FOR_POINT
 public static final int CURSOR_FOR_POINT
flag to delegate cursorForPoint().

 o WILL_BECOME_SELECTED
 public static final int WILL_BECOME_SELECTED
flag to delegate willBecomeSelected().

 o WILL_BECOME_UNSELECTED
 public static final int WILL_BECOME_UNSELECTED
flag to delegate willBecomeUnselected().

 o NEXT_SELECTABLE_VIEW
 public static final int NEXT_SELECTABLE_VIEW
flag to delegate nextSelectableView().

 o PREVIOUS_SELECTABLE_VIEW
 public static final int PREVIOUS_SELECTABLE_VIEW
flag to delegate previousSelectableView().

 o GET_TOOL_TIP_TEXT
 public static final int GET_TOOL_TIP_TEXT
flag to delegate getToolTipText().

 o WANTS_AUTOSCROLL_EVENTS
 public static final int WANTS_AUTOSCROLL_EVENTS
flag to delegate wantsAutoscrollEvents()

 o WANTS_MOUSE_EVENT_COALESCING
 public static final int WANTS_MOUSE_EVENT_COALESCING
flag to delegate wantsMouseEventColalescing().

 o IS_TRANSPARENT
 public static final int IS_TRANSPARENT
flag to delegate wantsMouseEventColalescing().

 o CAN_BECOME_SELECTED_VIEW
 public static final int CAN_BECOME_SELECTED_VIEW
flag to delegate canBecomeSelectedView().

 o HIDES_SUBVIEWS_FROM_KEYBOARD
 public static final int HIDES_SUBVIEWS_FROM_KEYBOARD
flag to delegate hidesSubviewsFromKeyboard().

Constructors

 o IView
 public IView(int x,
              int y,
              int width,
              int height)
Constructs an IView with bounds (x, y, width, height) and sets itself as the delegate object.

 o IView
 public IView(Rect r)
Constructs an IView with bounds r and sets itself as the delegate object.

 o IView
 public IView()
Constructs an IView with bounds (0, 0, 0, 0) and sets itself as the delegate object.

Methods

 o setIViewDelegate
 public void setIViewDelegate(IViewDelegate delegate)
Sets IViewDelegate object.

 o setDelegateFlag
 public void setDelegateFlag(int delegateFlag)
Sets the delegateFlag (sum of bit flags); e.g., setDelegateFlag(MOUSE + KEY) to delegate all mouseXXX and keyXXX methods.

 o setDelegateFlag
 public void setDelegateFlag(int delegateFlag,
                             boolean enable)
Sets/clears individual delegate flag (e.g., setDelegateFlag(MOUSE_DOWN, true) to delegate mouseDown().

 o mouseDown
 public boolean mouseDown(MouseEvent event)
If MOUSE_DOWN flag is set, sets '__event' to the MouseEvent and delegates. Returns _mouseDown variable.

Overrides:
mouseDown in class View
 o mouseMoved
 public void mouseMoved(MouseEvent event)
If MOUSE_MOVED flag is set, sets '__event' to the MouseEvent and delegates.

Overrides:
mouseMoved in class View
 o mouseUp
 public void mouseUp(MouseEvent event)
If MOUSE_UP flag is set, sets '__event' to the MouseEvent and delegates.

Overrides:
mouseUp in class View
 o mouseDragged
 public void mouseDragged(MouseEvent event)
If MOUSE_DRAGGED flag is set, sets '__event' to the MouseEvent and delegates.

Overrides:
mouseDragged in class View
 o mouseEntered
 public void mouseEntered(MouseEvent event)
If MOUSE_ENTERED flag is set, sets '__event' to the MouseEvent and delegates.

Overrides:
mouseEntered in class View
 o mouseExited
 public void mouseExited(MouseEvent event)
If MOUSE_EXITED flag is set, sets '__event' to the MouseEvent and delegates.

Overrides:
mouseExited in class View
 o keyDown
 public void keyDown(KeyEvent event)
If KEY_DOWN flag is set, sets '__event' to the KeyEvent and delegates. Note that there is no default implementation (so the event is not automatically passed to the superview).

Overrides:
keyDown in class View
 o keyUp
 public void keyUp(KeyEvent event)
If KEY_UP flag is set, sets '__event' to the KeyEvent and delegates. Note that there is no default implementation (so the event is not automatically passed to the superview).

Overrides:
keyUp in class View
 o startFocus
 public void startFocus()
If START_FOCUS flag is set, delegates.

Overrides:
startFocus in class View
 o stopFocus
 public void stopFocus()
If STOP_FOCUS flag is set, delegates.

Overrides:
stopFocus in class View
 o pauseFocus
 public void pauseFocus()
If PAUSE_FOCUS flag is set, delegates.

Overrides:
pauseFocus in class View
 o resumeFocus
 public void resumeFocus()
If RESUME_FOCUS flag is set, delegates.

Overrides:
resumeFocus in class View
 o ancestorWasAddedToViewHierarchy
 public void ancestorWasAddedToViewHierarchy(View addedView)
If ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY flag is set, delegates after calling the View's default implementation.

Overrides:
ancestorWasAddedToViewHierarchy in class View
 o ancestorWillRemoveFromViewHierarchy
 public void ancestorWillRemoveFromViewHierarchy(View removedView)
If ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY flag is set, delegates before calling the View's default implementation.

Overrides:
ancestorWillRemoveFromViewHierarchy in class View
 o drawView
 public void drawView(Graphics g)
If DRAW_VIEW flag is set, sets '__g' to the Graphics and delegates.

Overrides:
drawView in class View
 o drawSubviews
 public void drawSubviews(Graphics g)
If SUBVIEWS_DRAWN flag is set, sets '__g' to the Graphics and delegates after calling the View's default implementation.

Overrides:
drawSubviews in class View
 o subviewDidResize
 public void subviewDidResize(View aSubview)
If SUBVIEW_DID_RESIZE flag is set, sets '__view' to the subview and delegates.

Overrides:
subviewDidResize in class View
 o subviewDidMove
 public void subviewDidMove(View aSubview)
If SUBVIEW_DID_MOVE flag is set, sets '__view' to the subview and delegates.

Overrides:
subviewDidMove in class View
 o wantsMouseEventCoalescing
 public boolean wantsMouseEventCoalescing()
Returns the value of _wantsMouseEventCoalescing.

Overrides:
wantsMouseEventCoalescing in class View
 o wantsAutoscrollEvents
 public boolean wantsAutoscrollEvents()
Returns the value of _wantsAutoscrollEvents.

Overrides:
wantsAutoscrollEvents in class View
 o didMoveBy
 public void didMoveBy(int deltaX,
                       int deltaY)
If DID_MOVE_BY flag is set, sets '__x' to deltaX and '__y' to deltaY and delegates.

Overrides:
didMoveBy in class View
 o didSizeBy
 public void didSizeBy(int deltaWidth,
                       int deltaHeight)
If DID_SIZE_BY flag is set, sets '__x' to deltaWidth and '__y' to deltaHeight and delegates.

Overrides:
didSizeBy in class View
 o acceptsDrag
 public DragDestination acceptsDrag(DragSession session,
                                    int x,
                                    int y)
If ACCEPTS_DRAG flag is set, sets '__session' to session and '__x' to x and '__y' to y and delegates. Returns _acceptsDrag.

Overrides:
acceptsDrag in class View
 o cursorForPoint
 public int cursorForPoint(int x,
                           int y)
If CURSOR_FOR_POINT flag is set, sets and '__x' to x and '__y' to y and delegates. Always returns the value of _cursorForPoint.

Overrides:
cursorForPoint in class View
 o willBecomeSelected
 public void willBecomeSelected()
If WILL_BECOME_SELECTED flag is set, delegates.

Overrides:
willBecomeSelected in class View
 o willBecomeUnselected
 public void willBecomeUnselected()
If WILL_BECOME_UNSELECTED flag is set, delegates.

Overrides:
willBecomeUnselected in class View
 o isTransparent
 public boolean isTransparent()
Returns the value of _isTransparent.

Overrides:
isTransparent in class View
 o canBecomeSelectedView
 public boolean canBecomeSelectedView()
Returns the value of _canBecomeSelectedView.

Overrides:
canBecomeSelectedView in class View
 o hidesSubviewsFromKeyboard
 public boolean hidesSubviewsFromKeyboard()
Returns the value of _hidesSubviewsFromKeyboard.

Overrides:
hidesSubviewsFromKeyboard in class View
 o nextSelectableView
 public View nextSelectableView()
If NEXT_SELECTABLE_VIEW flag is set, delegates. Always returns the value of _nextSelectedView.

Overrides:
nextSelectableView in class View
 o previousSelectableView
 public View previousSelectableView()
If PREVIOUS_SELECTABLE_VIEW flag is set, delegates. Always returns the value of _previousSelectedView.

Overrides:
previousSelectableView in class View
 o getToolTipText
 public String getToolTipText(MouseEvent event)
If GET_TOOL_TIP_TEXT flag is set, delegates. Returns the value of _getToolTipText.

 o delegate
 public void delegate(int flag,
                      IView iView)
Dummy self-delegation. This does nothing.


All Packages  Class Hierarchy  This Package  Previous  Next  Index