| java.lang.Object org.netbeans.modules.visualweb.css2.CssBox org.netbeans.modules.visualweb.css2.ContainerBox
All known Subclasses: org.netbeans.modules.visualweb.css2.LineBoxGroup, org.netbeans.modules.visualweb.css2.ObjectBox, org.netbeans.modules.visualweb.css2.DocumentBox, org.netbeans.modules.visualweb.css2.LineBox, org.netbeans.modules.visualweb.css2.TableBox, org.netbeans.modules.visualweb.css2.StringBox, org.netbeans.modules.visualweb.css2.FormComponentBox, org.netbeans.modules.visualweb.css2.FieldSetBox, org.netbeans.modules.visualweb.css2.ListBox,
ContainerBox | public class ContainerBox extends CssBox (Code) | | A CSS box which can hold children. Also a box which performs Css Layout!
author: Tor Norbye |
Method Summary | |
protected void | addBox(CssBox box, CssBox prevBox, CssBox nextBox) | protected void | addBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox) Add the given child box to this parent box list, and
recursively create its children / box hiearchy. | protected void | addGrayItalicText(CreateContext context, Element styleElement, String text) | void | addNode(CreateContext context, Node node, Element sourceElement, CssBox prevBox, CssBox nextBox) | protected void | addSiblingBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox) Add the given child box to this parent box list, and
recursively create its children / box hiearchy. | protected void | addText(CreateContext context, Text textNode, Element styleElement, String text) | boolean | containsChild(CssBox cssBox) | protected void | createChildren(CreateContext context) Recursively create and add boxes for all the children elements
of the element corresponding to this box. | public WebForm[] | findExternalForms() Finds all external form in this box tree. | void | finishAllRelatives(FormatContext context) | void | finishLineBox(CreateContext context) Finish the current line box we're working on; a new
addToLineBox call will generate a new line. | public CssBox | getBox(int index) Return the box with the given index. | public int | getBoxCount() Return the list of boxes "managed" by this box. | protected BoxList | getBoxList() | public CssBox[] | getBoxes() | protected CssBox[] | getBoxesToRemove(CssBox toRemove) XXX #112576. | public int | getPrefMinWidth() | public int | getPrefWidth() | protected boolean | hasNormalBlockLevelChildren() | protected void | initialize() | protected void | initializeBackground() | protected void | initializeGrid() | protected void | initializeHorizontalWidths(FormatContext context) Very similar to relayout(context) but does not compute
vertical dimensions, and does not position the boxes. | public boolean | isGrid() | protected boolean | isOpaqueBox() Return true iff the given box is "opaque", e.g. | protected void | layoutChild(CssBox box, FormatContext context, boolean handleChildren) | public void | list(PrintStream out, int indent) Prints a listing of this container box. | public void | list(PrintWriter out, int indent) Prints a listing of this container box. | protected CssBox | notifyChildResize(CssBox child, FormatContext context) Notify the parent that the given child has been resized. | public void | paint(Graphics g, int px, int py) | protected void | paintBox(Graphics g, int x, int y, int w, int h) | protected void | paintGrid(Graphics g, int x, int y, int w, int h) | protected void | positionBox(CssBox box, FormatContext context) Position the box - set its x and y values relative to the
parent's border edge. | static void | printLayout(CssBox b, StringBuffer sb, int depth) | public void | relayout(FormatContext context) Recompute the layout. | protected boolean | removeBox(CssBox box) | protected void | removeBoxes() | void | setContainingBlock(CssBox box, FormatContext context) Set the containing block for the given box. | public void | setGrid(boolean grid) | protected void | setProbableChildCount(int children) This method can be called to make a hint as to how many
children will be added to this box. |
COLLAPSE | final static boolean COLLAPSE(Code) | | |
clipOverflow | protected boolean clipOverflow(Code) | | |
grid | protected boolean grid(Code) | | |
addBox | protected void addBox(CssBox box, CssBox prevBox, CssBox nextBox)(Code) | | Add a new box to the list of boxes managed by this box
|
addBoxNode | protected void addBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox)(Code) | | Add the given child box to this parent box list, and
recursively create its children / box hiearchy.
|
addSiblingBoxNode | protected void addSiblingBoxNode(HtmlTag tag, CssBox box, CreateContext context, CssBox prevBox, CssBox nextBox)(Code) | | Add the given child box to this parent box list, and
recursively create its children / box hiearchy.
Deal with "prevBox" and "nextBox" to determine insertion
in the middle of the box hierarchy; used during insert events.
|
addText | protected void addText(CreateContext context, Text textNode, Element styleElement, String text)(Code) | | For a given TEXT_NODE/CDATA_SECTION_NODE, add the text to the
current line box
|
createChildren | protected void createChildren(CreateContext context)(Code) | | Recursively create and add boxes for all the children elements
of the element corresponding to this box. In other words, build
the box hierarchy. This will not do layout on the boxes - assigning
positions, sizes, or flowing inline content. org.netbeans.modules.visualweb.css2.FacesSupport.printNode(element)
|
findExternalForms | public WebForm[] findExternalForms()(Code) | | Finds all external form in this box tree.
|
finishLineBox | void finishLineBox(CreateContext context)(Code) | | Finish the current line box we're working on; a new
addToLineBox call will generate a new line.
|
getBox | public CssBox getBox(int index)(Code) | | Return the box with the given index. There is no particular
significance to the index other than identifying a box; in particular
boxes with adjacent indices may not be adjacent visually.
|
getBoxCount | public int getBoxCount()(Code) | | Return the list of boxes "managed" by this box. Managed simply
means that the coordinates in the boxes are all relative to this
one.
|
getPrefMinWidth | public int getPrefMinWidth()(Code) | | |
getPrefWidth | public int getPrefWidth()(Code) | | |
hasNormalBlockLevelChildren | protected boolean hasNormalBlockLevelChildren()(Code) | | |
initialize | protected void initialize()(Code) | | |
initializeBackground | protected void initializeBackground()(Code) | | |
initializeGrid | protected void initializeGrid()(Code) | | Initialize whether this box should show a visual grid and should receive
grid mode handling from mouse operations
|
initializeHorizontalWidths | protected void initializeHorizontalWidths(FormatContext context)(Code) | | Very similar to relayout(context) but does not compute
vertical dimensions, and does not position the boxes.
Used to initialize box dimensions for computation
of minimum widths when we're computing minimum widths
for table cells, etc.
|
isGrid | public boolean isGrid()(Code) | | Indicate whether this is a grid-positioned box
|
isOpaqueBox | protected boolean isOpaqueBox()(Code) | | Return true iff the given box is "opaque", e.g. paints its own
contents, in which case we don't want to for example make it paint
its own background to erase grid dots underneath
|
notifyChildResize | protected CssBox notifyChildResize(CssBox child, FormatContext context)(Code) | | Notify the parent that the given child has been resized.
This might cause a reflow.
The topmost box in the hierarchy which had its size changed. |
paint | public void paint(Graphics g, int px, int py)(Code) | | The iframe box should be clipped
|
paintBox | protected void paintBox(Graphics g, int x, int y, int w, int h)(Code) | | |
paintGrid | protected void paintGrid(Graphics g, int x, int y, int w, int h)(Code) | | |
positionBox | protected void positionBox(CssBox box, FormatContext context)(Code) | | Position the box - set its x and y values relative to the
parent's border edge. Positioning depends on the box' BoxType.
This method should get called after margins etc. have been
computed properly (e.g. all AUTO values must be resolved).
|
relayout | public void relayout(FormatContext context)(Code) | | Recompute the layout. Once the layout routine gets to a point
where the child layout matches the computed layout, it will leave
that tree alone. Thus, only the portions of the layout below
this box that need to be recomputed are updated
Parameters: cx - X position of containing block Parameters: cy - Y position of containing block Parameters: cw - Width of containing block Parameters: ch - Height of containing block |
removeBox | protected boolean removeBox(CssBox box)(Code) | | Remove a particular box from the children list
|
removeBoxes | protected void removeBoxes()(Code) | | Remove all the children boxes from the box list
|
setContainingBlock | void setContainingBlock(CssBox box, FormatContext context)(Code) | | Set the containing block for the given box.
See section 10.1 of the CSS2.1 spec for details.
|
setGrid | public void setGrid(boolean grid)(Code) | | Set whether this is a grid-positioned box
|
setProbableChildCount | protected void setProbableChildCount(int children)(Code) | | This method can be called to make a hint as to how many
children will be added to this box. If the box already has
children, this method has no effect.
|
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)
|
|
|