A renderer node with well-defined bounds. Most renderer nodes
implement this interface.
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)
getOrdinal
public int getOrdinal()
getOrigin
public Point getOrigin()
getOriginRelativeTo
public Point getOriginRelativeTo(RCollection ancestor)
getOriginalOrCurrentParent
public RCollection getOriginalOrCurrentParent()
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()
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.
g
- inSelection
- startPoint
- endPoint
-
- 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.
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)
setWidth
public void setWidth(int width)
setX
public void setX(int x)
setY
public void setY(int y)