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.
  • Method Details

    • getModelNode

      ModelNode getModelNode()
      Specified by:
      getModelNode in interface Renderable
    • getBounds

      Rectangle getBounds()
    • getSize

      Dimension getSize()
    • getOrigin

      Point getOrigin()
    • getOriginRelativeTo

      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

      Point getRenderablePoint(int guiX, int guiY)
    • repaint

      void repaint()
    • onMousePressed

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

      boolean onMouseReleased(MouseEvent event, int x, int y)
    • onMouseDisarmed

      boolean onMouseDisarmed(MouseEvent event)
    • onMouseClick

      boolean onMouseClick(MouseEvent event, int x, int y)
    • onDoubleClick

      boolean onDoubleClick(MouseEvent event, int x, int y)
    • onRightClick

      boolean onRightClick(MouseEvent event, int x, int y)
    • onMouseMoved

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

      void onMouseOut(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(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(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(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

      Point getGUIPoint(int clientX, int clientY)
    • getOrdinal

      int getOrdinal()
    • setOrdinal

      void setOrdinal(int ordinal)
    • getZIndex

      int getZIndex()
    • invalidateLayoutUpTree

      void invalidateLayoutUpTree()