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
-
__event
- Method parameter for MOUSE_XXX and KEY_XXX.
-
__g
- Method parameter for DRAW_VIEW and SUBVIEWS_DRAWN.
-
__object
- Free variable
-
__session
- Method parameter for ACCEPTS_DRAG.
-
__view
- Method parameter for SUBVIEW_XXX.
-
__x
- Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
-
__y
- Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
-
_acceptsDrag
- Return value of acceptsDrag().
-
_canBecomeSelectedView
- Return value of canBecomeSelectedView().
-
_cursorForPoint
- Return value of cursorForPoint().
-
_getToolTipText
- Return value of getToolTipText().
-
_hidesSubviewsFromKeyboard
- Return value of hidesSubviewsFromKeyboard().
-
_isTransparent
- Return value of isTransparent().
-
_mouseDown
- Return value of mouseDown method.
-
_nextSelectableView
- Return value of nextSelectableView().
-
_previousSelectableView
- Return value of previousSelectableView().
-
_wantsAutoscrollEvents
- Return value of wantsAutoScrollEvents().
-
_wantsMouseEventCoalescing
- Return value of wantsMouseEventCoalescing().
-
ACCEPTS_DRAG
- flag to delegate acceptsDrag().
-
ANCESTOR
- flag to delegate all ANCESTOR_xxx notifications.
-
ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
- flag to delegate notification after super.ancestorWasAddedToViewHierarchy().
-
ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
- flag to delegate notification before super.ancestorWillRemoveFromViewHierarchy().
-
CAN_BECOME_SELECTED_VIEW
- flag to delegate canBecomeSelectedView().
-
CURSOR_FOR_POINT
- flag to delegate cursorForPoint().
-
delegateFlag
- Defines which methods to be delegated (sum of bit flags).
-
DID_MOVE_BY
- flag to delegate didMoveBy().
-
DID_SIZE_BY
- flag to delegate didSizeBy().
-
DRAW_VIEW
- flag to delegate drawView().
-
FOCUS
- flag to delegate all focusXXX().
-
GET_TOOL_TIP_TEXT
- flag to delegate getToolTipText().
-
HIDES_SUBVIEWS_FROM_KEYBOARD
- flag to delegate hidesSubviewsFromKeyboard().
-
IS_TRANSPARENT
- flag to delegate wantsMouseEventColalescing().
-
iViewDelegate
- IViewDelegate object.
-
KEY
- flag to delegate all KeyXXX() methods.
-
KEY_DOWN
- flag to delegate keyDown().
-
KEY_UP
- flag to delegate keyUp().
-
MOUSE
- flag to delegate all mouseXXX() methods.
-
MOUSE_DOWN
- flag to delegate mouseDown().
-
MOUSE_DRAGGED
- flag to delegate mouseDragged().
-
MOUSE_ENTERED
- flag to delegate mouseEntered().
-
MOUSE_EXITED
- flag to delegate mouseExited().
-
MOUSE_MOVED
- flag to delegate mouseMoved().
-
MOUSE_UP
- flag to delegate mouseUp().
-
NEXT_SELECTABLE_VIEW
- flag to delegate nextSelectableView().
-
PAUSE_FOCUS
- flag to delegate pauseFocus().
-
PREVIOUS_SELECTABLE_VIEW
- flag to delegate previousSelectableView().
-
RESUME_FOCUS
- flag to delegate resumeFocus().
-
START_FOCUS
- flag to delegate startFocus().
-
STOP_FOCUS
- flag to delegate stopFocus().
-
SUBVIEW
- flag to delegate all subviewXXX().
-
SUBVIEW_DID_MOVE
- flag to delegate subviewDidMove().
-
SUBVIEW_DID_RESIZE
- flag to delegate subviewDidResize().
-
SUBVIEWS_DRAWN
- flag to delegate notification after drawSubviews().
-
WANTS_AUTOSCROLL_EVENTS
- flag to delegate wantsAutoscrollEvents()
-
WANTS_MOUSE_EVENT_COALESCING
- flag to delegate wantsMouseEventColalescing().
-
WILL_BECOME_SELECTED
- flag to delegate willBecomeSelected().
-
WILL_BECOME_UNSELECTED
- flag to delegate willBecomeUnselected().
-
IView()
- Constructs an IView with bounds (0, 0, 0, 0) and sets itself as the delegate object.
-
IView(int, int, int, int)
- Constructs an IView with bounds (x, y, width, height) and sets itself as the delegate object.
-
IView(Rect)
- Constructs an IView with bounds r and sets itself as the delegate object.
-
acceptsDrag(DragSession, int, int)
- If ACCEPTS_DRAG flag is set, sets '__session' to session and '__x' to x and '__y' to y and delegates.
-
ancestorWasAddedToViewHierarchy(View)
- If ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY flag is set, delegates after calling the View's default implementation.
-
ancestorWillRemoveFromViewHierarchy(View)
- If ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY flag is set, delegates before calling the View's default implementation.
-
canBecomeSelectedView()
- Returns the value of _canBecomeSelectedView.
-
cursorForPoint(int, int)
- If CURSOR_FOR_POINT flag is set, sets and '__x' to x and '__y' to y and delegates.
-
delegate(int, IView)
- Dummy self-delegation.
-
didMoveBy(int, int)
- If DID_MOVE_BY flag is set, sets '__x' to deltaX and '__y' to deltaY and delegates.
-
didSizeBy(int, int)
- If DID_SIZE_BY flag is set, sets '__x' to deltaWidth and '__y' to deltaHeight and delegates.
-
drawSubviews(Graphics)
- If SUBVIEWS_DRAWN flag is set, sets '__g' to the Graphics and delegates after calling the View's default implementation.
-
drawView(Graphics)
- If DRAW_VIEW flag is set, sets '__g' to the Graphics and delegates.
-
getToolTipText(MouseEvent)
- If GET_TOOL_TIP_TEXT flag is set, delegates.
-
hidesSubviewsFromKeyboard()
- Returns the value of _hidesSubviewsFromKeyboard.
-
isTransparent()
- Returns the value of _isTransparent.
-
keyDown(KeyEvent)
- If KEY_DOWN flag is set, sets '__event' to the KeyEvent and delegates.
-
keyUp(KeyEvent)
- If KEY_UP flag is set, sets '__event' to the KeyEvent and delegates.
-
mouseDown(MouseEvent)
- If MOUSE_DOWN flag is set, sets '__event' to the MouseEvent and delegates.
-
mouseDragged(MouseEvent)
- If MOUSE_DRAGGED flag is set, sets '__event' to the MouseEvent and delegates.
-
mouseEntered(MouseEvent)
- If MOUSE_ENTERED flag is set, sets '__event' to the MouseEvent and delegates.
-
mouseExited(MouseEvent)
- If MOUSE_EXITED flag is set, sets '__event' to the MouseEvent and delegates.
-
mouseMoved(MouseEvent)
- If MOUSE_MOVED flag is set, sets '__event' to the MouseEvent and delegates.
-
mouseUp(MouseEvent)
- If MOUSE_UP flag is set, sets '__event' to the MouseEvent and delegates.
-
nextSelectableView()
- If NEXT_SELECTABLE_VIEW flag is set, delegates.
-
pauseFocus()
- If PAUSE_FOCUS flag is set, delegates.
-
previousSelectableView()
- If PREVIOUS_SELECTABLE_VIEW flag is set, delegates.
-
resumeFocus()
- If RESUME_FOCUS flag is set, delegates.
-
setDelegateFlag(int)
- Sets the delegateFlag (sum of bit flags); e.g., setDelegateFlag(MOUSE + KEY) to delegate all mouseXXX and keyXXX methods.
-
setDelegateFlag(int, boolean)
- Sets/clears individual delegate flag (e.g., setDelegateFlag(MOUSE_DOWN, true) to delegate mouseDown().
-
setIViewDelegate(IViewDelegate)
- Sets IViewDelegate object.
-
startFocus()
- If START_FOCUS flag is set, delegates.
-
stopFocus()
- If STOP_FOCUS flag is set, delegates.
-
subviewDidMove(View)
- If SUBVIEW_DID_MOVE flag is set, sets '__view' to the subview and delegates.
-
subviewDidResize(View)
- If SUBVIEW_DID_RESIZE flag is set, sets '__view' to the subview and delegates.
-
wantsAutoscrollEvents()
- Returns the value of _wantsAutoscrollEvents.
-
wantsMouseEventCoalescing()
- Returns the value of _wantsMouseEventCoalescing.
-
willBecomeSelected()
- If WILL_BECOME_SELECTED flag is set, delegates.
-
willBecomeUnselected()
- If WILL_BECOME_UNSELECTED flag is set, delegates.
iViewDelegate
public IViewDelegate iViewDelegate
- IViewDelegate object. Defaults to IView itself.
delegateFlag
public int delegateFlag
- Defines which methods to be delegated (sum of bit flags).
_mouseDown
public boolean _mouseDown
- Return value of mouseDown method.
_wantsAutoscrollEvents
public boolean _wantsAutoscrollEvents
- Return value of wantsAutoScrollEvents().
_wantsMouseEventCoalescing
public boolean _wantsMouseEventCoalescing
- Return value of wantsMouseEventCoalescing().
_isTransparent
public boolean _isTransparent
- Return value of isTransparent().
_acceptsDrag
public DragDestination _acceptsDrag
- Return value of acceptsDrag().
_cursorForPoint
public int _cursorForPoint
- Return value of cursorForPoint().
_nextSelectableView
public View _nextSelectableView
- Return value of nextSelectableView().
_previousSelectableView
public View _previousSelectableView
- Return value of previousSelectableView().
_canBecomeSelectedView
public boolean _canBecomeSelectedView
- Return value of canBecomeSelectedView().
_hidesSubviewsFromKeyboard
public boolean _hidesSubviewsFromKeyboard
- Return value of hidesSubviewsFromKeyboard().
_getToolTipText
public String _getToolTipText
- Return value of getToolTipText().
__event
public Event __event
- Method parameter for MOUSE_XXX and KEY_XXX.
__g
public Graphics __g
- Method parameter for DRAW_VIEW and SUBVIEWS_DRAWN.
__view
public View __view
- Method parameter for SUBVIEW_XXX.
__x
public int __x
- Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
__y
public int __y
- Method parameter for DID_MOVE_BY, DID_SIZE_BY, CURSOR_FOR_POINT, ACCEPTS_DRAG.
__session
public DragSession __session
- Method parameter for ACCEPTS_DRAG.
__object
public Object __object
- Free variable
MOUSE_DOWN
public static final int MOUSE_DOWN
- flag to delegate mouseDown().
MOUSE_UP
public static final int MOUSE_UP
- flag to delegate mouseUp().
MOUSE_MOVED
public static final int MOUSE_MOVED
- flag to delegate mouseMoved().
MOUSE_ENTERED
public static final int MOUSE_ENTERED
- flag to delegate mouseEntered().
MOUSE_EXITED
public static final int MOUSE_EXITED
- flag to delegate mouseExited().
MOUSE_DRAGGED
public static final int MOUSE_DRAGGED
- flag to delegate mouseDragged().
MOUSE
public static final int MOUSE
- flag to delegate all mouseXXX() methods.
KEY_DOWN
public static final int KEY_DOWN
- flag to delegate keyDown().
KEY_UP
public static final int KEY_UP
- flag to delegate keyUp().
KEY
public static final int KEY
- flag to delegate all KeyXXX() methods.
START_FOCUS
public static final int START_FOCUS
- flag to delegate startFocus().
STOP_FOCUS
public static final int STOP_FOCUS
- flag to delegate stopFocus().
PAUSE_FOCUS
public static final int PAUSE_FOCUS
- flag to delegate pauseFocus().
RESUME_FOCUS
public static final int RESUME_FOCUS
- flag to delegate resumeFocus().
FOCUS
public static final int FOCUS
- flag to delegate all focusXXX().
ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
public static final int ANCESTOR_WAS_ADDED_TO_VIEW_HIERARCHY
- flag to delegate notification after super.ancestorWasAddedToViewHierarchy().
ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
public static final int ANCESTOR_WILL_REMOVE_FROM_VIEW_HIERARCHY
- flag to delegate notification before super.ancestorWillRemoveFromViewHierarchy().
ANCESTOR
public static final int ANCESTOR
- flag to delegate all ANCESTOR_xxx notifications.
SUBVIEW_DID_RESIZE
public static final int SUBVIEW_DID_RESIZE
- flag to delegate subviewDidResize().
SUBVIEW_DID_MOVE
public static final int SUBVIEW_DID_MOVE
- flag to delegate subviewDidMove().
SUBVIEW
public static final int SUBVIEW
- flag to delegate all subviewXXX().
DID_MOVE_BY
public static final int DID_MOVE_BY
- flag to delegate didMoveBy().
DID_SIZE_BY
public static final int DID_SIZE_BY
- flag to delegate didSizeBy().
DRAW_VIEW
public static final int DRAW_VIEW
- flag to delegate drawView().
SUBVIEWS_DRAWN
public static final int SUBVIEWS_DRAWN
- flag to delegate notification after drawSubviews().
ACCEPTS_DRAG
public static final int ACCEPTS_DRAG
- flag to delegate acceptsDrag().
CURSOR_FOR_POINT
public static final int CURSOR_FOR_POINT
- flag to delegate cursorForPoint().
WILL_BECOME_SELECTED
public static final int WILL_BECOME_SELECTED
- flag to delegate willBecomeSelected().
WILL_BECOME_UNSELECTED
public static final int WILL_BECOME_UNSELECTED
- flag to delegate willBecomeUnselected().
NEXT_SELECTABLE_VIEW
public static final int NEXT_SELECTABLE_VIEW
- flag to delegate nextSelectableView().
PREVIOUS_SELECTABLE_VIEW
public static final int PREVIOUS_SELECTABLE_VIEW
- flag to delegate previousSelectableView().
GET_TOOL_TIP_TEXT
public static final int GET_TOOL_TIP_TEXT
- flag to delegate getToolTipText().
WANTS_AUTOSCROLL_EVENTS
public static final int WANTS_AUTOSCROLL_EVENTS
- flag to delegate wantsAutoscrollEvents()
WANTS_MOUSE_EVENT_COALESCING
public static final int WANTS_MOUSE_EVENT_COALESCING
- flag to delegate wantsMouseEventColalescing().
IS_TRANSPARENT
public static final int IS_TRANSPARENT
- flag to delegate wantsMouseEventColalescing().
CAN_BECOME_SELECTED_VIEW
public static final int CAN_BECOME_SELECTED_VIEW
- flag to delegate canBecomeSelectedView().
HIDES_SUBVIEWS_FROM_KEYBOARD
public static final int HIDES_SUBVIEWS_FROM_KEYBOARD
- flag to delegate hidesSubviewsFromKeyboard().
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.
IView
public IView(Rect r)
- Constructs an IView with bounds r and sets itself as the delegate object.
IView
public IView()
- Constructs an IView with bounds (0, 0, 0, 0) and sets itself as the delegate object.
setIViewDelegate
public void setIViewDelegate(IViewDelegate delegate)
- Sets IViewDelegate object.
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.
setDelegateFlag
public void setDelegateFlag(int delegateFlag,
boolean enable)
- Sets/clears individual delegate flag (e.g., setDelegateFlag(MOUSE_DOWN, true) to delegate mouseDown().
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
mouseMoved
public void mouseMoved(MouseEvent event)
- If MOUSE_MOVED flag is set, sets '__event' to the MouseEvent and delegates.
- Overrides:
- mouseMoved in class View
mouseUp
public void mouseUp(MouseEvent event)
- If MOUSE_UP flag is set, sets '__event' to the MouseEvent and delegates.
- Overrides:
- mouseUp in class View
mouseDragged
public void mouseDragged(MouseEvent event)
- If MOUSE_DRAGGED flag is set, sets '__event' to the MouseEvent and delegates.
- Overrides:
- mouseDragged in class View
mouseEntered
public void mouseEntered(MouseEvent event)
- If MOUSE_ENTERED flag is set, sets '__event' to the MouseEvent and delegates.
- Overrides:
- mouseEntered in class View
mouseExited
public void mouseExited(MouseEvent event)
- If MOUSE_EXITED flag is set, sets '__event' to the MouseEvent and delegates.
- Overrides:
- mouseExited in class View
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
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
startFocus
public void startFocus()
- If START_FOCUS flag is set, delegates.
- Overrides:
- startFocus in class View
stopFocus
public void stopFocus()
- If STOP_FOCUS flag is set, delegates.
- Overrides:
- stopFocus in class View
pauseFocus
public void pauseFocus()
- If PAUSE_FOCUS flag is set, delegates.
- Overrides:
- pauseFocus in class View
resumeFocus
public void resumeFocus()
- If RESUME_FOCUS flag is set, delegates.
- Overrides:
- resumeFocus in class View
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
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
drawView
public void drawView(Graphics g)
- If DRAW_VIEW flag is set, sets '__g' to the Graphics and delegates.
- Overrides:
- drawView in class View
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
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
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
wantsMouseEventCoalescing
public boolean wantsMouseEventCoalescing()
- Returns the value of _wantsMouseEventCoalescing.
- Overrides:
- wantsMouseEventCoalescing in class View
wantsAutoscrollEvents
public boolean wantsAutoscrollEvents()
- Returns the value of _wantsAutoscrollEvents.
- Overrides:
- wantsAutoscrollEvents in class View
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
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
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
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
willBecomeSelected
public void willBecomeSelected()
- If WILL_BECOME_SELECTED flag is set, delegates.
- Overrides:
- willBecomeSelected in class View
willBecomeUnselected
public void willBecomeUnselected()
- If WILL_BECOME_UNSELECTED flag is set, delegates.
- Overrides:
- willBecomeUnselected in class View
isTransparent
public boolean isTransparent()
- Returns the value of _isTransparent.
- Overrides:
- isTransparent in class View
canBecomeSelectedView
public boolean canBecomeSelectedView()
- Returns the value of _canBecomeSelectedView.
- Overrides:
- canBecomeSelectedView in class View
hidesSubviewsFromKeyboard
public boolean hidesSubviewsFromKeyboard()
- Returns the value of _hidesSubviewsFromKeyboard.
- Overrides:
- hidesSubviewsFromKeyboard in class View
nextSelectableView
public View nextSelectableView()
- If NEXT_SELECTABLE_VIEW flag is set, delegates. Always returns the value of _nextSelectedView.
- Overrides:
- nextSelectableView in class View
previousSelectableView
public View previousSelectableView()
- If PREVIOUS_SELECTABLE_VIEW flag is set, delegates. Always returns the value of _previousSelectedView.
- Overrides:
- previousSelectableView in class View
getToolTipText
public String getToolTipText(MouseEvent event)
- If GET_TOOL_TIP_TEXT flag is set, delegates. Returns the value of _getToolTipText.
delegate
public void delegate(int flag,
IView iView)
- Dummy self-delegation. This does nothing.
All Packages Class Hierarchy This Package Previous Next Index