Package org.lobobrowser.html.renderer
Interface BoundableRenderable
- All Superinterfaces:
Renderable
- All Known Subinterfaces:
RCollection
,RElement
- All Known Implementing Classes:
RBlock
,RBlockViewport
,RImgControl
,RRelative
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
Modifier and TypeMethodDescriptionboolean
extractSelectionText
(StringBuffer buffer, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint) getGUIPoint
(int clientX, int clientY) int
getLowestRenderableSpot
(int x, int y) int
ReturnsgetOriginalParent()
if not null.Gets the parent set withsetOriginalParent(RCollection)
.getOriginRelativeTo
(RCollection ancestor) Gets the parent where the renderable is rendered.getRenderablePoint
(int guiX, int guiY) getSize()
int
getWidth()
int
getX()
int
getY()
int
void
boolean
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
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 Details
-
getModelNode
ModelNode getModelNode()- Specified by:
getModelNode
in interfaceRenderable
-
getBounds
Rectangle getBounds() -
getSize
Dimension getSize() -
getOrigin
Point getOrigin() -
getOriginRelativeTo
-
getParent
RCollection getParent()Gets the parent where the renderable is rendered. -
setOriginalParent
-
getOriginalParent
RCollection getOriginalParent()Gets the parent set withsetOriginalParent(RCollection)
. It represents the parent where the renderable would have been originally rendered according to the DOM. This will be non-null only ifgetParent()
is not the parent where this renderable would have been originally rendered. -
getOriginalOrCurrentParent
RCollection getOriginalOrCurrentParent()ReturnsgetOriginalParent()
if not null. Otherwise it returnsgetParent()
. -
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
-
getRenderablePoint
-
repaint
void repaint() -
onMousePressed
Returns false if the event is consumed. True to propagate further. -
onMouseReleased
-
onMouseDisarmed
-
onMouseClick
-
onDoubleClick
-
onRightClick
-
onMouseMoved
-
onMouseOut
-
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(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
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(StringBuffer buffer, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint) -
repaint
void repaint(int x, int y, int width, int height) -
relayout
void relayout() -
setParent
-
getGUIPoint
-
getOrdinal
int getOrdinal() -
setOrdinal
void setOrdinal(int ordinal) -
getZIndex
int getZIndex() -
invalidateLayoutUpTree
void invalidateLayoutUpTree()
-