org.lobobrowser.html.renderer

Interface BoundableRenderable

All Superinterfaces:
Renderable
Known Subinterfaces:
RCollection, RElement
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.

Fields inherited from interface org.lobobrowser.html.renderer.Renderable

EMPTY_ARRAY

Method Summary

boolean
extractSelectionText(StringBuffer buffer, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
Rectangle
getBounds()
java.awt.Point
getGUIPoint(int clientX, int clientY)
int
getHeight()
RenderableSpot
getLowestRenderableSpot(int x, int y)
ModelNode
getModelNode()
int
getOrdinal()
Point
getOrigin()
Point
getOriginRelativeTo(RCollection ancestor)
RCollection
getOriginalOrCurrentParent()
Returns getOriginalParent() if not null.
RCollection
getOriginalParent()
Gets the parent set with setOriginalParent(RCollection).
RCollection
getParent()
Gets the parent where the renderable is rendered.
Point
getRenderablePoint(int guiX, int guiY)
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(MouseEvent event, int x, int y)
boolean
onMouseClick(MouseEvent event, int x, int y)
boolean
onMouseDisarmed(MouseEvent event)
void
onMouseMoved(MouseEvent event, int x, int y, boolean triggerEvent, ModelNode limit)
void
onMouseOut(MouseEvent event, int x, int y, ModelNode limit)
boolean
onMousePressed(MouseEvent event, int x, int y)
Returns false if the event is consumed.
boolean
onMouseReleased(MouseEvent event, int x, int y)
boolean
onRightClick(MouseEvent event, int x, int y)
boolean
paintSelection(Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
Asks the Renderable to paint the selection between two points.
void
paintTranslated(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

getModelNode, paint

Method Details

extractSelectionText

public boolean extractSelectionText(StringBuffer buffer,
                                    boolean inSelection,
                                    RenderableSpot startPoint,
                                    RenderableSpot endPoint)

getBounds

public Rectangle getBounds()

getGUIPoint

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

getHeight

public int getHeight()

getLowestRenderableSpot

public RenderableSpot getLowestRenderableSpot(int x,
                                              int y)

getModelNode

public ModelNode getModelNode()
Specified by:
getModelNode in interface Renderable

getOrdinal

public int getOrdinal()

getOrigin

public Point getOrigin()

getOriginRelativeTo

public Point getOriginRelativeTo(RCollection ancestor)

getOriginalOrCurrentParent

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

getOriginalParent

public 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.

getParent

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

getRenderablePoint

public Point getRenderablePoint(int guiX,
                                int guiY)

getSize

public Dimension getSize()

getWidth

public int getWidth()

getX

public int getX()

getY

public int getY()

getZIndex

public int getZIndex()

invalidateLayoutUpTree

public void invalidateLayoutUpTree()

isContainedByNode

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

onDoubleClick

public boolean onDoubleClick(MouseEvent event,
                             int x,
                             int y)

onMouseClick

public boolean onMouseClick(MouseEvent event,
                            int x,
                            int y)

onMouseDisarmed

public boolean onMouseDisarmed(MouseEvent event)

onMouseMoved

public void onMouseMoved(MouseEvent event,
                         int x,
                         int y,
                         boolean triggerEvent,
                         ModelNode limit)

onMouseOut

public void onMouseOut(MouseEvent event,
                       int x,
                       int y,
                       ModelNode limit)

onMousePressed

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

onMouseReleased

public boolean onMouseReleased(MouseEvent event,
                               int x,
                               int y)

onRightClick

public boolean onRightClick(MouseEvent event,
                            int x,
                            int y)

paintSelection

public boolean paintSelection(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

public void paintTranslated(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.

relayout

public void relayout()

repaint

public void repaint()

repaint

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

setBounds

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

setHeight

public void setHeight(int height)

setOrdinal

public void setOrdinal(int ordinal)

setOrigin

public void setOrigin(int x,
                      int y)

setOriginalParent

public void setOriginalParent(RCollection origParent)

setParent

public void setParent(RCollection parent)

setWidth

public void setWidth(int width)

setX

public void setX(int x)

setY

public void setY(int y)