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, waitgetBounds, 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, setYprotected 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()
RCollectionRenderable children.protected void invalidateLayoutLocal()
public RenderableSpot getLowestRenderableSpot(int x, int y)
public boolean isContainedByNode()
BoundableRenderablepublic 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)
BoundableRenderablepublic boolean onMouseReleased(java.awt.event.MouseEvent event,
int x,
int y)
public void paint(java.awt.Graphics g)
public void focus()
focus in interface RCollectionpublic void blur()
blur in interface RCollectionpublic void updateWidgetBounds(int guiX,
int guiY)
updateWidgetBounds in interface RCollectionpublic boolean paintSelection(java.awt.Graphics g,
boolean inSelection,
RenderableSpot startPoint,
RenderableSpot endPoint)
BoundableRenderablepaintSelection in interface BoundableRenderablepublic boolean extractSelectionText(java.lang.StringBuffer buffer,
boolean inSelection,
RenderableSpot startPoint,
RenderableSpot endPoint)
extractSelectionText in interface BoundableRenderablepublic void invalidateLayoutDeep()
RCollectioninvalidateLayoutDeep in interface RCollectionpublic void onMouseMoved(java.awt.event.MouseEvent event,
int x,
int y,
boolean triggerEvent,
ModelNode limit)
onMouseMoved in interface BoundableRenderablepublic void onMouseOut(java.awt.event.MouseEvent event,
int x,
int y,
ModelNode limit)
onMouseOut in interface BoundableRenderablepublic BoundableRenderable getRenderable(int x, int y)
public boolean onRightClick(java.awt.event.MouseEvent event,
int x,
int y)
onRightClick in interface BoundableRenderablepublic void markLayoutValid()
public java.awt.Point getGUIPoint(int clientX,
int clientY)
getGUIPoint in interface BoundableRenderablepublic java.awt.Point getRenderablePoint(int guiX,
int guiY)
getRenderablePoint in interface BoundableRenderablepublic int getHeight()
getHeight in interface BoundableRenderablepublic int getWidth()
getWidth in interface BoundableRenderablepublic void setWidth(int width)
setWidth in interface BoundableRenderablepublic int getX()
getX in interface BoundableRenderablepublic int getY()
getY in interface BoundableRenderablepublic boolean contains(int x,
int y)
public java.awt.Rectangle getBounds()
getBounds in interface BoundableRenderablepublic java.awt.Dimension getSize()
getSize in interface BoundableRenderablepublic ModelNode getModelNode()
getModelNode in interface BoundableRenderablegetModelNode in interface Renderablepublic void setBounds(int x,
int y,
int width,
int height)
setBounds in interface BoundableRenderablepublic void setX(int x)
setX in interface BoundableRenderablepublic void setY(int y)
setY in interface BoundableRenderablepublic void setHeight(int height)
setHeight in interface BoundableRenderablepublic void setOrigin(int x,
int y)
setOrigin in interface BoundableRenderablepublic final void invalidateLayoutUpTree()
invalidateLayoutUpTree in interface BoundableRenderableprotected boolean isValid()
public void relayout()
relayout in interface BoundableRenderablepublic void relayoutIfValid()
public void setParent(RCollection parent)
setParent in interface BoundableRenderablepublic RCollection getParent()
BoundableRenderablegetParent in interface BoundableRenderablepublic void setOriginalParent(RCollection origParent)
setOriginalParent in interface BoundableRenderablepublic RCollection getOriginalParent()
getOriginalParent in interface BoundableRenderablepublic RCollection getOriginalOrCurrentParent()
BoundableRenderableBoundableRenderable.getOriginalParent() if not null. Otherwise
it returns BoundableRenderable.getParent().getOriginalOrCurrentParent in interface BoundableRenderablepublic void repaint(int x,
int y,
int width,
int height)
repaint in interface BoundableRenderablepublic void repaint()
repaint in interface BoundableRenderablepublic java.awt.Color getBlockBackgroundColor()
public final void paintTranslated(java.awt.Graphics g)
BoundableRenderablepaintTranslated in interface BoundableRenderableg - Parent's Graphics context.protected final java.awt.Point translateDescendentPoint(BoundableRenderable descendent, int x, int y)
public java.awt.Point getOrigin()
getOrigin in interface BoundableRenderablepublic java.awt.Point getOriginRelativeTo(RCollection ancestor)
getOriginRelativeTo in interface BoundableRenderablepublic int getOrdinal()
public int getZIndex()
public void setOrdinal(int ordinal)