to.etc.domui.component.layout
Class CaptionedPanel

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.NodeContainer
              extended by to.etc.domui.dom.html.Div
                  extended by to.etc.domui.component.layout.CaptionedPanel
All Implemented Interfaces:
java.lang.Iterable<NodeBase>, IModelBinding, INodeErrorDelegate, IDraggable, IDropTargetable
Direct Known Subclasses:
ErrorPanel

public class CaptionedPanel
extends Div

A panel with a beveled caption above it. The caption defaults to some text but can be anything actually. Both the title and the content of this panel can be changed and can contain any other node structure. Simple constructors exist to quickly render a panel around a structure. The parameterless constructor expects the title of the panel to be set separately; the content is initially created as a Div, and can either be replaced or it can be added to.

Author:
Frits Jalvingh Created on Jun 1, 2008

Constructor Summary
CaptionedPanel()
          Create an empty panel without a title and with an empty Div as the content node.
CaptionedPanel(NodeBase title, NodeContainer content)
          Create a panel with both the title and the container as a Node structure.
CaptionedPanel(NodeContainer title)
           
CaptionedPanel(NodeContainer title, NodeContainer content)
           
CaptionedPanel(java.lang.String title)
          Create a panel with a title and an empty Div as the container.
CaptionedPanel(java.lang.String title, NodeContainer content)
          Create a panel with the specified String title and a content node.
 
Method Summary
 void createContent()
           
 NodeContainer getContent()
          Return the current content container; it can be added to.
 NodeContainer getTitleContainer()
          Get the current title container.
 void setContentContainer(NodeContainer c)
          Replaces the current content container with a different one.
 void setTitle(java.lang.String txt)
          Set the title for this panel as a String.
 void setTitleContainer(NodeContainer c)
          Replaces the current title container with a different one.
 
Methods inherited from class to.etc.domui.dom.html.Div
afterCreateContent, componentHandleWebAction, fadeIn, fadeOut, getCustomUpdatesCallJS, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visit
 
Methods inherited from class to.etc.domui.dom.html.NodeContainer
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, acceptRequestParameter, addCssClass, addGlobalMessage, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, findComponentBundle, getActualID, getAllocationTracepoint, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isBuilt, isFocusRequested, isStretchHeight, onAddedToPage, onBeforeFullRender, onForceRebuild, onHeaderContributors, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setStretchHeight, setTestID, setUserObject, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaptionedPanel

public CaptionedPanel(java.lang.String title,
                      NodeContainer content)
Create a panel with the specified String title and a content node.

Parameters:
title -
content -

CaptionedPanel

public CaptionedPanel(NodeContainer title)

CaptionedPanel

public CaptionedPanel(NodeContainer title,
                      NodeContainer content)

CaptionedPanel

public CaptionedPanel(NodeBase title,
                      NodeContainer content)
Create a panel with both the title and the container as a Node structure.

Parameters:
title -
content -

CaptionedPanel

public CaptionedPanel(java.lang.String title)
Create a panel with a title and an empty Div as the container.

Parameters:
title -

CaptionedPanel

public CaptionedPanel()
Create an empty panel without a title and with an empty Div as the content node.

Method Detail

createContent

@OverridingMethodsMustInvokeSuper
public void createContent()
                   throws java.lang.Exception
Overrides:
createContent in class NodeBase
Throws:
java.lang.Exception

getContent

public NodeContainer getContent()
Return the current content container; it can be added to.

Returns:

getTitleContainer

public NodeContainer getTitleContainer()
Get the current title container.

Returns:

setTitle

public void setTitle(java.lang.String txt)
Set the title for this panel as a String. This replaces the current node with a Div(TextNode) node.

Overrides:
setTitle in class NodeBase
See Also:
NodeBase.setTitle(java.lang.String)

setTitleContainer

public void setTitleContainer(NodeContainer c)
Replaces the current title container with a different one.

Parameters:
c -

setContentContainer

public void setContentContainer(NodeContainer c)
Replaces the current content container with a different one.

Parameters:
c -