Package io.guise.framework.platform.web
Class AbstractWebLayoutComponentDepictor<C extends LayoutComponent>
- java.lang.Object
-
- io.guise.framework.platform.AbstractDepictor<C>
-
- io.guise.framework.platform.AbstractComponentDepictor<C>
-
- io.guise.framework.platform.web.AbstractWebComponentDepictor<C>
-
- io.guise.framework.platform.web.AbstractWebLayoutComponentDepictor<C>
-
- Type Parameters:
C
- The type of component being depicted.
- All Implemented Interfaces:
ComponentDepictor<C>
,Depictor<C>
,WebComponentDepictor<C>
,WebDepictor<C>
- Direct Known Subclasses:
AbstractWebMenuDepictor
,WebCardPanelDepictor
,WebFieldsetDepictor
,WebLabelPanelDepictor
,WebLayoutComponentDepictor
,WebTabbedPanelDepictor
public abstract class AbstractWebLayoutComponentDepictor<C extends LayoutComponent> extends AbstractWebComponentDepictor<C>
The abstract base class for allapplication/xhtml+xml
composite components that use layouts.- Author:
- Garret Wilson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.guise.framework.platform.AbstractComponentDepictor
AbstractComponentDepictor.DepictedCompositeComponentListener
-
Nested classes/interfaces inherited from class io.guise.framework.platform.AbstractDepictor
AbstractDepictor.DepictedPropertyChangeListener
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
COLUMN_REGION_CLASSES
The style classes for each region in a column.protected static java.lang.String[]
ROW_REGION_CLASSES
The style classes for each region in a row.-
Fields inherited from class io.guise.framework.platform.web.AbstractWebComponentDepictor
BODY_END_PATTERN, BODY_START_PATTERN
-
Fields inherited from class io.guise.framework.platform.AbstractComponentDepictor
childPropertyChangeListener
-
Fields inherited from interface io.guise.framework.platform.Depictor
GENERAL_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description AbstractWebLayoutComponentDepictor()
Default constructor with no element representation.AbstractWebLayoutComponentDepictor(java.net.URI namespaceURI, java.lang.String localName)
Element namespace and local name constructor that doesn't create an empty element, even if there is no content.AbstractWebLayoutComponentDepictor(java.net.URI namespaceURI, java.lang.String localName, boolean isEmptyElementAllowed)
Element namespace and local name constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beginRegion(RegionLayout regionLayout, RegionConstraints regionConstraints, Orientation orientation)
Writes an XHTML style attribute for the given region, if style information is needed for that region.protected void
beginRegion(RegionLayout regionLayout, RegionConstraints regionConstraints, Orientation orientation, boolean includeSize, boolean includeStyles)
Writes an XHTML style attribute for the given region, if style information is needed for that region.protected void
depictChildren()
Depicts any child components.protected java.lang.String
getAlign(double alignment, Axis axis, Flow.Direction direction)
Determines the alignment string for an alignment on a particular axis.protected void
updateFlowChildView(Component childComponent, Axis axis)
Updates a child view in a flow.-
Methods inherited from class io.guise.framework.platform.web.AbstractWebComponentDepictor
addFlowStyleIDs, decorateID, depict, depictBegin, depictBody, depictEnd, getBackgroundColor, getBaseStyleIDs, getBodyStyleIDs, getBodyStyles, getColor, getDepictContext, getDepictName, getLabelStyles, getLabelStyles, getLabelStyles, getLocalName, getNamespaceURI, getOuterStyles, getPlatform, hasLabelContent, hasLabelContent, hasLabelContent, hasLabelContent, isEmptyElementAllowed, isMouseListener, writeBodyIDClassAttributes, writeClassAttribute, writeDirectionAttribute, writeDirectionAttribute, writeErrorMessage, writeFloatClear, writeIDAttribute, writeIDClassAttributes, writeLabel, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeParameterInputs, writeStyleAttribute, writeText
-
Methods inherited from class io.guise.framework.platform.AbstractComponentDepictor
depictChild, depictedObjectPropertyChange, getDepictedCompositeComponentListener, getErrorMessage, installed, processEvent, uninstalled
-
Methods inherited from class io.guise.framework.platform.AbstractDepictor
getDepictedObject, getDepictedPropertyChangeListener, getIgnoredProperties, getModifiedProperties, getSession, isDepicted, setDepicted, setPropertyModified
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.guise.framework.platform.Depictor
getDepictedObject, getSession, installed, isDepicted, processEvent, setDepicted, uninstalled
-
-
-
-
Constructor Detail
-
AbstractWebLayoutComponentDepictor
public AbstractWebLayoutComponentDepictor()
Default constructor with no element representation.
-
AbstractWebLayoutComponentDepictor
public AbstractWebLayoutComponentDepictor(java.net.URI namespaceURI, java.lang.String localName)
Element namespace and local name constructor that doesn't create an empty element, even if there is no content.- Parameters:
namespaceURI
- The URI of the XML namespace of the element, ornull
if there is no namespace.localName
- The local name of the element with no prefix, ornull
if this component should not be rendered as an element.
-
AbstractWebLayoutComponentDepictor
public AbstractWebLayoutComponentDepictor(java.net.URI namespaceURI, java.lang.String localName, boolean isEmptyElementAllowed)
Element namespace and local name constructor.- Parameters:
namespaceURI
- The URI of the XML namespace of the element, ornull
if there is no namespace.localName
- The local name of the element with no prefix, ornull
if this component should not be rendered as an element.isEmptyElementAllowed
- Whether an empty element can be created if there is no content.
-
-
Method Detail
-
depictChildren
protected void depictChildren() throws java.io.IOException
Depicts any child components.This method does appropriate layout based upon the container's layout definition.
- Overrides:
depictChildren
in classAbstractComponentDepictor<C extends LayoutComponent>
- Throws:
java.io.IOException
- if there is an error updating the child depictions.- See Also:
LayoutComponent.getLayout()
-
beginRegion
protected void beginRegion(RegionLayout regionLayout, RegionConstraints regionConstraints, Orientation orientation) throws java.io.IOException
Writes an XHTML style attribute for the given region, if style information is needed for that region.This version writes alignment and style attributes.
- Parameters:
regionLayout
- The region layout being rendered.regionConstraints
- The constraints for the region about to be written.orientation
- The orientation of the component for which the region is being rendered.- Throws:
java.io.IOException
- if there is an error writing the attribute.
-
beginRegion
protected void beginRegion(RegionLayout regionLayout, RegionConstraints regionConstraints, Orientation orientation, boolean includeSize, boolean includeStyles) throws java.io.IOException
Writes an XHTML style attribute for the given region, if style information is needed for that region.This version writes alignment and style attributes.
- Parameters:
regionLayout
- The region layout being rendered.regionConstraints
- The constraints for the region about to be written.orientation
- The orientation of the component for which the region is being rendered.includeSize
- Whether size information should be included.includeStyles
- Whether non-size-related style information should be included.- Throws:
java.io.IOException
- if there is an error writing the attribute.
-
getAlign
protected java.lang.String getAlign(double alignment, Axis axis, Flow.Direction direction)
Determines the alignment string for an alignment on a particular axis.This implementation converts the alignment to a value by determining into which third the alignment value falls.
Note that these values also work on the
Axis.Y
axis for the CSSCSS.CSS_PROP_VERTICAL_ALIGN
property.- Parameters:
alignment
- The alignment value to convert.axis
- The axis of alignment.direction
- The direction of flow along the axis.- Returns:
- The string alignment value, appropriate for a table cell
align
orvalign
. - See Also:
HTML.TD_ALIGN_LEFT
,HTML.TD_ALIGN_CENTER
,HTML.TD_ALIGN_RIGHT
,HTML.TD_VALIGN_TOP
,HTML.TD_VALIGN_MIDDLE
,HTML.TD_VALIGN_BOTTOM
-
updateFlowChildView
protected void updateFlowChildView(Component childComponent, Axis axis) throws java.io.IOException
Updates a child view in a flow.When this method is called, an enclosing element will have been started for the child.
- Parameters:
childComponent
- The child component the view of which is to be updated.axis
- The axis along which flow is occurring.- Throws:
java.io.IOException
- if there is an error updating child views.
-
-