Class BaseElementRenderable
- All Implemented Interfaces:
ImageObserver,UINode,BoundableRenderable,RCollection,RElement,Renderable,RenderableContainer
- Direct Known Subclasses:
RBlock,RInlineBlock,RTable,RUIControl
Abstract BaseElementRenderable class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected Imageprotected Colorprotected BorderInfoprotected Insetsprotected Colorprotected Colorprotected Colorprotected List<DelayedPair> protected static final IntegerConstant INVALID_SIZEprotected URLprotected booleanprotected Insetsprotected intprotected intprotected Insetsprotected intprotected intprotected static final intConstant SCROLL_BAR_THICKNESS=16protected final UserAgentContextprotected intFields inherited from class org.loboevolution.html.renderer.BaseBoundableRenderable
container, layoutUpTreeCanBeInvalidated, modelNode, originalParent, parent, SELECTION_COLOR, SELECTION_XORFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface org.loboevolution.html.renderer.Renderable
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionBaseElementRenderable(RenderableContainer container, ModelNode modelNode, UserAgentContext ucontext) Constructor for BaseElementRenderable. -
Method Summary
Modifier and TypeMethodDescriptionaddComponent(Component component) addComponent.voidaddDelayedPair(DelayedPair pair) addDelayedPair.protected voidapplyStyle(int availWidth, int availHeight) applyStyle.final voidclearDelayedPairs.protected final voidclearGUIComponents.protected voidclearStyle(boolean isRootBlock) clearStyle.protected abstract voiddoLayout(int availWidth, int availHeight, boolean sizeOnly) doLayout.Getter for the field borderInsets.getClipBounds.intgetCollapsibleMarginBottom.intgetCollapsibleMarginTop.getDeclaredHeight(int actualAvailHeight) Getter for the field declaredHeight.protected IntegergetDeclaredMaxHeight(RenderState renderState, int actualAvailHeight) protected IntegergetDeclaredMaxWidth(RenderState renderState, int actualAvailWidth) protected IntegergetDeclaredMinHeight(RenderState renderState, int actualAvailHeight) protected IntegergetDeclaredMinWidth(RenderState renderState, int actualAvailWidth) protected IntegergetDeclaredWidth(int actualAvailWidth) Getter for the field declaredWidth.final List<DelayedPair> getDelayedPairs.intgetInnerHeight.intgetInnerWidth.getInsets(boolean hscroll, boolean vscroll) getInsets.getInsetsMarginBorder(boolean hscroll, boolean vscroll) getInsetsMarginBorder.getInsetsPadding(boolean hscroll, boolean vscroll) getInsetsPadding.intgetMarginBottom.intgetMarginLeft.intgetMarginRight.intgetMarginTop.getParentContainer.intgetZIndex.final booleanhasDeclaredWidth.booleanimageUpdate(Image img, int infoflags, int x, int y, int w, int h) final voidinvalidateLayoutDeep.protected voidinvalidateLayoutLocal.booleanisContainedByNode.protected booleanisMarginBoundary.voidlayout(int availWidth, int availHeight, boolean sizeOnly) Lays out the subtree below the RElement.voidpaint.protected voidprePaint.protected final voidsendDelayedPairsToParent.protected final voidsendGUIComponentsToParent.voidsetupRelativePosition(RenderableContainer container) setupRelativePosition.translateDescendentPoint(BoundableRenderable descendent, int x, int y) translateDescendentPoint.voidupdateAllWidgetBounds.voidUpdates widget bounds below this node only.Methods inherited from class org.loboevolution.html.renderer.BaseRCollection
blur, extractSelectionText, focus, getClipBoundsWithoutInsets, getDeclaredHeightImpl, getDeclaredWidthImpl, getRenderable, onMouseMoved, onMouseOut, onRightClick, paintSelection, updateWidgetBoundsMethods inherited from class org.loboevolution.html.renderer.BaseBoundableRenderable
contains, getBlockBackgroundColor, getBounds, getGUIPoint, getModelNode, getOrigin, getOriginalOrCurrentParent, getOriginalParent, getOriginRelativeTo, getOriginRelativeToAbs, getOriginRelativeToNoScroll, getParent, getRectangle, getRenderablePoint, getSize, getVisualBounds, getVisualHeight, getVisualWidth, invalidateLayoutUpTree, isDelegated, isValid, markLayoutValid, onDoubleClick, onMouseClick, onMouseDisarmed, onMousePressed, onMouseReleased, onMouseScroll, paintTranslated, relayout, relayoutIfValid, repaint, repaint, setOriginalParent, setParentMethods inherited from class org.loboevolution.html.renderer.RRectangle
setBounds, setOriginMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.loboevolution.html.renderer.BoundableRenderable
contains, extractSelectionText, getBounds, getGUIPoint, getHeight, getLowestRenderableSpot, getModelNode, getOrdinal, getOrigin, getOriginalOrCurrentParent, getOriginalParent, getOriginRelativeTo, getOriginRelativeToAbs, getOriginRelativeToNoScroll, getParent, getRectangle, getRenderablePoint, getSize, getVisualBounds, getVisualHeight, getVisualWidth, getWidth, getX, getY, invalidateLayoutUpTree, isDelegated, onDoubleClick, onMouseClick, onMouseDisarmed, onMouseMoved, onMouseOut, onMousePressed, onMouseReleased, onMouseScroll, onRightClick, paintSelection, paintTranslated, relayout, repaint, repaint, setBounds, setDelegator, setHeight, setOrdinal, setOrigin, setOriginalParent, setParent, setWidth, setX, setYMethods inherited from interface org.loboevolution.html.renderer.RCollection
blur, focus, getClipBoundsWithoutInsets, getRenderable, getRenderables, updateWidgetBoundsMethods inherited from interface org.loboevolution.html.renderer.Renderable
findHtmlRenderable, isFixedMethods inherited from interface org.loboevolution.html.renderer.RenderableContainer
focus, getGUIPoint, getOriginRelativeToAbs, getPaintedBackgroundColor, getVisualBounds, getVisualHeight, getVisualWidth, getY, invalidateLayoutUpTree, relayout, repaint
-
Field Details
-
INVALID_SIZE
Constant INVALID_SIZE -
SCROLL_BAR_THICKNESS
protected static final int SCROLL_BAR_THICKNESSConstant SCROLL_BAR_THICKNESS=16- See Also:
-
userAgentContext
-
backgroundColor
-
borderLeftColor
-
borderRightColor
-
borderTopColor
-
borderBottomColor
-
backgroundImage
-
borderInfo
-
borderInsets
-
marginInsets
-
paddingInsets
-
delayedPairs
-
lastBackgroundImageUri
-
layoutDeepCanBeInvalidated
protected boolean layoutDeepCanBeInvalidated -
overflowX
protected int overflowX -
overflowY
protected int overflowY -
relativeOffsetX
protected int relativeOffsetX -
relativeOffsetY
protected int relativeOffsetY -
zIndex
protected int zIndex
-
-
Constructor Details
-
BaseElementRenderable
public BaseElementRenderable(RenderableContainer container, ModelNode modelNode, UserAgentContext ucontext) Constructor for BaseElementRenderable.
- Parameters:
container- aRenderableContainerobject.modelNode- aModelNodeobject.ucontext- aUserAgentContextobject.
-
-
Method Details
-
addComponent
addComponent.
- Specified by:
addComponentin interfaceRenderableContainer- Parameters:
component- aComponentobject.- Returns:
- a
Componentobject.
-
getBorderInsets
Getter for the field borderInsets.
- Returns:
- a
Insetsobject.
-
addDelayedPair
addDelayedPair.
- Specified by:
addDelayedPairin interfaceRenderableContainer- Parameters:
pair- aDelayedPairobject.
-
applyStyle
protected void applyStyle(int availWidth, int availHeight) applyStyle.
-
clearDelayedPairs
public final void clearDelayedPairs()clearDelayedPairs.
- Specified by:
clearDelayedPairsin interfaceRenderableContainer
-
clearGUIComponents
protected final void clearGUIComponents()clearGUIComponents.
-
clearStyle
protected void clearStyle(boolean isRootBlock) clearStyle.
- Parameters:
isRootBlock- a boolean.
-
setupRelativePosition
setupRelativePosition.
- Specified by:
setupRelativePositionin interfaceRElement- Parameters:
container- aRenderableContainerobject.
-
doLayout
protected abstract void doLayout(int availWidth, int availHeight, boolean sizeOnly) doLayout.
-
getCollapsibleMarginBottom
public int getCollapsibleMarginBottom()getCollapsibleMarginBottom.
- Specified by:
getCollapsibleMarginBottomin interfaceRElement- Returns:
- a
Integerobject.
-
getCollapsibleMarginTop
public int getCollapsibleMarginTop()getCollapsibleMarginTop.
- Specified by:
getCollapsibleMarginTopin interfaceRElement- Returns:
- a
Integerobject.
-
getDeclaredHeight
Getter for the field declaredHeight.
-
getDeclaredWidth
Getter for the field declaredWidth.
-
getDeclaredMaxWidth
-
getDeclaredMinWidth
-
getDeclaredMaxHeight
-
getDeclaredMinHeight
-
getDelayedPairs
getDelayedPairs.
- Specified by:
getDelayedPairsin interfaceRenderableContainer- Returns:
- a
Listobject.
-
getInnerWidth
public int getInnerWidth()getInnerWidth.
- Specified by:
getInnerWidthin interfaceRenderableContainer- Returns:
- a
Integerobject.
-
getInnerHeight
public int getInnerHeight()getInnerHeight.
- Specified by:
getInnerHeightin interfaceRenderableContainer- Returns:
- a
Integerobject.
-
getInsets
getInsets.
- Specified by:
getInsetsin interfaceRenderableContainer- Parameters:
hscroll- a boolean.vscroll- a boolean.- Returns:
- a
Insetsobject.
-
getInsetsMarginBorder
getInsetsMarginBorder.
- Specified by:
getInsetsMarginBorderin interfaceRenderableContainer- Parameters:
hscroll- a boolean.vscroll- a boolean.- Returns:
- a
Insetsobject.
-
getInsetsPadding
getInsetsPadding.
- Parameters:
hscroll- a boolean.vscroll- a boolean.- Returns:
- a
Insetsobject.
-
getMarginBottom
public int getMarginBottom()getMarginBottom.
- Specified by:
getMarginBottomin interfaceRElement- Returns:
- a
Integerobject.
-
getMarginLeft
public int getMarginLeft()getMarginLeft.
- Specified by:
getMarginLeftin interfaceRElement- Returns:
- a
Integerobject.
-
getMarginRight
public int getMarginRight()getMarginRight.
- Specified by:
getMarginRightin interfaceRElement- Returns:
- a
Integerobject.
-
getMarginTop
public int getMarginTop()getMarginTop.
- Specified by:
getMarginTopin interfaceRElement- Returns:
- a
Integerobject.
-
getParentContainer
getParentContainer.
- Specified by:
getParentContainerin interfaceRenderableContainer- Returns:
- a
RenderableContainerobject.
-
getZIndex
public int getZIndex()getZIndex.
- Specified by:
getZIndexin interfaceBoundableRenderable- Returns:
- a
Integerobject.
-
hasDeclaredWidth
public final boolean hasDeclaredWidth()hasDeclaredWidth.
- Returns:
- a boolean.
-
imageUpdate
- Specified by:
imageUpdatein interfaceImageObserver
-
layout
public void layout(int availWidth, int availHeight, boolean sizeOnly) Lays out the subtree below the RElement. The RElement is expected to set its own dimensions, but not its origin. Lays out children, and deals with "valid" state. Override doLayout method instead of this one. -
invalidateLayoutDeep
public final void invalidateLayoutDeep()invalidateLayoutDeep.
Invalidates this Renderable and all descendents. This is only used in special cases, such as when a new style sheet is added.- Specified by:
invalidateLayoutDeepin interfaceRCollection- Overrides:
invalidateLayoutDeepin classBaseRCollection
-
translateDescendentPoint
translateDescendentPoint.
- Specified by:
translateDescendentPointin interfaceRenderableContainer- Parameters:
descendent- aBoundableRenderableobject.x- aIntegerobject.y- aIntegerobject.- Returns:
- a
Pointobject.
-
invalidateLayoutLocal
protected void invalidateLayoutLocal()invalidateLayoutLocal.
- Specified by:
invalidateLayoutLocalin classBaseBoundableRenderable
-
isContainedByNode
public boolean isContainedByNode()isContainedByNode.
- Specified by:
isContainedByNodein interfaceBoundableRenderable- Returns:
- a boolean.
-
isMarginBoundary
protected boolean isMarginBoundary()isMarginBoundary.
- Returns:
- a boolean.
-
paint
paint.
- Specified by:
paintin interfaceRenderable- Parameters:
g- aGraphicsobject.
-
getClipBounds
getClipBounds.
- Specified by:
getClipBoundsin interfaceRCollection- Returns:
- a
Rectangleobject.
-
sendDelayedPairsToParent
protected final void sendDelayedPairsToParent()sendDelayedPairsToParent.
-
sendGUIComponentsToParent
protected final void sendGUIComponentsToParent()sendGUIComponentsToParent.
-
updateAllWidgetBounds
public void updateAllWidgetBounds()updateAllWidgetBounds.
- Specified by:
updateAllWidgetBoundsin interfaceRenderableContainer
-
updateWidgetBounds
public void updateWidgetBounds()Updates widget bounds below this node only. Should not be called during general rendering. -
prePaint
prePaint.
- Parameters:
g- aGraphicsobject.
-