org.lobobrowser.html.renderer
public class RRelative extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected RenderableContainer |
container |
int |
height |
protected boolean |
layoutUpTreeCanBeInvalidated
Starts as true because ancestors could be invalidated.
|
protected static java.util.logging.Logger |
logger |
protected ModelNode |
modelNode |
protected RCollection |
originalParent
Parent for invalidation.
|
protected RCollection |
parent
Parent for graphics coordinates.
|
protected static java.awt.Color |
SELECTION_COLOR |
protected static java.awt.Color |
SELECTION_XOR |
int |
width |
int |
x |
int |
y |
EMPTY_ARRAY
Constructor and Description |
---|
RRelative(RenderableContainer container,
ModelNode modelNode,
RElement child,
int xoffset,
int yoffset) |
Modifier and Type | Method and Description |
---|---|
void |
assignDimension() |
void |
blur() |
boolean |
contains(int x,
int y) |
boolean |
extractSelectionText(java.lang.StringBuffer buffer,
boolean inSelection,
RenderableSpot startPoint,
RenderableSpot endPoint) |
void |
focus() |
java.awt.Color |
getBlockBackgroundColor() |
java.awt.Rectangle |
getBounds() |
RElement |
getElement() |
FloatingInfo |
getExportableFloatingInfo() |
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
BoundableRenderable.getOriginalParent() if not null. |
RCollection |
getOriginalParent()
This is the parent based on the original element hierarchy.
|
java.awt.Point |
getOriginRelativeTo(RCollection ancestor) |
RCollection |
getParent()
Gets the parent where the renderable is rendered.
|
BoundableRenderable |
getRenderable(int x,
int y) |
java.awt.Point |
getRenderablePoint(int guiX,
int guiY) |
java.util.Iterator |
getRenderables()
Gets the collection of
Renderable children. |
java.awt.Dimension |
getSize() |
int |
getWidth() |
int |
getX() |
int |
getXOffset() |
int |
getY() |
int |
getYOffset() |
int |
getZIndex() |
void |
invalidateLayoutDeep()
Invalidates layout in all descendents.
|
protected void |
invalidateLayoutLocal() |
void |
invalidateLayoutUpTree()
Invalidates this Renderable and its parent (i.e.
|
boolean |
isContainedByNode()
Returns true if the renderable is fully contained by its modelNode, but
said modelNode does not fully contain an ancestor renderable.
|
protected boolean |
isValid() |
void |
markLayoutValid() |
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) |
void |
paint(java.awt.Graphics g) |
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()
Invalidates the current Renderable (which invalidates its ancestors)
and then requests the top level GUI container to do the layout and repaint.
|
void |
relayoutIfValid() |
void |
repaint() |
void |
repaint(int x,
int y,
int width,
int height) |
void |
setBounds(int x,
int y,
int width,
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) |
protected java.awt.Point |
translateDescendentPoint(BoundableRenderable descendent,
int x,
int y) |
void |
updateWidgetBounds(int guiX,
int guiY)
Updates bounds of all descendent's GUI components,
based on root bounds.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds, getGUIPoint, getHeight, getModelNode, getOrdinal, getOrigin, getOriginalOrCurrentParent, getOriginalParent, getOriginRelativeTo, getParent, getRenderablePoint, getSize, getWidth, getX, getY, getZIndex, invalidateLayoutUpTree, paintTranslated, relayout, repaint, repaint, setBounds, setHeight, setOrdinal, setOrigin, setOriginalParent, setParent, setWidth, setX, setY
protected static final java.util.logging.Logger logger
protected static final java.awt.Color SELECTION_COLOR
protected static final java.awt.Color SELECTION_XOR
protected final RenderableContainer container
protected final ModelNode modelNode
public int x
public int y
public int width
public int height
protected boolean layoutUpTreeCanBeInvalidated
protected RCollection parent
protected RCollection originalParent
public RRelative(RenderableContainer container, ModelNode modelNode, RElement child, int xoffset, int yoffset)
public void assignDimension()
public FloatingInfo getExportableFloatingInfo()
public RElement getElement()
public int getXOffset()
public int getYOffset()
public java.util.Iterator getRenderables()
RCollection
Renderable
children.protected void invalidateLayoutLocal()
public RenderableSpot getLowestRenderableSpot(int x, int y)
public boolean isContainedByNode()
BoundableRenderable
public boolean onDoubleClick(java.awt.event.MouseEvent event, int x, int y)
public boolean onMouseClick(java.awt.event.MouseEvent event, int x, int y)
public boolean onMouseDisarmed(java.awt.event.MouseEvent event)
public boolean onMousePressed(java.awt.event.MouseEvent event, int x, int y)
BoundableRenderable
public boolean onMouseReleased(java.awt.event.MouseEvent event, int x, int y)
public void paint(java.awt.Graphics g)
public void focus()
focus
in interface RCollection
public void blur()
blur
in interface RCollection
public void updateWidgetBounds(int guiX, int guiY)
updateWidgetBounds
in interface RCollection
public boolean paintSelection(java.awt.Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
BoundableRenderable
paintSelection
in interface BoundableRenderable
public boolean extractSelectionText(java.lang.StringBuffer buffer, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
extractSelectionText
in interface BoundableRenderable
public void invalidateLayoutDeep()
RCollection
invalidateLayoutDeep
in interface RCollection
public void onMouseMoved(java.awt.event.MouseEvent event, int x, int y, boolean triggerEvent, ModelNode limit)
onMouseMoved
in interface BoundableRenderable
public void onMouseOut(java.awt.event.MouseEvent event, int x, int y, ModelNode limit)
onMouseOut
in interface BoundableRenderable
public BoundableRenderable getRenderable(int x, int y)
public boolean onRightClick(java.awt.event.MouseEvent event, int x, int y)
onRightClick
in interface BoundableRenderable
public void markLayoutValid()
public java.awt.Point getGUIPoint(int clientX, int clientY)
getGUIPoint
in interface BoundableRenderable
public java.awt.Point getRenderablePoint(int guiX, int guiY)
getRenderablePoint
in interface BoundableRenderable
public int getHeight()
getHeight
in interface BoundableRenderable
public int getWidth()
getWidth
in interface BoundableRenderable
public void setWidth(int width)
setWidth
in interface BoundableRenderable
public int getX()
getX
in interface BoundableRenderable
public int getY()
getY
in interface BoundableRenderable
public boolean contains(int x, int y)
public java.awt.Rectangle getBounds()
getBounds
in interface BoundableRenderable
public java.awt.Dimension getSize()
getSize
in interface BoundableRenderable
public ModelNode getModelNode()
getModelNode
in interface BoundableRenderable
getModelNode
in interface Renderable
public void setBounds(int x, int y, int width, int height)
setBounds
in interface BoundableRenderable
public void setX(int x)
setX
in interface BoundableRenderable
public void setY(int y)
setY
in interface BoundableRenderable
public void setHeight(int height)
setHeight
in interface BoundableRenderable
public void setOrigin(int x, int y)
setOrigin
in interface BoundableRenderable
public final void invalidateLayoutUpTree()
invalidateLayoutUpTree
in interface BoundableRenderable
protected boolean isValid()
public void relayout()
relayout
in interface BoundableRenderable
public void relayoutIfValid()
public void setParent(RCollection parent)
setParent
in interface BoundableRenderable
public RCollection getParent()
BoundableRenderable
getParent
in interface BoundableRenderable
public void setOriginalParent(RCollection origParent)
setOriginalParent
in interface BoundableRenderable
public RCollection getOriginalParent()
getOriginalParent
in interface BoundableRenderable
public RCollection getOriginalOrCurrentParent()
BoundableRenderable
BoundableRenderable.getOriginalParent()
if not null. Otherwise
it returns BoundableRenderable.getParent()
.getOriginalOrCurrentParent
in interface BoundableRenderable
public void repaint(int x, int y, int width, int height)
repaint
in interface BoundableRenderable
public void repaint()
repaint
in interface BoundableRenderable
public java.awt.Color getBlockBackgroundColor()
public final void paintTranslated(java.awt.Graphics g)
BoundableRenderable
paintTranslated
in interface BoundableRenderable
g
- Parent's Graphics context.protected final java.awt.Point translateDescendentPoint(BoundableRenderable descendent, int x, int y)
public java.awt.Point getOrigin()
getOrigin
in interface BoundableRenderable
public java.awt.Point getOriginRelativeTo(RCollection ancestor)
getOriginRelativeTo
in interface BoundableRenderable
public int getOrdinal()
public int getZIndex()
public void setOrdinal(int ordinal)