Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.lobobrowser.html.renderer.BaseRenderable
org.lobobrowser.html.renderer.BaseBoundableRenderable
org.lobobrowser.html.renderer.BaseRCollection
org.lobobrowser.html.renderer.BaseElementRenderable
org.lobobrowser.html.renderer.RBlock
public class RBlock
extends org.lobobrowser.html.renderer.BaseElementRenderable
implements RenderableContainer, ImageObserver
RBlock
you will find a node of
type RBlockViewport
.
Field Summary | |
protected RBlockViewport | |
protected int | |
protected RenderableSpot | |
protected FrameContext | |
protected JScrollBar | |
protected boolean | |
protected boolean | |
protected int | |
protected HtmlRendererContext | |
protected RenderableSpot | |
protected JScrollBar |
Fields inherited from class org.lobobrowser.html.renderer.BaseElementRenderable | |
INVALID_SIZE , OVERFLOW_AUTO , OVERFLOW_HIDDEN , OVERFLOW_NONE , OVERFLOW_SCROLL , OVERFLOW_VERTICAL , OVERFLOW_VISIBLE , SCROLL_BAR_THICKNESS , backgroundColor , backgroundImage , borderBottomColor , borderInsets , borderLeftColor , borderRightColor , borderStyles , borderTopColor , defaultMarginInsets , delayedPairs , lastBackgroundImageUri , layoutDeepCanBeInvalidated , userAgentContext , zIndex |
Fields inherited from class org.lobobrowser.html.renderer.BaseBoundableRenderable | |
SELECTION_COLOR , SELECTION_XOR , container , height , layoutUpTreeCanBeInvalidated , logger , modelNode , originalParent , parent , width , x , y |
Fields inherited from interface org.lobobrowser.html.renderer.Renderable | |
EMPTY_ARRAY |
Fields inherited from interface org.lobobrowser.html.renderer.RElement | |
VALIGN_ABSBOTTOM , VALIGN_ABSMIDDLE , VALIGN_BASELINE , VALIGN_BOTTOM , VALIGN_MIDDLE , VALIGN_TOP |
Constructor Summary | |
| |
|
Method Summary | |
void |
|
void |
|
boolean | |
void |
|
void |
|
void |
|
void |
|
void |
|
org.lobobrowser.html.renderer.FloatingBounds | |
int | |
int | |
RenderableSpot |
|
protected Insets | |
Color | |
RBlockViewport | |
Iterator | |
int |
|
int |
|
int |
|
void |
|
boolean | |
void |
|
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
boolean |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
void |
|
Methods inherited from class org.lobobrowser.html.renderer.BaseElementRenderable | |
addComponent , addDelayedPair , applyStyle , clearDelayedPairs , clearGUIComponents , doLayout , getAlignmentX , getAlignmentY , getDeclaredHeight , getDeclaredHeightImpl , getDeclaredWidth , getDelayedPairs , getInsets , getMarginInsets , getOverflow , getParentContainer , getZIndex , imageUpdate , invalidateLayoutDeep , invalidateLayoutLocal , isContainedByNode , layout , loadBackgroundImage , paint , prePaint , sendDelayedPairsToParent , sendGUIComponentsToParent , updateAllWidgetBounds , updateWidgetBounds |
Methods inherited from class org.lobobrowser.html.renderer.BaseRCollection | |
blur , extractSelectionText , focus , getRenderable , invalidateLayoutDeep , onMouseMoved , onMouseOut , onRightClick , paintSelection , updateWidgetBounds |
Methods inherited from class org.lobobrowser.html.renderer.BaseBoundableRenderable | |
contains , getBlockBackgroundColor , getBounds , getGUIPoint , getHeight , getModelNode , getOrigin , getOriginRelativeTo , getOriginalOrCurrentParent , getOriginalParent , getParent , getRenderablePoint , getSize , getWidth , getX , getY , invalidateLayoutLocal , invalidateLayoutUpTree , isValid , markLayoutValid , onMouseMoved , onMouseOut , paintTranslated , relayout , relayoutImpl , repaint , repaint , setBounds , setHeight , setOrigin , setOriginalParent , setParent , setWidth , setX , setY , translateDescendentPoint |
Methods inherited from class org.lobobrowser.html.renderer.BaseRenderable | |
getOrdinal , getZIndex , setOrdinal |
protected final int defaultOverflow
protected JScrollBar hScrollBar
protected boolean hasHScrollBar
protected boolean hasVScrollBar
protected final int listNesting
protected JScrollBar vScrollBar
public RBlock(NodeImpl modelNode, int listNesting, UserAgentContext pcontext, HtmlRendererContext rcontext, FrameContext frameContext, RenderableContainer parentContainer)
public RBlock(NodeImpl modelNode, int listNesting, UserAgentContext pcontext, HtmlRendererContext rcontext, FrameContext frameContext, RenderableContainer parentContainer, int defaultOverflow)
public void adjust()
This adjustment step needs to be performed after layout. In this case, the dimensions previously obtained in the layout are assumed to be the desired dimensions of the block.
public void adjust(int availWidth, int availHeight, boolean expandWidth, boolean expandHeight, org.lobobrowser.html.renderer.FloatingBoundsSource floatBoundsSource)
Adjustment step which must be done after layout. This will expand blocks that need to be expanded and relayout blocks with relative sizes accordingly.
- Parameters:
availWidth
-availHeight
-expandWidth
-expandHeight
-
public final boolean couldBeScrollable()
public final void doLayout(int availWidth, int availHeight)
- Overrides:
- doLayout in interface org.lobobrowser.html.renderer.BaseElementRenderable
public final void doLayout(int availWidth, int availHeight, int tentativeY)
public void doLayout(int availWidth, int availHeight, org.lobobrowser.html.renderer.FloatingBounds floatBounds, int tentativeY, int defaultOverflow)
Lays out and sets dimensions only if RBlock is invalid (or never before layed out), if the parameters passed differ from the last layout, or if the current font differs from the font for the last layout.
- Parameters:
availWidth
-availHeight
-
public void ensureVisible(Point point)
public void finalize() throws Throwable
public org.lobobrowser.html.renderer.FloatingBounds getExportableFloatingBounds()
public int getFirstBaselineOffset()
public int getFirstLineHeight()
public RenderableSpot getLowestRenderableSpot(int x, int y)
- Specified by:
- getLowestRenderableSpot in interface BoundableRenderable
public Color getPaintedBackgroundColor()
- Specified by:
- getPaintedBackgroundColor in interface RenderableContainer
public int getVAlign()
Vertical alignment for elements rendered in a line. Returns one of the constants defined in this class.
public int getVScrollBarWidth()
Gets the width the vertical scrollbar has when shown.
public int getViewportListNesting(int blockNesting)
public void invalidateLayoutLocal()
RBlocks should only be invalidated if one of their properties change, or if a descendent changes, or if a style property of an ancestor is such that it could produce layout changes in this RBlock.
- Overrides:
- invalidateLayoutLocal in interface org.lobobrowser.html.renderer.BaseElementRenderable
public final boolean isOverflowVisible()
public final void layout(int availWidth, int availHeight, int defaultOverflow)
public final void layout(int availWidth, int availHeight, org.lobobrowser.html.renderer.FloatingBounds floatBounds, int tentativeY)
public final void layout(int availWidth, int availHeight, org.lobobrowser.html.renderer.FloatingBounds floatBounds, int tentativeY, int defaultOverflow)
public boolean onDoubleClick(MouseEvent event, int x, int y)
- Specified by:
- onDoubleClick in interface BoundableRenderable
public boolean onMouseClick(MouseEvent event, int x, int y)
- Specified by:
- onMouseClick in interface BoundableRenderable
public boolean onMouseDisarmed(MouseEvent event)
- Specified by:
- onMouseDisarmed in interface BoundableRenderable
public boolean onMousePressed(MouseEvent event, int x, int y)
- Specified by:
- onMousePressed in interface BoundableRenderable
public boolean onMouseReleased(MouseEvent event, int x, int y)
- Specified by:
- onMouseReleased in interface BoundableRenderable
public void paint(Graphics g)
- Specified by:
- paint in interface Renderable
- Overrides:
- paint in interface org.lobobrowser.html.renderer.BaseElementRenderable
public boolean paintSelection(Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
- Specified by:
- paintSelection in interface BoundableRenderable
- Overrides:
- paintSelection in interface org.lobobrowser.html.renderer.BaseRCollection
public void scrollBy(int orientation, int offset)
public void scrollByUnits(int orientation, int units)
public void scrollHorizontalTo(int newX)
public void scrollTo(Rectangle bounds, boolean xIfNeeded, boolean yIfNeeded)
Scrolls the viewport's origin to the given location, or as close to it as possible. This method should be invoked in the GUI thread.
- Parameters:
bounds
- The bounds of the scrollable area that should become visible.xIfNeeded
- If this parameter istrue
the x coordinate is changed only if the horizontal bounds are not currently visible.yIfNeeded
- If this parameter istrue
the y coordinate is changed only if the vertical bounds are not currently visible.
public void scrollVerticalTo(int newY)
public void setDefaultMarginInsets(Insets insets)
public void setDefaultPaddingInsets(Insets insets)
public String toString()
public void updateWidgetBounds(int guiX, int guiY)
Updates bounds of all descendent's GUI components, based on root bounds.
- Specified by:
- updateWidgetBounds in interface RCollection
- Overrides:
- updateWidgetBounds in interface org.lobobrowser.html.renderer.BaseRCollection