ice.pilots.html4
Class TheView

java.lang.Object
  extended byice.pilots.html4.TheView
All Implemented Interfaces:
AbstractView, ParameterConstants, ViewCSS

public class TheView
extends Object
implements ViewCSS, ParameterConstants

This class provides mapping from DOM to Layout information. It can be used to retrieve position of an element on the screen, its bounding box, runtime style etc.


Field Summary
 
Fields inherited from interface ice.pilots.html4.ParameterConstants
IMPORTANT_PRIORITY, NORMAL_PRIORITY, PARAMETER_ALL, PARAMETER_BACKGROUND_COLOR, PARAMETER_HEIGHT, PARAMETER_LEFT, PARAMETER_MARGIN, PARAMETER_MARGIN_BOTTOM, PARAMETER_MARGIN_LEFT, PARAMETER_MARGIN_RIGHT, PARAMETER_MARGIN_TOP, PARAMETER_TOP, PARAMETER_WIDTH
 
Method Summary
 void findBoundingBox(DNode e, Rectangle r)
          Find bounding box of a given DOM Node in the layout representation
 void findPosition(DNode e, Point p)
          Find position of a given DOM Node in the layout representation
 CSSStyleDeclaration getComputedStyle(Element elt, String pseudoElt)
          This method is used to get the computed style as it is defined in .
 DocPane getDocPane()
          Returns the DocPane which normally is the physical window into which this view is painted.
 DocumentView getDocument()
          The source DocumentView of which this is an AbstractView.
 FocusManager getFocusManager()
           
 int getHeight()
           
 ObjectPainter getNodePainter(DNode node)
          Get gui element that represent the DOM node or null if the element is rendered directly by layout engine
 ObjectPainter getNodeScroller(DNode node)
          Retrieve the ScrollClient of a given DNode.
 ScrollBox getScroller(DNode node)
          Retrieve the ScrollBox container of a given DNode.
static Object getToolkitComponent(DNode node)
          Get gui element that represent the DOM node or null if the element is rendered directly by layout engine or lightweight pilot
 int getWidth()
           
 int getZoom()
          Retrieves zoom for this particular view.
 void reqReflow()
          Requests the layout to be re-calculated.
 void setZoom(int z)
          Applies zoom for this particular view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reqReflow

public void reqReflow()
Requests the layout to be re-calculated. This call will post the request to the toolkit-event thread in the system, thus the re-calculation will take place on this thread. For re-painting the current layout as well as


getDocument

public DocumentView getDocument()
Description copied from interface: AbstractView
The source DocumentView of which this is an AbstractView.

Specified by:
getDocument in interface AbstractView

getDocPane

public DocPane getDocPane()
Returns the DocPane which normally is the physical window into which this view is painted.


getFocusManager

public FocusManager getFocusManager()

getWidth

public int getWidth()

getHeight

public int getHeight()

getComputedStyle

public CSSStyleDeclaration getComputedStyle(Element elt,
                                            String pseudoElt)
This method is used to get the computed style as it is defined in .

Specified by:
getComputedStyle in interface ViewCSS
Parameters:
elt - The element whose style is to be computed. This parameter cannot be null.
pseudoElt - The pseudo-element or null if none.
Returns:
The computed style. The CSSStyleDeclaration is read-only and contains only absolute values.

setZoom

public void setZoom(int z)
Applies zoom for this particular view. @see Viewport.getZoom()


getZoom

public int getZoom()
Retrieves zoom for this particular view. @see Viewport.setZoom()


findBoundingBox

public void findBoundingBox(DNode e,
                            Rectangle r)
Find bounding box of a given DOM Node in the layout representation


getNodePainter

public ObjectPainter getNodePainter(DNode node)
Get gui element that represent the DOM node or null if the element is rendered directly by layout engine


getToolkitComponent

public static Object getToolkitComponent(DNode node)
Get gui element that represent the DOM node or null if the element is rendered directly by layout engine or lightweight pilot


getNodeScroller

public ObjectPainter getNodeScroller(DNode node)
Retrieve the ScrollClient of a given DNode. This methods returns the ObjectBox client of the first ScrollBox found in the parent hierarchy of the given node, null if no ScrollBox parents are found.

Parameters:
node - A DNode
Returns:
ObjectBox scroll client of the given node, null if no such box exists

getScroller

public ScrollBox getScroller(DNode node)
Retrieve the ScrollBox container of a given DNode. If the node is represented by a ScrollBox in the CSSBox hierarchy, this method will return a reference to the ScrollBox, null otherwise. This is a convenience method allowing the DElement to discover it's CSSBox ScrollBox without requiring a reference to CSSLayout.

Parameters:
node - The DNode in question
Returns:
ScrollBox containing the given node, null if no such box exists
Since:
6.1

findPosition

public void findPosition(DNode e,
                         Point p)
Find position of a given DOM Node in the layout representation