|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lobobrowser.html.renderer.RImgControl
public class RImgControl
| Field Summary | |
|---|---|
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 java.awt.Insets |
borderInsets
|
protected java.awt.Color |
borderLeftColor
|
protected java.awt.Color |
borderRightColor
|
protected java.awt.Insets |
borderStyles
|
protected java.awt.Color |
borderTopColor
|
protected RenderableContainer |
container
|
protected java.awt.Insets |
defaultMarginInsets
|
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 ModelNode |
modelNode
|
protected RCollection |
originalParent
Parent for invalidation. |
static int |
OVERFLOW_AUTO
|
static int |
OVERFLOW_HIDDEN
|
static int |
OVERFLOW_NONE
|
static int |
OVERFLOW_SCROLL
|
static int |
OVERFLOW_VERTICAL
|
static int |
OVERFLOW_VISIBLE
|
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
|
| Fields inherited from interface org.lobobrowser.html.renderer.RElement |
|---|
VALIGN_ABSBOTTOM, VALIGN_ABSMIDDLE, VALIGN_BASELINE, VALIGN_BOTTOM, VALIGN_MIDDLE, VALIGN_TOP |
| Fields inherited from interface org.lobobrowser.html.renderer.Renderable |
|---|
EMPTY_ARRAY |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
RImgControl(ModelNode me,
org.lobobrowser.html.renderer.UIControl widget,
RenderableContainer container,
FrameContext frameContext,
UserAgentContext ucontext)
|
|
| Method Summary | |
|---|---|
java.awt.Component |
addComponent(java.awt.Component component)
|
void |
addDelayedPair(DelayedPair pair)
|
protected void |
applyStyle()
|
void |
blur()
|
void |
clearDelayedPairs()
|
protected void |
clearGUIComponents()
|
boolean |
contains(int x,
int y)
|
void |
doLayout(int availWidth,
int availHeight)
|
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()
|
protected java.lang.Integer |
getDeclaredHeight(RenderState renderState,
int availHeight)
|
protected int |
getDeclaredHeightImpl(RenderState renderState,
int availHeight)
|
protected java.lang.Integer |
getDeclaredWidth(RenderState renderState,
int availWidth)
|
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)
|
protected java.awt.Insets |
getMarginInsets(RenderState rs)
|
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)
|
protected int |
getOverflow()
|
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 |
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 |
isValid()
|
void |
layout(int availWidth,
int availHeight)
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. |
protected void |
relayoutImpl(boolean invalidateLocal)
|
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.lobobrowser.html.renderer.RElement |
|---|
layout |
| Methods inherited from interface org.lobobrowser.html.renderer.RCollection |
|---|
blur, invalidateLayoutDeep |
| Methods inherited from interface org.lobobrowser.html.renderer.BoundableRenderable |
|---|
getBounds, 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, setY |
| Methods inherited from interface org.lobobrowser.html.domimpl.UINode |
|---|
blur, getBounds |
| Methods inherited from interface org.lobobrowser.html.renderer.RenderableContainer |
|---|
getGUIPoint, invalidateLayoutUpTree, relayout, repaint |
| Field Detail |
|---|
public final org.lobobrowser.html.renderer.UIControl widget
protected final ModelNode modelNode
public static final int OVERFLOW_NONE
public static final int OVERFLOW_SCROLL
public static final int OVERFLOW_AUTO
public static final int OVERFLOW_HIDDEN
public static final int OVERFLOW_VISIBLE
public static final int OVERFLOW_VERTICAL
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 borderStyles
protected java.net.URL lastBackgroundImageUri
protected java.awt.Insets defaultMarginInsets
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
| Constructor Detail |
|---|
public RImgControl(ModelNode me,
org.lobobrowser.html.renderer.UIControl widget,
RenderableContainer container,
FrameContext frameContext,
UserAgentContext ucontext)
| Method Detail |
|---|
protected void applyStyle()
public void focus()
focus in interface UINodefocus in interface RCollectionfocus in interface RenderableContainerpublic final void invalidateLayoutLocal()
public int getVAlign()
RElement
getVAlign in interface RElementpublic boolean hasBackground()
public final void paint(java.awt.Graphics g)
paint in interface Renderable
public boolean onMouseClick(java.awt.event.MouseEvent event,
int x,
int y)
onMouseClick in interface BoundableRenderable
public boolean onDoubleClick(java.awt.event.MouseEvent event,
int x,
int y)
onDoubleClick in interface BoundableRenderable
public boolean onMousePressed(java.awt.event.MouseEvent event,
int x,
int y)
BoundableRenderable
onMousePressed in interface BoundableRenderable
public 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 repaint(ModelNode modelNode)
UINode
repaint in interface UINode
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)
BoundableRenderable
paintSelection in interface BoundableRenderable
public boolean extractSelectionText(java.lang.StringBuffer buffer,
boolean inSelection,
RenderableSpot startPoint,
RenderableSpot endPoint)
extractSelectionText in interface BoundableRenderable
public RenderableSpot getLowestRenderableSpot(int x,
int y)
getLowestRenderableSpot in interface BoundableRenderable
public void doLayout(int availWidth,
int availHeight)
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 float getAlignmentX()
public float getAlignmentY()
public final void invalidateLayoutDeep()
invalidateLayoutDeep in interface RCollection
protected java.lang.Integer getDeclaredWidth(RenderState renderState,
int availWidth)
protected java.lang.Integer getDeclaredHeight(RenderState renderState,
int availHeight)
protected int getDeclaredHeightImpl(RenderState renderState,
int availHeight)
protected int getOverflow()
public final void layout(int availWidth,
int availHeight)
layout in interface RElementavailWidth - The available width from the parent's canvas.availHeight - The available height from the parent's canvas.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()
protected void loadBackgroundImage(java.net.URL imageURL)
public int getZIndex()
getZIndex in interface BoundableRenderableprotected void prePaint(java.awt.Graphics g)
protected final java.awt.Insets getMarginInsets(RenderState rs)
public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int w,
int h)
imageUpdate in interface java.awt.image.ImageObserver
public 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()
BoundableRenderable
isContainedByNode in interface BoundableRenderablepublic void blur()
blur 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 BoundableRenderablepublic 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 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 BoundableRenderable
public 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 Renderable
public 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 BoundableRenderable
public void setOrigin(int x,
int y)
setOrigin in interface BoundableRenderablepublic final void invalidateLayoutUpTree()
invalidateLayoutUpTree in interface BoundableRenderableprotected boolean isValid()
protected final void relayoutImpl(boolean invalidateLocal)
public void relayout()
relayout in interface BoundableRenderablepublic void setParent(RCollection parent)
setParent in interface BoundableRenderablepublic RCollection getParent()
BoundableRenderable
getParent 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 BoundableRenderable
public 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)
BoundableRenderable
paintTranslated 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||