fi.hut.tml.xsmiles.gui.components.awt
Class AWTFocusManager

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.awt.AWTFocusManager
All Implemented Interfaces:
XFocusManager
Direct Known Subclasses:
HaviFocusManager, SwingFocusManager

public class AWTFocusManager
extends java.lang.Object
implements XFocusManager

This is the base class that is extended by FocusPointProviders

Author:
Pablo Cesar, Mikko Honkala

Field Summary
 java.awt.Container contentArea
           
 FocusPoint contentFocus
           
 FocusPointsProvider contentprovider
           
 FocusPoint currentFocus
           
 FocusComponent focusComponent
           
 FocusPoint[] fpList
           
 FocusPoint guiFocus
           
 FocusPointsProvider guiprovider
           
 java.awt.Container rootContainer
           
 java.awt.Container scrollContainer
           
 FocusPoint tmpFocus
           
 
Fields inherited from interface fi.hut.tml.xsmiles.gui.components.XFocusManager
DOCUMENT_FOCUS_PROVIDER, DOWN_FOCUS_POINT, LEFT_FOCUS_POINT, NEXT_FOCUS_POINT, PREVIOUS_FOCUS_POINT, RIGHT_FOCUS_POINT, UP_FOCUS_POINT, WIDGETS_FOCUS_PROVIDER
 
Constructor Summary
AWTFocusManager()
           
 
Method Summary
 void addContentArea(java.awt.Container cont)
           
 void addProvider(FocusPointsProvider fp)
           
 void addRootContainer(java.awt.Container cont)
           
protected  FocusPoint applyAlgorithm(int direction)
           
protected  int calculateMidX(FocusPoint fp)
           
protected  int calculateMidY(FocusPoint fp)
           
 FocusPoint calculateMin(FocusPoint origin, int direction, FocusPoint fp1, FocusPoint fp2)
           
 void changeFocus(int direction)
           
 void cleanFocusPoint(FocusPoint fp)
           
 boolean controlHaviScrollPage(FocusPoint fp)
           
 void drawFocusPoint(FocusPoint fp)
           
 java.awt.Point getBrowserViewLocation(java.awt.Component comp)
           
 FocusPoint getCurrentFocusPoint()
           
 java.awt.Rectangle getCurrentFocusRectangle()
           
 java.awt.Point getCurrentViewLocation()
           
 FocusComponent getFocusComponent()
           
 int getIndexOfComponent(java.awt.Container cont, java.awt.Component comp)
           
 java.awt.Container getScrollContainer(java.awt.Container cont)
           
 java.awt.Point getScrollPosition(java.awt.Component component)
           
 boolean isScrollPane(java.awt.Container cont)
           
 void setFirstFocusPoint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentFocus

public FocusPoint currentFocus

guiFocus

public FocusPoint guiFocus

contentFocus

public FocusPoint contentFocus

tmpFocus

public FocusPoint tmpFocus

fpList

public FocusPoint[] fpList

guiprovider

public FocusPointsProvider guiprovider

contentprovider

public FocusPointsProvider contentprovider

focusComponent

public FocusComponent focusComponent

contentArea

public java.awt.Container contentArea

rootContainer

public java.awt.Container rootContainer

scrollContainer

public java.awt.Container scrollContainer
Constructor Detail

AWTFocusManager

public AWTFocusManager()
Method Detail

setFirstFocusPoint

public void setFirstFocusPoint()
Specified by:
setFirstFocusPoint in interface XFocusManager

addProvider

public void addProvider(FocusPointsProvider fp)
Specified by:
addProvider in interface XFocusManager

getFocusComponent

public FocusComponent getFocusComponent()

changeFocus

public void changeFocus(int direction)
Specified by:
changeFocus in interface XFocusManager

calculateMin

public FocusPoint calculateMin(FocusPoint origin,
                               int direction,
                               FocusPoint fp1,
                               FocusPoint fp2)

isScrollPane

public boolean isScrollPane(java.awt.Container cont)

getScrollContainer

public java.awt.Container getScrollContainer(java.awt.Container cont)

getScrollPosition

public java.awt.Point getScrollPosition(java.awt.Component component)

getCurrentViewLocation

public java.awt.Point getCurrentViewLocation()

getBrowserViewLocation

public java.awt.Point getBrowserViewLocation(java.awt.Component comp)

applyAlgorithm

protected FocusPoint applyAlgorithm(int direction)

calculateMidX

protected int calculateMidX(FocusPoint fp)

calculateMidY

protected int calculateMidY(FocusPoint fp)

addContentArea

public void addContentArea(java.awt.Container cont)
Specified by:
addContentArea in interface XFocusManager

addRootContainer

public void addRootContainer(java.awt.Container cont)
Specified by:
addRootContainer in interface XFocusManager

cleanFocusPoint

public void cleanFocusPoint(FocusPoint fp)
Specified by:
cleanFocusPoint in interface XFocusManager

controlHaviScrollPage

public boolean controlHaviScrollPage(FocusPoint fp)

drawFocusPoint

public void drawFocusPoint(FocusPoint fp)
Specified by:
drawFocusPoint in interface XFocusManager

getIndexOfComponent

public int getIndexOfComponent(java.awt.Container cont,
                               java.awt.Component comp)

getCurrentFocusPoint

public FocusPoint getCurrentFocusPoint()
Specified by:
getCurrentFocusPoint in interface XFocusManager

getCurrentFocusRectangle

public java.awt.Rectangle getCurrentFocusRectangle()
Specified by:
getCurrentFocusRectangle in interface XFocusManager


X-Smiles 1.2