org.lobobrowser.html.renderer
Interface BoundableRenderable

All Superinterfaces:
Renderable
All Known Subinterfaces:
RCollection, RElement
All Known Implementing Classes:
RBlock, RBlockViewport, RImgControl, RRelative

public interface BoundableRenderable
extends Renderable

A renderer node with well-defined bounds. Most renderer nodes implement this interface.


Field Summary
 
Fields inherited from interface org.lobobrowser.html.renderer.Renderable
EMPTY_ARRAY
 
Method Summary
 boolean extractSelectionText(java.lang.StringBuffer buffer, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
           
 java.awt.Rectangle getBounds()
           
 java.awt.Point getGUIPoint(int clientX, int clientY)
           
 int getHeight()
           
 RenderableSpot getLowestRenderableSpot(int x, int y)
           
 ModelNode getModelNode()
           
 int getOrdinal()
           
 java.awt.Point getOrigin()
           
 RCollection getOriginalOrCurrentParent()
          Returns getOriginalParent() if not null.
 RCollection getOriginalParent()
          Gets the parent set with setOriginalParent(RCollection).
 java.awt.Point getOriginRelativeTo(RCollection ancestor)
           
 RCollection getParent()
          Gets the parent where the renderable is rendered.
 java.awt.Point getRenderablePoint(int guiX, int guiY)
           
 java.awt.Dimension getSize()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 int getZIndex()
           
 void invalidateLayoutUpTree()
           
 boolean isContainedByNode()
          Returns true if the renderable is fully contained by its modelNode, but said modelNode does not fully contain an ancestor renderable.
 boolean onDoubleClick(java.awt.event.MouseEvent event, int x, int y)
           
 boolean onMouseClick(java.awt.event.MouseEvent event, int x, int y)
           
 boolean onMouseDisarmed(java.awt.event.MouseEvent event)
           
 void onMouseMoved(java.awt.event.MouseEvent event, int x, int y, boolean triggerEvent, ModelNode limit)
           
 void onMouseOut(java.awt.event.MouseEvent event, int x, int y, ModelNode limit)
           
 boolean onMousePressed(java.awt.event.MouseEvent event, int x, int y)
          Returns false if the event is consumed.
 boolean onMouseReleased(java.awt.event.MouseEvent event, int x, int y)
           
 boolean onRightClick(java.awt.event.MouseEvent event, int x, int y)
           
 boolean paintSelection(java.awt.Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
          Asks the Renderable to paint the selection between two points.
 void paintTranslated(java.awt.Graphics g)
          Paints by either creating a new clipped graphics context corresponding to the bounds of the Renderable, or by translating the origin.
 void relayout()
           
 void repaint()
           
 void repaint(int x, int y, int width, int height)
           
 void setBounds(int x, int y, int with, int height)
           
 void setHeight(int height)
           
 void setOrdinal(int ordinal)
           
 void setOrigin(int x, int y)
           
 void setOriginalParent(RCollection origParent)
           
 void setParent(RCollection parent)
           
 void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
 
Methods inherited from interface org.lobobrowser.html.renderer.Renderable
paint
 

Method Detail

getModelNode

ModelNode getModelNode()
Specified by:
getModelNode in interface Renderable

getBounds

java.awt.Rectangle getBounds()

getSize

java.awt.Dimension getSize()

getOrigin

java.awt.Point getOrigin()

getOriginRelativeTo

java.awt.Point getOriginRelativeTo(RCollection ancestor)

getParent

RCollection getParent()
Gets the parent where the renderable is rendered.


setOriginalParent

void setOriginalParent(RCollection origParent)

getOriginalParent

RCollection getOriginalParent()
Gets the parent set with setOriginalParent(RCollection). It represents the parent where the renderable would have been originally rendered according to the DOM. This will be non-null only if getParent() is not the parent where this renderable would have been originally rendered.


getOriginalOrCurrentParent

RCollection getOriginalOrCurrentParent()
Returns getOriginalParent() if not null. Otherwise it returns getParent().


setBounds

void setBounds(int x,
               int y,
               int with,
               int height)

setOrigin

void setOrigin(int x,
               int y)

setX

void setX(int x)

setY

void setY(int y)

getX

int getX()

getY

int getY()

getHeight

int getHeight()

getWidth

int getWidth()

setHeight

void setHeight(int height)

setWidth

void setWidth(int width)

getLowestRenderableSpot

RenderableSpot getLowestRenderableSpot(int x,
                                       int y)

getRenderablePoint

java.awt.Point getRenderablePoint(int guiX,
                                  int guiY)

repaint

void repaint()

onMousePressed

boolean onMousePressed(java.awt.event.MouseEvent event,
                       int x,
                       int y)
Returns false if the event is consumed. True to propagate further.


onMouseReleased

boolean onMouseReleased(java.awt.event.MouseEvent event,
                        int x,
                        int y)

onMouseDisarmed

boolean onMouseDisarmed(java.awt.event.MouseEvent event)

onMouseClick

boolean onMouseClick(java.awt.event.MouseEvent event,
                     int x,
                     int y)

onDoubleClick

boolean onDoubleClick(java.awt.event.MouseEvent event,
                      int x,
                      int y)

onRightClick

boolean onRightClick(java.awt.event.MouseEvent event,
                     int x,
                     int y)

onMouseMoved

void onMouseMoved(java.awt.event.MouseEvent event,
                  int x,
                  int y,
                  boolean triggerEvent,
                  ModelNode limit)

onMouseOut

void onMouseOut(java.awt.event.MouseEvent event,
                int x,
                int y,
                ModelNode limit)

isContainedByNode

boolean isContainedByNode()
Returns true if the renderable is fully contained by its modelNode, but said modelNode does not fully contain an ancestor renderable.


paintSelection

boolean paintSelection(java.awt.Graphics g,
                       boolean inSelection,
                       RenderableSpot startPoint,
                       RenderableSpot endPoint)
Asks the Renderable to paint the selection between two points. Nothing will be done if the points are outside the Renderable.

Parameters:
g -
inSelection -
startPoint -
endPoint -
Returns:
True iff it's in selection when finished painting.

paintTranslated

void paintTranslated(java.awt.Graphics g)
Paints by either creating a new clipped graphics context corresponding to the bounds of the Renderable, or by translating the origin.

Parameters:
g - Parent's Graphics context.

extractSelectionText

boolean extractSelectionText(java.lang.StringBuffer buffer,
                             boolean inSelection,
                             RenderableSpot startPoint,
                             RenderableSpot endPoint)

repaint

void repaint(int x,
             int y,
             int width,
             int height)

relayout

void relayout()

setParent

void setParent(RCollection parent)

getGUIPoint

java.awt.Point getGUIPoint(int clientX,
                           int clientY)

getOrdinal

int getOrdinal()

setOrdinal

void setOrdinal(int ordinal)

getZIndex

int getZIndex()

invalidateLayoutUpTree

void invalidateLayoutUpTree()


SourceForge.net LogoCopyright © 2005, 2006, 2007 The Lobo Project. All Rights Reserved.
[Cobra Project Home]