Package io.guise.framework.platform.web
Class WebTableDepictor<C extends Table>
- 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.WebTableDepictor<C>
-
- Type Parameters:
C
- The type of component being depicted.
- All Implemented Interfaces:
ComponentDepictor<C>
,Depictor<C>
,WebComponentDepictor<C>
,WebDepictor<C>
public class WebTableDepictor<C extends Table> extends AbstractWebComponentDepictor<C>
Strategy for rendering a table component as an XHTML<table>
element.- 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 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 WebTableDepictor()
Default constructor using the XHTML<table>
element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
depictBegin()
Begins the depiction process.protected void
depictBody()
Depicts the body of the component.protected void
depictChildren()
Depicts any child components.protected void
depictEnd()
Ends the depiction process.protected java.util.Map<java.lang.String,java.lang.Object>
getLabelStyles(LabelModel labelModel, PresentationModel uiModel)
Retrieves the styles for the label of the component.protected java.util.Map<java.lang.String,java.lang.Object>
getOuterStyles()
Retrieves the styles for the outer element of the component.protected <T> void
updateCellView(TableModel tableModel, int rowIndex, TableColumnModel<T> column)
Updates the view of a column.protected <T> void
updateHeaderView(TableModel tableModel, TableColumnModel<T> column)
Updates the view of a column header.-
Methods inherited from class io.guise.framework.platform.web.AbstractWebComponentDepictor
addFlowStyleIDs, decorateID, depict, getBackgroundColor, getBaseStyleIDs, getBodyStyleIDs, getBodyStyles, getColor, getDepictContext, getDepictName, getLabelStyles, getLabelStyles, getLocalName, getNamespaceURI, 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
-
-
-
-
Method Detail
-
getOuterStyles
protected java.util.Map<java.lang.String,java.lang.Object> getOuterStyles()
Retrieves the styles for the outer element of the component.This version returns the style for color.
This version combines the body styles with the outer styles.
- Overrides:
getOuterStyles
in classAbstractWebComponentDepictor<C extends Table>
- Returns:
- The styles for the outer element of the component, mapped to CSS property names.
- See Also:
AbstractWebComponentDepictor.getBodyStyles()
-
depictBegin
protected void depictBegin() throws java.io.IOException
Description copied from class:AbstractWebComponentDepictor
Begins the depiction process.This version renders the beginning XML element information, if there is any, leaving the beginning tag open for attributes.
This version writes common XHTML attributes.
- Overrides:
depictBegin
in classAbstractWebComponentDepictor<C extends Table>
- Throws:
java.io.IOException
- if there is an error updating the depiction.
-
depictBody
protected void depictBody() throws java.io.IOException
Description copied from class:AbstractWebComponentDepictor
Depicts the body of the component.This version depicts the children of the component.
This version increases and decreases the indention level before and after depicting the children, respectively.
- Overrides:
depictBody
in classAbstractWebComponentDepictor<C extends Table>
- Throws:
java.io.IOException
- if there is an error updating the depiction.- See Also:
AbstractComponentDepictor.depictChildren()
-
depictChildren
protected void depictChildren() throws java.io.IOException
Description copied from class:AbstractComponentDepictor
Depicts any child components.- Overrides:
depictChildren
in classAbstractComponentDepictor<C extends Table>
- Throws:
java.io.IOException
- if there is an error updating the child depictions.
-
updateHeaderView
protected <T> void updateHeaderView(TableModel tableModel, TableColumnModel<T> column) throws java.io.IOException
Updates the view of a column header.- Type Parameters:
T
- The type of value contained in the cells of the column.- Parameters:
tableModel
- The component model.column
- The cell column.- Throws:
java.io.IOException
- if there is an error updating the cell view.
-
getLabelStyles
protected java.util.Map<java.lang.String,java.lang.Object> getLabelStyles(LabelModel labelModel, PresentationModel uiModel)
Retrieves the styles for the label of the component.If a column is being rendered, this version adds border styles.
- Overrides:
getLabelStyles
in classAbstractWebComponentDepictor<C extends Table>
- Parameters:
labelModel
- The label model containing the label content.uiModel
- The model containing the label style information.- Returns:
- The styles for the label of the component, mapped to CSS property names.
-
updateCellView
protected <T> void updateCellView(TableModel tableModel, int rowIndex, TableColumnModel<T> column) throws java.io.IOException
Updates the view of a column.- Type Parameters:
T
- The type of value contained in the cells of the column.- Parameters:
tableModel
- The component model.rowIndex
- The zero-based cell row index.column
- The cell column.- Throws:
java.io.IOException
- if there is an error updating the cell view.
-
depictEnd
protected void depictEnd() throws java.io.IOException
Description copied from class:AbstractWebComponentDepictor
Ends the depiction process.This version renders the ending XML element information, if there is any.
- Overrides:
depictEnd
in classAbstractWebComponentDepictor<C extends Table>
- Throws:
java.io.IOException
- if there is an error updating the depiction.
-
-