Class HPanel
This container class extends CPanel to provide a table-based horizontal layout where elements are distributed across multiple cells in a single row. Each cell can have configurable width, alignment, and content. Useful for creating horizontal layouts like toolbars, headers, or multi-column content areas.
Features:
- Single-row, multi-cell horizontal layout
- Configurable cell widths (fixed, percentage, or auto)
- Cell-specific width constraints (min, max)
- Vertical alignment control (default: middle)
- Automatic spacing between cells
- Dynamic cell addition and removal
Usage:
HPanel panel = new HPanel(3); // 3 cells panel.setCellWidth(0, 200); // First cell 200px panel.setCellWidth(1, "auto"); // Second cell auto panel.setCellWidth(2, "30%"); // Third cell 30% panel.addElement(0, logo); panel.addElement(1, title); panel.addElement(2, toolbar);
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intaddCell()Adds a new cell to the panel.final intaddCell(int width) Adds a new cell with a fixed pixel width.final intAdds a new cell with a CSS width value.voidaddCells(int numCells) Adds multiple cells to the panel.addElement(int cellIndex, Element element) Adds an element to the specified cell.final HPaneladdElement(Element element) Adds a child element to this element.final voidAdds a text node to this panel.final voidAdds styled text to this panel using a CssStyle object.final voidAdds styled text to this panel using a CSS style string.getElement(int index) Returns the child element at the specified index.getElement(int cellIndex, int elementIndex) Returns an element from a specific cell at a specific index.Returns the direct children of this element.getElements(int cellIndex) Returns all elements from a specific cell.voidgetHtml(StringBuilder buffer) Generates the HTML representation of this element, including state-based styles and interactive cursor attributes.intReturns the number of cells in the panel.final intbooleanChecks if this element has any child elements.protected final voidHook method called during element initialization.final HPanelinsertElement(int index, Element element) Inserts a child element at the specified index.protected final voidHook method called after the element has been created.protected final voidprewrite()Hook method called before the element is written to output.voidRemoves all child elements from this element.voidremoveAllElements(int cellIndex) Removes all elements from the specified cell.final voidsetCellWidth(int cellIndex, int width) Sets the width of a cell in pixels.final voidsetCellWidth(int cellIndex, String width) Sets the width of a cell using a CSS value.protected HPanelsetElement(Element element) Replaces the content of this panel with the specified element.final voidsetMaxCellWidth(int cellIndex, int width) Sets the maximum width of a cell in pixels.final voidsetMaxCellWidth(int cellIndex, String width) Sets the maximum width of a cell using a CSS value.final voidsetMinCellWidth(int cellIndex, int width) Sets the minimum width of a cell in pixels.final voidsetMinCellWidth(int cellIndex, String width) Sets the minimum width of a cell using a CSS value.final voidsetNumCells(int numCells) Sets the number of cells in the panel, removing any existing cells.final voidsetSpacing(int spacing) final voidSets the text content of this panel, replacing any existing content.final voidSets styled text content of this panel using a CssStyle object, replacing any existing content.final voidSets styled text content of this panel using a Font, replacing any existing content.final voidSets styled text content of this panel using a CSS style string, replacing any existing content.final voidsetVerticalAlign(int cellIndex, VerticalAlign align) Sets the vertical alignment for a specific cell.setVerticalAlign(VerticalAlign align) Sets the default vertical alignment for all cells.final voidsetWrapCellText(int cellIndex, boolean flag) Methods inherited from class com.oorian.html.StyledElement
addClass, addStyle, addStyle, addStyleAttribute, addTransition, animate, clearTransitions, getActiveStyle, getCssClass, getDisabledStyle, getFocusStyle, getFocusVisibleStyle, getHoverStyle, getStyle, getStyleAttribute, hidden, hide, isDisplayed, isTransitionForwardActive, onHide, onRemovedFromPage, onShow, removeClass, setActiveStyle, setAlignContent, setAlignContent, setAlignItems, setAlignItems, setAlignSelf, setAlignSelf, setAnimation, setAnimationDelay, setAnimationDelay, setAnimationDelay, setAnimationDirection, setAnimationDirection, setAnimationDuration, setAnimationDuration, setAnimationDuration, setAnimationFillMode, setAnimationFillMode, setAnimationIterationCount, setAnimationIterationCount, setAnimationIterationCount, setAnimationName, setAnimationPlayState, setAnimationPlayState, setAnimationTimingFunction, setAnimationTimingFunction, setAnimationTimingFunction, setAnimationTimingFunction, setBackdropFilter, setBackdropFilter, setBackfaceVisibility, setBackfaceVisibility, setBackground, setBackground, setBackgroundAttachment, setBackgroundAttachment, setBackgroundBlendMode, setBackgroundBlendMode, setBackgroundClip, setBackgroundClip, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBackgroundOrigin, setBackgroundOrigin, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundRepeat, setBackgroundRepeat, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBlur, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottomColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadius, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderBottomRightRadius, setBorderBottomRightRadius, setBorderBottomStyle, setBorderBottomStyle, setBorderBottomWidth, setBorderBottomWidth, setBorderBottomWidth, setBorderBottomWidth, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderImage, setBorderImage, setBorderImageOutset, setBorderImageRepeat, setBorderImageSlice, setBorderImageSource, setBorderImageWidth, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeftColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftStyle, setBorderLeftWidth, setBorderLeftWidth, setBorderLeftWidth, setBorderLeftWidth, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRightColor, setBorderRightColor, setBorderRightStyle, setBorderRightStyle, setBorderRightWidth, setBorderRightWidth, setBorderRightWidth, setBorderRightWidth, setBorderStyle, setBorderStyle, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTopColor, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setBorderTopRightRadius, setBorderTopRightRadius, setBorderTopStyle, setBorderTopStyle, setBorderTopWidth, setBorderTopWidth, setBorderTopWidth, setBorderTopWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBottom, setBottom, setBottom, setBoxShadow, setBoxShadow, setBoxShadow, setBoxShadow, setBoxShadow, setBoxSizing, setBoxSizing, setBreakAfter, setBreakBefore, setBreakInside, setBrightness, setClass, setClear, setClear, setClip, setClipPath, setClipPath, setColGap, setColGap, setColor, setColor, setColumnCount, setColumnCount, setColumnFill, setColumnFill, setColumnGap, setColumnRule, setColumnRuleColor, setColumnRuleColor, setColumnRuleStyle, setColumnRuleStyle, setColumnRuleWidth, setColumnRuleWidth, setColumns, setColumns, setColumns, setColumnSpan, setColumnWidth, setColumnWidth, setColumnWidth, setContrast, setCounterIncrement, setCounterReset, setCursor, setCursor, setDirection, setDirection, setDisabledStyle, setDisplay, setDisplay, setFilter, setFilter, setFilterOpacity, setFlex, setFlexBasis, setFlexDirection, setFlexDirection, setFlexFlow, setFlexGrow, setFlexGrow, setFlexShrink, setFlexShrink, setFlexWrap, setFlexWrap, setFloat, setFloat, setFocusStyle, setFocusVisibleStyle, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFontFace, setFontFamily, setFontFamily, setFontFeatureSettings, setFontKerning, setFontLanguageOverride, setFontSize, setFontSize, setFontSize, setFontSizeAdjust, setFontStretch, setFontStretch, setFontStyle, setFontStyle, setFontSynthesis, setFontVariant, setFontVariant, setFontVariantAlternates, setFontVariantCaps, setFontVariantEastAsian, setFontVariantLigatures, setFontVariantNumeric, setFontVariantPosition, setFontWeight, setFontWeight, setGap, setGap, setGap, setGap, setGrayscale, setHangingPunctuation, setHangingPunctuation, setHeight, setHeight, setHeight, setHoverStyle, setHueRotate, setHyphens, setImageOrientation, setImageRendering, setImageResolution, setImeMode, setInvert, setJustifyContent, setJustifyContent, setKeyFrames, setLeft, setLeft, setLeft, setLetterSpacing, setLetterSpacing, setLetterSpacing, setLetterSpacing, setLineBreak, setLineHeight, setLineHeight, setLineHeight, setLineHeight, setMargin, setMargin, setMargin, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMarginTop, setMark, setMarkAfter, setMarkBefore, setMarks, setMarqueeDirection, setMarqueePlayCount, setMarqueeSpeed, setMarqueeStyle, setMask, setMaskType, setMaxHeight, setMaxHeight, setMaxHeight, setMaxHeightToWindowHeight, setMaxWidth, setMaxWidth, setMaxWidth, setMaxWidthToWindowWidth, setMinHeight, setMinHeight, setMinHeight, setMinHeightToWindowHeight, setMinWidth, setMinWidth, setMinWidth, setMinWidthToWindowWidth, setNavDown, setNavIndex, setNavIndex, setNavLeft, setNavRight, setNavUp, setObjectFit, setObjectPosition, setOnClickNavigateBack, setOnClickNavigateBack, setOnClickNavigateBack, setOnClickNavigateForward, setOnClickNavigateForward, setOnClickNavigateForward, setOnClickNavigateTo, setOnDblClick, setOnDblClickChange, setOpacity, setOpacity, setOrder, setOrder, setOrphans, setOutline, setOutline, setOutline, setOutline, setOutlineColor, setOutlineColor, setOutlineOffset, setOutlineOffset, setOutlineOffset, setOutlineStyle, setOutlineStyle, setOutlineWidth, setOutlineWidth, setOutlineWidth, setOutlineWidth, setOverflow, setOverflow, setOverflow, setOverflowWrap, setOverflowX, setOverflowX, setOverflowY, setOverflowY, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPaddingTop, setPageBreakAfter, setPageBreakAfter, setPageBreakBefore, setPageBreakBefore, setPageBreakInside, setPageBreakInside, setPerspective, setPerspective, setPerspective, setPerspectiveOrigin, setPerspectiveOrigin, setPerspectiveOrigin, setPerspectiveOrigin, setPhonemes, setPosition, setPosition, setPosition, setPosition, setPosition, setQuotes, setResize, setResize, setResizeToWindowHeight, setResizeToWindowHeight, setResizeToWindowWidth, setRest, setRestAfter, setRestBefore, setRight, setRight, setRight, setRotate, setRotate, setRowGap, setRowGap, setSaturate, setScale, setScale, setSepia, setShow, setSize, setSize, setSize, setSkewX, setSkewY, setStyle, setStyle, setTabSize, setTabSize, setTabSize, setTabSize, setTextAlign, setTextAlign, setTextAlignLast, setTextAlignLast, setTextCombineUpright, setTextCombineWeight, setTextDecoration, setTextDecoration, setTextDecorationColor, setTextDecorationColor, setTextDecorationLine, setTextDecorationLine, setTextDecorationStyle, setTextDecorationStyle, setTextIndent, setTextIndent, setTextIndent, setTextIndent, setTextJustify, setTextJustify, setTextOrientation, setTextOverflow, setTextOverflow, setTextSelectDisabled, setTextShadow, setTextShadow, setTextShadow, setTextShadow, setTextShadow, setTextTransform, setTextTransform, setTextUnderlinePosition, setTop, setTop, setTop, setTransform, setTransform, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformStyle, setTransformStyle, setTransition, setTransitionDelay, setTransitionDelay, setTransitionDelay, setTransitionDuration, setTransitionDuration, setTransitionDuration, setTransitionProperty, setTransitionTimingFunction, setTransitionTimingFunction, setTransitionTimingFunction, setTransitionTimingFunction, setTranslateX, setTranslateY, setTranslateZ, setUnicodeBidi, setUnicodeBidi, setVerticalAlign, setVisibility, setVisibility, setVoiceBalance, setVoiceDuration, setVoicePitch, setVoicePitchRange, setVoiceRate, setVoiceStress, setVoiceVolume, setWhiteSpace, setWhiteSpace, setWidows, setWidth, setWidth, setWidth, setWordBreak, setWordBreak, setWordSpacing, setWordSpacing, setWordSpacing, setWordSpacing, setWordWrap, setWordWrap, setWritingMode, setZIndex, setZIndex, show, shown, stopAnimation, transitionForward, transitionForward, transitionReverse, transitionReverse, updateStyle, updateStyle, updateStyleIfChangedMethods inherited from class com.oorian.html.VisualElement
clearOnClick, click, disable, enable, getAccessKey, getAutoCapitalize, getEnterKeyHint, getInputMode, getPopover, getRole, getTabIndex, getTitle, isAutoFocus, isContentEditable, isDisabled, isDraggable, isHidden, isInert, isSpellCheck, onDisabled, onEnabled, setAccessKey, setAriaAtomic, setAriaBusy, setAriaChecked, setAriaCheckedMixed, setAriaControls, setAriaCurrent, setAriaDescribedBy, setAriaDisabled, setAriaErrorMessage, setAriaExpanded, setAriaHasPopup, setAriaHasPopup, setAriaHidden, setAriaInvalid, setAriaLabel, setAriaLabelledBy, setAriaLevel, setAriaLive, setAriaModal, setAriaOwns, setAriaPressed, setAriaRequired, setAriaSelected, setAriaValueRange, setAriaValueText, setAutoCapitalize, setAutoFocus, setConsumeEvent, setContentEditable, setDisabled, setDraggable, setDropAllowed, setEnterKeyHint, setFocus, setHidden, setInert, setInputMode, setOnAnimationCancel, setOnAnimationEnd, setOnAnimationIteration, setOnAnimationStart, setOnAuxClick, setOnBeforeInput, setOnBeforeToggle, setOnBlur, setOnChange, setOnClick, setOnClickChange, setOnCompositionEnd, setOnCompositionStart, setOnCompositionUpdate, setOnContextMenu, setOnCopy, setOnCut, setOnDocumentResize, setOnFocus, setOnFocusIn, setOnFocusOut, setOnFormData, setOnGotPointerCapture, setOnInput, setOnInvalid, setOnKeyDown, setOnKeyPressed, setOnKeyUp, setOnLostPointerCapture, setOnMouseDown, setOnMouseEnter, setOnMouseLeave, setOnMouseMove, setOnMouseOut, setOnMouseOutChangeClass, setOnMouseOutChangeStyle, setOnMouseOutChangeStyle, setOnMouseOver, setOnMouseOverChangeClass, setOnMouseOverChangeStyle, setOnMouseOverChangeStyle, setOnMouseOverShow, setOnMouseUp, setOnPageLoad, setOnPaste, setOnPointerCancel, setOnPointerDown, setOnPointerEnter, setOnPointerLeave, setOnPointerMove, setOnPointerOut, setOnPointerOver, setOnPointerUp, setOnResize, setOnScroll, setOnScrollEnd, setOnSelect, setOnSelectionChange, setOnSelectStart, setOnToggle, setOnTouchCancel, setOnTouchEnd, setOnTouchMove, setOnTouchStart, setOnTransitionCancel, setOnTransitionEnd, setOnTransitionRun, setOnTransitionStart, setOnWheel, setOnWindowResize, setPopover, setRole, setRole, setSpellCheck, setTabIndex, setTitle, setTooltipMethods inherited from class com.oorian.html.Element
addAttribute, addAttribute, addAttribute, addAttribute, addLineBreak, addLineOfText, addLineOfText, addLineOfText, addParagraph, addParagraph, addSpacer, addText, assignId, containsElement, containsElement, create, dispatchEvent, dispatchEvent, dispatchEvent, dispatchEvent, equals, excludeId, executeJs, executeJs, executeJs, getAccept, getAllElements, getAncestor, getAttribute, getAttributes, getComponent, getDir, getElementById, getElementCount, getElementCount, getElements, getElementsByComponentName, getElementsByTagName, getHtml, getId, getInnerHtml, getInnerHtml, getIs, getItemId, getItemProp, getItemRef, getItemType, getLang, getNextSibling, getPage, getParent, getPart, getPrevSibling, getSlot, getTagName, getTextContent, getUrl, hasAttribute, isChildOf, isClosedTag, isCreated, isDescendantOf, isDescendantOf, isInitialized, isItemScope, isTranslate, onCallback, onElementAdded, onElementRemoved, onHashChange, onHidden, onInitialized, onJsReturn, onPageLoaded, onPageUnloaded, onRefresh, onShown, onUpdated, onUserEvent, recreate, refresh, refresh, registerAddition, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerSubtraction, registerUpdate, removeAttribute, removeAttribute, removeElement, removeElement, removeFromParent, requestCallback, requestCallback, requestCallback, requestCallback, resetId, scrollTo, scrollToBottom, scrollToTop, self, sendCommand, sendUpdate, setAccept, setComponent, setDir, setDir, setId, setIs, setItemId, setItemProp, setItemRef, setItemScope, setItemType, setLang, setOnError, setOnLoad, setPage, setParent, setPart, setSlot, setTagName, setTranslate, toString, unregisterListener, update, updateAttributes
-
Field Details
-
LAYOUT_FIXED
Fixed table layout mode - fixed width columns- See Also:
-
LAYOUT_AUTO
Auto table layout mode - automatic column sizing- See Also:
-
LAYOUT_INHERIT
Inherited table layout mode - inherit from parent- See Also:
-
-
Constructor Details
-
HPanel
public HPanel()Creates a new horizontal panel with a single empty row. -
HPanel
public HPanel(int cells) Creates a new horizontal panel with the specified number of cells.- Parameters:
cells- The number of cells to create.
-
-
Method Details
-
setNumCells
public final void setNumCells(int numCells) Sets the number of cells in the panel, removing any existing cells.- Parameters:
numCells- The number of cells to create.
-
setCellWidth
public final void setCellWidth(int cellIndex, int width) Sets the width of a cell in pixels.- Parameters:
cellIndex- The zero-based cell index.width- The width in pixels.
-
setCellWidth
Sets the width of a cell using a CSS value.- Parameters:
cellIndex- The zero-based cell index.width- The CSS width value (e.g., "100px", "50%", "auto").
-
setMinCellWidth
public final void setMinCellWidth(int cellIndex, int width) Sets the minimum width of a cell in pixels.- Parameters:
cellIndex- The zero-based cell index.width- The minimum width in pixels.
-
setMinCellWidth
Sets the minimum width of a cell using a CSS value.- Parameters:
cellIndex- The zero-based cell index.width- The CSS min-width value (e.g., "100px", "50%").
-
setMaxCellWidth
public final void setMaxCellWidth(int cellIndex, int width) Sets the maximum width of a cell in pixels.- Parameters:
cellIndex- The zero-based cell index.width- The maximum width in pixels.
-
setMaxCellWidth
Sets the maximum width of a cell using a CSS value.- Parameters:
cellIndex- The zero-based cell index.width- The CSS max-width value (e.g., "200px", "80%").
-
addCell
public final int addCell()Adds a new cell to the panel.- Returns:
- The index of the newly added cell.
-
addCell
public final int addCell(int width) Adds a new cell with a fixed pixel width.- Parameters:
width- The cell width in pixels.- Returns:
- The index of the newly added cell.
-
addCell
Adds a new cell with a CSS width value.- Parameters:
width- The CSS width value (e.g., "100px", "25%", "auto").- Returns:
- The index of the newly added cell.
-
addCells
public void addCells(int numCells) Adds multiple cells to the panel.- Parameters:
numCells- The number of cells to add.
-
addElement
Adds an element to the specified cell.- Parameters:
cellIndex- The zero-based cell index.element- The element to add.- Returns:
- The cell containing the element.
-
removeAllElements
public void removeAllElements()Description copied from class:ElementRemoves all child elements from this element.Each child is unlinked and registered for DOM removal if the element is attached to a page.
- Overrides:
removeAllElementsin classElement<HPanel>
-
removeAllElements
public void removeAllElements(int cellIndex) Removes all elements from the specified cell.- Parameters:
cellIndex- The zero-based cell index.
-
setVerticalAlign
Sets the default vertical alignment for all cells.- Parameters:
align- The VerticalAlign value.- Returns:
- This element for method chaining.
-
setVerticalAlign
Sets the vertical alignment for a specific cell.- Parameters:
cellIndex- The zero-based cell index.align- The VerticalAlign value.
-
getNumberOfCells
public int getNumberOfCells()Returns the number of cells in the panel.- Returns:
- The cell count.
-
getElement
Description copied from class:ElementReturns the child element at the specified index.- Parameters:
index- The zero-based index of the child.- Returns:
- The child element, or
nullif index is out of bounds.
-
getElement
Returns an element from a specific cell at a specific index.- Parameters:
cellIndex- The zero-based cell index.elementIndex- The zero-based element index within the cell.- Returns:
- The element, or null if not found.
-
getElements
Returns all elements from a specific cell.- Parameters:
cellIndex- The zero-based cell index.- Returns:
- An Elements collection containing the cell's elements.
-
onCreated
protected final void onCreated()Description copied from class:ElementHook method called after the element has been created.Override this method to perform actions after creation is complete.
-
setSpacing
public final void setSpacing(int spacing) -
addElement
Description copied from class:ElementAdds a child element to this element.The child is removed from its previous parent if it has one, then added to this element's children. If this element is already attached to a page, the child is also attached and registered for DOM addition.
- Overrides:
addElementin classElement<T extends com.oorian.html.containers.CPanel<T>>- Parameters:
element- The child element to add.- Returns:
- this element for method chaining
-
insertElement
Description copied from class:ElementInserts a child element at the specified index.The child is removed from its previous parent if it has one, then inserted at the specified index in this element's children.
- Overrides:
insertElementin classElement<T extends com.oorian.html.containers.CPanel<T>>- Parameters:
index- The index at which to insert the child.element- The child element to insert.- Returns:
- this element for method chaining
-
getSpacing
public final int getSpacing() -
setWrapCellText
public final void setWrapCellText(int cellIndex, boolean flag) -
prewrite
protected final void prewrite()Description copied from class:ElementHook method called before the element is written to output.Override this method to perform any last-minute configuration before rendering.
-
getHtml
Description copied from class:StyledElementGenerates the HTML representation of this element, including state-based styles and interactive cursor attributes.- Overrides:
getHtmlin classStyledElement<T extends com.oorian.html.containers.Panel<T>>- Parameters:
buffer- The StringBuilder to append the HTML output to.
-
setElement
Replaces the content of this panel with the specified element.- Overrides:
setElementin classElement<T extends com.oorian.html.containers.Panel<T>>- Parameters:
element- The element to set as the sole content.- Returns:
- This element for method chaining.
-
hasElements
public boolean hasElements()Description copied from class:ElementChecks if this element has any child elements.- Overrides:
hasElementsin classElement<T extends com.oorian.html.containers.Panel<T>>- Returns:
trueif this element has children,falseotherwise.
-
getElements
Description copied from class:ElementReturns the direct children of this element.- Overrides:
getElementsin classElement<T extends com.oorian.html.containers.Panel<T>>- Returns:
- A copy of the children collection.
-
addText
Adds a text node to this panel. -
addText
Adds styled text to this panel using a CSS style string. -
addText
Adds styled text to this panel using a CssStyle object. -
setText
Sets the text content of this panel, replacing any existing content. -
setText
Sets styled text content of this panel using a CSS style string, replacing any existing content. -
setText
Sets styled text content of this panel using a Font, replacing any existing content. -
setText
Sets styled text content of this panel using a CssStyle object, replacing any existing content. -
initialize
protected final void initialize()Description copied from class:ElementHook method called during element initialization.Override this method to set up the element's structure by adding child elements. This is called before
Element.create()and only once during the element's lifecycle.- Overrides:
initializein classStyledElement<T extends com.oorian.html.containers.Panel<T>>
-