public class RImgControl
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
backgroundColor
Background color which may be different to
that from RenderState in the case of a Document node.
|
protected java.awt.Image |
backgroundImage |
protected java.awt.Color |
borderBottomColor |
protected BorderInfo |
borderInfo |
protected java.awt.Insets |
borderInsets |
protected java.awt.Color |
borderLeftColor |
protected java.awt.Color |
borderRightColor |
protected java.awt.Color |
borderTopColor |
protected RenderableContainer |
container |
protected java.awt.Insets |
defaultMarginInsets |
protected java.awt.Insets |
defaultPaddingInsets |
protected java.util.Collection |
delayedPairs
A list of absolute positioned or
float parent-child pairs.
|
int |
height |
protected static java.lang.Integer |
INVALID_SIZE |
protected java.net.URL |
lastBackgroundImageUri |
protected boolean |
layoutDeepCanBeInvalidated |
protected boolean |
layoutUpTreeCanBeInvalidated
Starts as true because ancestors could be invalidated.
|
protected static java.util.logging.Logger |
logger |
protected java.awt.Insets |
marginInsets |
protected ModelNode |
modelNode |
protected RCollection |
originalParent
Parent for invalidation.
|
protected int |
overflowX |
protected int |
overflowY |
protected java.awt.Insets |
paddingInsets |
protected RCollection |
parent
Parent for graphics coordinates.
|
protected static int |
SCROLL_BAR_THICKNESS |
protected static java.awt.Color |
SELECTION_COLOR |
protected static java.awt.Color |
SELECTION_XOR |
protected UserAgentContext |
userAgentContext |
org.lobobrowser.html.renderer.UIControl |
widget |
int |
width |
int |
x |
int |
y |
protected int |
zIndex |
VALIGN_ABSBOTTOM, VALIGN_ABSMIDDLE, VALIGN_BASELINE, VALIGN_BOTTOM, VALIGN_MIDDLE, VALIGN_TOPEMPTY_ARRAY| Constructor and Description |
|---|
RImgControl(ModelNode me,
org.lobobrowser.html.renderer.UIControl widget,
RenderableContainer container,
FrameContext frameContext,
UserAgentContext ucontext) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Component |
addComponent(java.awt.Component component) |
void |
addDelayedPair(DelayedPair pair) |
protected void |
applyStyle(int availWidth,
int availHeight) |
void |
blur() |
void |
clearDelayedPairs() |
protected void |
clearGUIComponents() |
protected void |
clearStyle(boolean isRootBlock) |
boolean |
contains(int x,
int y) |
void |
doLayout(int availWidth,
int availHeight,
boolean sizeOnly) |
boolean |
extractSelectionText(java.lang.StringBuffer buffer,
boolean inSelection,
RenderableSpot startPoint,
RenderableSpot endPoint) |
void |
focus() |
float |
getAlignmentX() |
float |
getAlignmentY() |
java.awt.Color |
getBlockBackgroundColor() |
java.awt.Rectangle |
getBounds() |
java.awt.Rectangle |
getBoundsRelativeToBlock() |
int |
getCollapsibleMarginBottom() |
int |
getCollapsibleMarginTop() |
protected java.lang.Integer |
getDeclaredHeight(RenderState renderState,
int actualAvailHeight) |
protected int |
getDeclaredHeightImpl(RenderState renderState,
int availHeight) |
protected java.lang.Integer |
getDeclaredWidth(RenderState renderState,
int actualAvailWidth) |
java.util.Collection |
getDelayedPairs() |
java.awt.Color |
getForegroundColor() |
java.awt.Point |
getGUIPoint(int clientX,
int clientY) |
int |
getHeight() |
java.awt.Insets |
getInsets(boolean hscroll,
boolean vscroll)
Gets insets of content area.
|
RenderableSpot |
getLowestRenderableSpot(int x,
int y) |
int |
getMarginBottom() |
int |
getMarginLeft() |
int |
getMarginRight() |
int |
getMarginTop() |
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) |
java.awt.Color |
getPaintedBackgroundColor() |
RCollection |
getParent()
Gets the parent where the renderable is rendered.
|
RenderableContainer |
getParentContainer() |
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 |
getVAlign()
Vertical alignment for elements rendered in a line.
|
int |
getWidth() |
int |
getX() |
int |
getY() |
int |
getZIndex() |
boolean |
hasBackground() |
boolean |
hasDeclaredWidth() |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int w,
int h) |
void |
invalidateLayoutDeep()
Invalidates this Renderable and all
descendents.
|
void |
invalidateLayoutLocal() |
void |
invalidateLayoutUpTree()
Invalidates this Renderable and its parent (i.e.
|
void |
invalidateRenderStyle() |
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 |
isMarginBoundary() |
protected boolean |
isValid() |
void |
layout(int availWidth,
int availHeight,
boolean sizeOnly)
Lays out children, and deals with "valid" state.
|
protected void |
loadBackgroundImage(java.net.URL imageURL) |
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)
All overriders should call super implementation.
|
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 |
preferredSizeInvalidated()
May be called by controls when
they wish to modifiy their preferred
size (e.g.
|
protected void |
prePaint(java.awt.Graphics g) |
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 |
repaint(ModelNode modelNode)
Called
|
protected void |
sendDelayedPairsToParent() |
protected void |
sendGUIComponentsToParent() |
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setDefaultMarginInsets(java.awt.Insets insets) |
void |
setDefaultPaddingInsets(java.awt.Insets insets) |
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 |
updateAllWidgetBounds() |
void |
updateWidgetBounds()
Updates widget bounds below this node only.
|
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, waitgetCollapsibleMarginBottom, getCollapsibleMarginTop, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, layoutblur, invalidateLayoutDeepgetBounds, getGUIPoint, getHeight, getModelNode, getOrdinal, getOrigin, getOriginalOrCurrentParent, getOriginalParent, getOriginRelativeTo, getParent, getRenderablePoint, getSize, getWidth, getX, getY, getZIndex, invalidateLayoutUpTree, isContainedByNode, onMouseMoved, onMouseOut, onRightClick, paintTranslated, relayout, repaint, repaint, setBounds, setHeight, setOrdinal, setOrigin, setOriginalParent, setParent, setWidth, setX, setYblur, getBounds, getBoundsRelativeToBlockgetGUIPoint, invalidateLayoutUpTree, relayout, repaintpublic final org.lobobrowser.html.renderer.UIControl widget
protected final ModelNode modelNode
protected static final java.lang.Integer INVALID_SIZE
protected java.util.Collection delayedPairs
protected java.awt.Color backgroundColor
protected volatile java.awt.Image backgroundImage
protected int zIndex
protected java.awt.Color borderTopColor
protected java.awt.Color borderLeftColor
protected java.awt.Color borderBottomColor
protected java.awt.Color borderRightColor
protected java.awt.Insets borderInsets
protected java.awt.Insets marginInsets
protected java.awt.Insets paddingInsets
protected BorderInfo borderInfo
protected java.net.URL lastBackgroundImageUri
protected java.awt.Insets defaultMarginInsets
protected java.awt.Insets defaultPaddingInsets
protected int overflowX
protected int overflowY
protected final UserAgentContext userAgentContext
protected boolean layoutDeepCanBeInvalidated
protected static final int SCROLL_BAR_THICKNESS
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
public int x
public int y
public int width
public int height
protected boolean layoutUpTreeCanBeInvalidated
protected RCollection parent
protected RCollection originalParent
public RImgControl(ModelNode me, org.lobobrowser.html.renderer.UIControl widget, RenderableContainer container, FrameContext frameContext, UserAgentContext ucontext)
protected void applyStyle(int availWidth,
int availHeight)
public void focus()
focus in interface UINodefocus in interface RCollectionfocus in interface RenderableContainerpublic final void invalidateLayoutLocal()
public int getVAlign()
RElementpublic boolean hasBackground()
public final void paint(java.awt.Graphics g)
paint in interface Renderablepublic boolean onMouseClick(java.awt.event.MouseEvent event,
int x,
int y)
onMouseClick in interface BoundableRenderablepublic boolean onDoubleClick(java.awt.event.MouseEvent event,
int x,
int y)
onDoubleClick in interface BoundableRenderablepublic boolean onMousePressed(java.awt.event.MouseEvent event,
int x,
int y)
BoundableRenderableonMousePressed in interface BoundableRenderablepublic boolean onMouseReleased(java.awt.event.MouseEvent event,
int x,
int y)
onMouseReleased in interface BoundableRenderablepublic boolean onMouseDisarmed(java.awt.event.MouseEvent event)
onMouseDisarmed in interface BoundableRenderablepublic void invalidateRenderStyle()
public void updateWidgetBounds(int guiX,
int guiY)
updateWidgetBounds in interface RCollectionpublic java.awt.Color getBlockBackgroundColor()
public 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 RenderableSpot getLowestRenderableSpot(int x, int y)
getLowestRenderableSpot in interface BoundableRenderablepublic void doLayout(int availWidth,
int availHeight,
boolean sizeOnly)
public final void preferredSizeInvalidated()
public java.util.Iterator getRenderables()
RCollectionRenderable children.getRenderables in interface RCollectionpublic java.awt.Color getPaintedBackgroundColor()
getPaintedBackgroundColor in interface RenderableContainerpublic java.awt.Color getForegroundColor()
public void setDefaultPaddingInsets(java.awt.Insets insets)
public void setDefaultMarginInsets(java.awt.Insets insets)
public float getAlignmentX()
public float getAlignmentY()
public final void invalidateLayoutDeep()
invalidateLayoutDeep in interface RCollectionprotected java.lang.Integer getDeclaredWidth(RenderState renderState, int actualAvailWidth)
public final boolean hasDeclaredWidth()
protected java.lang.Integer getDeclaredHeight(RenderState renderState, int actualAvailHeight)
protected int getDeclaredHeightImpl(RenderState renderState, int availHeight)
public final void layout(int availWidth,
int availHeight,
boolean sizeOnly)
protected final void sendGUIComponentsToParent()
protected final void clearGUIComponents()
public java.awt.Component addComponent(java.awt.Component component)
addComponent in interface RenderableContainerpublic void updateAllWidgetBounds()
updateAllWidgetBounds in interface RenderableContainerpublic void updateWidgetBounds()
public java.awt.Rectangle getBoundsRelativeToBlock()
getBoundsRelativeToBlock in interface UINodeprotected void clearStyle(boolean isRootBlock)
protected void loadBackgroundImage(java.net.URL imageURL)
public int getZIndex()
getZIndex in interface BoundableRenderableprotected void prePaint(java.awt.Graphics g)
public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int w,
int h)
imageUpdate in interface java.awt.image.ImageObserverpublic java.awt.Insets getInsets(boolean hscroll,
boolean vscroll)
protected final void sendDelayedPairsToParent()
public final void clearDelayedPairs()
clearDelayedPairs in interface RenderableContainerpublic final java.util.Collection getDelayedPairs()
getDelayedPairs in interface RenderableContainerpublic void addDelayedPair(DelayedPair pair)
addDelayedPair in interface RenderableContainerpublic RenderableContainer getParentContainer()
getParentContainer in interface RenderableContainerpublic boolean isContainedByNode()
BoundableRenderableisContainedByNode in interface BoundableRenderablepublic int getCollapsibleMarginBottom()
getCollapsibleMarginBottom in interface RElementprotected boolean isMarginBoundary()
public int getCollapsibleMarginTop()
getCollapsibleMarginTop in interface RElementpublic int getMarginBottom()
getMarginBottom in interface RElementpublic int getMarginLeft()
getMarginLeft in interface RElementpublic int getMarginRight()
getMarginRight in interface RElementpublic int getMarginTop()
getMarginTop in interface RElementpublic void blur()
blur 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 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 void setOrdinal(int ordinal)