| java.lang.Object org.netbeans.modules.visualweb.css2.CssBox org.netbeans.modules.visualweb.css2.ContainerBox org.netbeans.modules.visualweb.css2.LineBoxGroup
LineBoxGroup | public class LineBoxGroup extends ContainerBox (Code) | | This class represents a LineBoxGroup; a box representing
a single Inline context, which will be rendered as a set
of LineBoxes managed by this LineBoxGroup.
This class also maintains floating boxes, since these are
positioned along with line boxes (and in particular, if a float
appears in the middle of a stack of line boxes, we need to know
exactly where to put it - and only the LineBoxGroup can handle this.)
author: Tor Norbye |
Method Summary | |
protected void | addBox(CssBox box, CssBox prevBox, CssBox nextBox) The actual "box list" (as seen by CssBox.getBoxCount())
is not updated until we perform layout, since we'll need to
create multiple intermediate line boxes to fit the contents
depending on the actual layout width and float box positioning.
TODO - consider changing this box into something else,
e.g. | public Rectangle | computeBounds(Element componentRootElement, Rectangle bounds) | void | computeHorizontalLengths(FormatContext context) | public void | computeRectangles(Element componentRootElement, List<Rectangle> list) | void | computeVerticalLengths(FormatContext context) | void | finishRelatives(FormatContext context) | protected CssBox[] | getBoxesToRemove(CssBox toRemove) XXX #112576. | public BoxList | getManagedBoxes() | public FontMetrics | getMetrics() | public int | getPrefMinWidth() | public int | getPrefWidth() | protected int | getPrefWidth(BoxList list) | int | getSizeWithFloats() | protected void | initialize() LineBoxes do not have margins, borders, grids, etc. | protected void | initializeBackground() | protected void | initializeHorizontalWidths(FormatContext context) | protected void | initializeInvariants() LineBoxes do not have margins, borders, grids, etc. | public boolean | isEmpty() Report whether the line box is empty (contains no inline boxes). | protected void | layoutChild(CssBox box, FormatContext context, boolean handleChildren) Lays out ALL the children; should ONLY be called as part of updateLayout. | protected CssBox | notifyChildResize(CssBox child, FormatContext context) | public void | paint(Graphics g, int px, int py) Paint the linebox. | protected void | paintBackground(Graphics g, int x, int y) | public void | relayout(FormatContext context) Perform layout on the inline box contents. | protected boolean | removeBox(CssBox box) | LineBoxGroup | split(org.netbeans.modules.visualweb.css2.CssBox lastBox) Split this linebox, creating a new linebox containing all
the elements following the child box "lastBox"; the new
line box will containg the remaining elements, and this
line box will be truncated to only contain the elements
up to lastBox. |
addBox | protected void addBox(CssBox box, CssBox prevBox, CssBox nextBox)(Code) | | The actual "box list" (as seen by CssBox.getBoxCount())
is not updated until we perform layout, since we'll need to
create multiple intermediate line boxes to fit the contents
depending on the actual layout width and float box positioning.
TODO - consider changing this box into something else,
e.g. LineBoxGroup
|
getManagedBoxes | public BoxList getManagedBoxes()(Code) | | FOR TESTSUITE ONLY!
|
getPrefMinWidth | public int getPrefMinWidth()(Code) | | relayoutChildren |
getPrefWidth | public int getPrefWidth()(Code) | | relayoutChildren |
getSizeWithFloats | int getSizeWithFloats()(Code) | | |
initialize | protected void initialize()(Code) | | LineBoxes do not have margins, borders, grids, etc. like regular
boxes.
|
initializeBackground | protected void initializeBackground()(Code) | | |
initializeHorizontalWidths | protected void initializeHorizontalWidths(FormatContext context)(Code) | | |
initializeInvariants | protected void initializeInvariants()(Code) | | LineBoxes do not have margins, borders, grids, etc. like regular
boxes.
|
isEmpty | public boolean isEmpty()(Code) | | Report whether the line box is empty (contains no inline boxes).
true iff there are no inline boxes in this linebox. |
layoutChild | protected void layoutChild(CssBox box, FormatContext context, boolean handleChildren)(Code) | | Lays out ALL the children; should ONLY be called as part of updateLayout.
|
paint | public void paint(Graphics g, int px, int py)(Code) | | Paint the linebox. This is overiding super because while we
don't need the clipping in ContainerBox, we also need to
change background painting.
The issue is that let's say we have a bunch of text boxes
in a linebox with backgrounds. Selection-range painting, which
is done here in LineBoxGroup, needs to happen AFTER the textboxes
have drawn their backgrounds, but BEFORE they paint their text
foregrounds!
So TextBoxes and LineBoxes have been modified to not paint their
backgrounds as part of paint. And here LineBoxGroup will first
paint its LineBox backgrounds, then the selection, then its
LineBox foregrounds/text.
|
paintBackground | protected void paintBackground(Graphics g, int x, int y)(Code) | | |
relayout | public void relayout(FormatContext context)(Code) | | Perform layout on the inline box contents.
This typically means splitting it up into multiple
sub-lineboxes.
|
removeBox | protected boolean removeBox(CssBox box)(Code) | | Remove a box from the "master" box list, not the actual
children list (which contains line boxes)
|
split | LineBoxGroup split(org.netbeans.modules.visualweb.css2.CssBox lastBox)(Code) | | Split this linebox, creating a new linebox containing all
the elements following the child box "lastBox"; the new
line box will containg the remaining elements, and this
line box will be truncated to only contain the elements
up to lastBox.
|
Methods inherited from org.netbeans.modules.visualweb.css2.ContainerBox | protected void addBox(CssBox box, CssBox prevBox, CssBox nextBox)(Code)(Java Doc) protected void addBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox)(Code)(Java Doc) protected void addGrayItalicText(CreateContext context, Element styleElement, String text)(Code)(Java Doc) void addNode(CreateContext context, Node node, Element sourceElement, CssBox prevBox, CssBox nextBox)(Code)(Java Doc) protected void addSiblingBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox)(Code)(Java Doc) protected void addText(CreateContext context, Text textNode, Element styleElement, String text)(Code)(Java Doc) boolean containsChild(CssBox cssBox)(Code)(Java Doc) protected void createChildren(CreateContext context)(Code)(Java Doc) public WebForm[] findExternalForms()(Code)(Java Doc) void finishAllRelatives(FormatContext context)(Code)(Java Doc) void finishLineBox(CreateContext context)(Code)(Java Doc) public CssBox getBox(int index)(Code)(Java Doc) public int getBoxCount()(Code)(Java Doc) protected BoxList getBoxList()(Code)(Java Doc) public CssBox[] getBoxes()(Code)(Java Doc) protected CssBox[] getBoxesToRemove(CssBox toRemove)(Code)(Java Doc) public int getPrefMinWidth()(Code)(Java Doc) public int getPrefWidth()(Code)(Java Doc) protected boolean hasNormalBlockLevelChildren()(Code)(Java Doc) protected void initialize()(Code)(Java Doc) protected void initializeBackground()(Code)(Java Doc) protected void initializeGrid()(Code)(Java Doc) protected void initializeHorizontalWidths(FormatContext context)(Code)(Java Doc) public boolean isGrid()(Code)(Java Doc) protected boolean isOpaqueBox()(Code)(Java Doc) protected void layoutChild(CssBox box, FormatContext context, boolean handleChildren)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) protected CssBox notifyChildResize(CssBox child, FormatContext context)(Code)(Java Doc) public void paint(Graphics g, int px, int py)(Code)(Java Doc) protected void paintBox(Graphics g, int x, int y, int w, int h)(Code)(Java Doc) protected void paintGrid(Graphics g, int x, int y, int w, int h)(Code)(Java Doc) protected void positionBox(CssBox box, FormatContext context)(Code)(Java Doc) static void printLayout(CssBox b, StringBuffer sb, int depth)(Code)(Java Doc) public void relayout(FormatContext context)(Code)(Java Doc) protected boolean removeBox(CssBox box)(Code)(Java Doc) protected void removeBoxes()(Code)(Java Doc) void setContainingBlock(CssBox box, FormatContext context)(Code)(Java Doc) public void setGrid(boolean grid)(Code)(Java Doc) protected void setProbableChildCount(int children)(Code)(Java Doc)
|
Methods inherited from org.netbeans.modules.visualweb.css2.CssBox | protected void clearBottom(FormatContext context, CssValue cssSide)(Code)(Java Doc) protected void clearTop(FormatContext context, CssValue cssSide)(Code)(Java Doc) protected Rectangle computeBounds(Element componentRootElement, Rectangle bounds)(Code)(Java Doc) protected void computeHorizNonInlineNormalFlow(FormatContext context, int parentWidth)(Code)(Java Doc) void computeHorizontalLengths(FormatContext context)(Code)(Java Doc) protected void computeRectangles(Element componentRootElement, List<Rectangle> list)(Code)(Java Doc) final public Rectangle computeRegionBounds(Element regionElement, Rectangle bounds)(Code)(Java Doc) void computeVerticalLengths(FormatContext context)(Code)(Java Doc) protected CssValue computeWidthCssValue()(Code)(Java Doc) protected void considerDesignBorder()(Code)(Java Doc) protected CssBox findCssBox(int x, int y, int px, int py, int depth)(Code)(Java Doc) protected CssBox findCssBoxForComponentRootElement(Element componentRootElement)(Code)(Java Doc) public int getAbsoluteX()(Code)(Java Doc) public int getAbsoluteY()(Code)(Java Doc) protected int getBaseline()(Code)(Java Doc) public Color getBg()(Code)(Java Doc) public int getBlockHeight()(Code)(Java Doc) public int getBlockWidth()(Code)(Java Doc) public Rectangle getBorderWidthRectangle()(Code)(Java Doc) public CssBox getBox(int index)(Code)(Java Doc) public int getBoxCount()(Code)(Java Doc) public BoxType getBoxType()(Code)(Java Doc) public String getBoxTypeName()(Code)(Java Doc) public Rectangle getCBRectangle()(Code)(Java Doc) public Box[] getChildren()(Code)(Java Doc) protected int getCollapsedBottomMargin()(Code)(Java Doc) protected int getCollapsedTopMargin()(Code)(Java Doc) public Element getComponentRootElement()(Code)(Java Doc) public static Element getComponentRootElementForCssBox(CssBox cssBox)(Code)(Java Doc) public String getComputedStyles()(Code)(Java Doc) protected int getContentHeight()(Code)(Java Doc) public Dimension getContentSize()(Code)(Java Doc) protected int getContentWidth()(Code)(Java Doc) protected int getContentX()(Code)(Java Doc) protected int getContentY()(Code)(Java Doc) protected int getContributingBaseline()(Code)(Java Doc) public Insets getCssSizeInsets()(Code)(Java Doc) public Decoration getDecoration()(Code)(Java Doc) protected int getEffectiveBottomMargin()(Code)(Java Doc) public int getEffectiveTopMargin()(Code)(Java Doc) final public Element getElement()(Code)(Java Doc) public static Element getElementForComponentRootCssBox(CssBox cssBox)(Code)(Java Doc) protected int getExtentX()(Code)(Java Doc) protected int getExtentX2()(Code)(Java Doc) protected int getExtentY()(Code)(Java Doc) protected int getExtentY2()(Code)(Java Doc) public Rectangle getExtentsRectangle()(Code)(Java Doc) CssBox getFirstNormalBox()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public int getInternalResizeDirection(int x, int y)(Code)(Java Doc) public Interaction getInternalResizer(int x, int y)(Code)(Java Doc) protected int getIntrinsicHeight()(Code)(Java Doc) protected int getIntrinsicWidth()(Code)(Java Doc) public int getLeftMargin()(Code)(Java Doc) public Rectangle getMarginRectangle()(Code)(Java Doc) protected CssBox getNextNormalBlockBox()(Code)(Java Doc) protected CssBox getNextNormalBox()(Code)(Java Doc) public Rectangle getPaddingRectangle()(Code)(Java Doc) public boolean getPaintPositions()(Code)(Java Doc) public boolean getPaintSpaces()(Code)(Java Doc) public boolean getPaintText()(Code)(Java Doc) final public ContainerBox getParent()(Code)(Java Doc) protected int getParentIndex()(Code)(Java Doc) public Point getPosition()(Code)(Java Doc) public Rectangle getPositionRect()(Code)(Java Doc) public CssBox getPositionedBy()(Code)(Java Doc) protected int getPrefMinWidth()(Code)(Java Doc) protected int getPrefWidth()(Code)(Java Doc) protected CssBox getPrevNormalBlockBox()(Code)(Java Doc) protected CssBox getPrevNormalBox()(Code)(Java Doc) public Point getRelPosition()(Code)(Java Doc) public int getRightMargin()(Code)(Java Doc) public String getRules()(Code)(Java Doc) public Dimension getSize()(Code)(Java Doc) final public Element getSourceElement()(Code)(Java Doc) public String getStyles()(Code)(Java Doc) public HtmlTag getTag()(Code)(Java Doc) public WebForm getWebForm()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int getX()(Code)(Java Doc) public int getY()(Code)(Java Doc) public int getZ()(Code)(Java Doc) final protected boolean hasInitialFocus()(Code)(Java Doc) protected boolean hasNormalBlockLevelChildren()(Code)(Java Doc) protected void initialize()(Code)(Java Doc) protected void initializeBackground()(Code)(Java Doc) protected void initializeBackgroundColor()(Code)(Java Doc) protected void initializeBackgroundImage()(Code)(Java Doc) protected void initializeBorder()(Code)(Java Doc) protected void initializeContentSize()(Code)(Java Doc) protected void initializeDesignBean()(Code)(Java Doc) protected void initializeHorizontalWidths(FormatContext context)(Code)(Java Doc) protected void initializeInvariants()(Code)(Java Doc) protected void initializeMargins()(Code)(Java Doc) protected void initializePadding()(Code)(Java Doc) protected void initializeZOrder()(Code)(Java Doc) public boolean isAbsolutelyPositioned()(Code)(Java Doc) public boolean isBlockLevel()(Code)(Java Doc) protected boolean isBorderSizeIncluded()(Code)(Java Doc) public boolean isClearBox()(Code)(Java Doc) public boolean isGrid()(Code)(Java Doc) public boolean isInlineBox()(Code)(Java Doc) protected boolean isPlaceHolder()(Code)(Java Doc) public boolean isPositioned()(Code)(Java Doc) public boolean isReplacedBox()(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public void paint(Graphics g, int px, int py)(Code)(Java Doc) protected void paintBackground(Graphics g, int x, int y)(Code)(Java Doc) protected void paintBox(Graphics g, int x, int y, int w, int h)(Code)(Java Doc) protected void paintDebugPositioning(Graphics g)(Code)(Java Doc) protected void paintDecoration(Graphics g, int x, int y)(Code)(Java Doc) final protected void paintFocusWaterMark(Graphics g, int x, int y)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) void putBoxReference(Element element, CssBox box)(Code)(Java Doc) protected void relayout(FormatContext context)(Code)(Java Doc) protected void setContainingBlock(int x, int y, int width, int height)(Code)(Java Doc) final public void setLocation(int x, int y)(Code)(Java Doc) public void setMargins(int leftMargin, int effectiveTopMargin)(Code)(Java Doc) public void setPaintPositions(boolean paintPositioning)(Code)(Java Doc) public void setPaintSpaces(boolean paintSpaces)(Code)(Java Doc) public void setPaintText(boolean paintText)(Code)(Java Doc) final void setParent(ContainerBox parent)(Code)(Java Doc) void setParentIndex(int idx)(Code)(Java Doc) void setPositionedBy(CssBox positionedBy)(Code)(Java Doc) void setX(int x)(Code)(Java Doc) void setY(int y)(Code)(Java Doc) protected int shrinkToFit(int availableWidth, FormatContext context)(Code)(Java Doc) final public String toString()(Code)(Java Doc) protected void uncomputeWidthCssValue()(Code)(Java Doc) protected void updateAutoContentSize()(Code)(Java Doc) protected void updateExtents(int px, int py, int depth)(Code)(Java Doc)
|
|
|