Package overit.geocall.basic.ui.control
Class GridFrame
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.GridFrame
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,AjaxableComponent,Arrangeable,Badgeable,Hideable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
@Component
public class GridFrame
extends Control
implements Arrangeable, Hideable, AjaxableComponent
This class serves as a container for multiple components derivated of the
Each Grid elements added to the mask aligns without considering the alignement of the elements belonging to the objects external to it. Inserting the Grid elements inside a GridFrame the fields of each grid align with each other.
Another important use of GridFrame is to make the grids cloasable. In effect, if one grid is set as closable, it is not possible to close it if it isn't inserted in a GridFrame.
Grid
(see ArrangingGrid, ContainerGrid and ControlGrid).Each Grid elements added to the mask aligns without considering the alignement of the elements belonging to the objects external to it. Inserting the Grid elements inside a GridFrame the fields of each grid align with each other.
Another important use of GridFrame is to make the grids cloasable. In effect, if one grid is set as closable, it is not possible to close it if it isn't inserted in a GridFrame.
- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected byteprotected intprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected SetPredicateFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineServiceFields inherited from interface overit.geocall.ui.AjaxableComponent
FRAME_ID_PREFIX, NOTRANSITION, TRANSITION_BODY_MORPH, TRANSITION_BODY_RESIZE, TRANSITION_BORDER_RESIZE, TRANSITION_DOWN, TRANSITION_UP -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of GridFrame with the space sets toarrangingmode. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEndSectionRow(int cols, org.apache.ecs.html.TBody tb) protected voidaddSectionRow(int cols, org.apache.ecs.html.TBody tb, Grid g, int sectionnumber, boolean closed, boolean ro, boolean ena, boolean roclosed) voidEvery component can add a script to the StringBuilder, script executed when the component is created.voidchanged(overit.geocall.ux.servlet.processor.Change change) Defines the morphing of the element that occurs when there is an Ajax interactionvoidchangedGrid(int n) Defines theChangeobject for the grid.org.apache.ecs.ElementgetContentHtml(Object generationhandle, EntitySet es) Returns the html code that represents the active part of the component, i.e. the field and the validation scriptsoverit.geocall.ux.servlet.processor.ChangeDefines the defaultChangeobject for the elementorg.apache.ecs.ElementgetDescriptionHtml(Object generationhandle, EntitySet es) Returns the html code that represents the component description i.e. the formatted label of the fieldorg.apache.ecs.ElementMethod that creates a button that launches the event associeted to the grid.org.apache.ecs.ElementgetFrameHtml(overit.geocall.ux.servlet.processor.Change changed, EntitySet es) Defines the html part of the element that changes when an Ajax interaction occursReturns the object to generate when the Arrangeable element is composed by more than one elementorg.apache.ecs.ElementgetHiddenHtml(Object generationhandle, EntitySet es) Returns the hidden but active html part of an hidden componentorg.apache.ecs.ElementAbstract method that must be extended and returns the html code of the ComponentbooleanDeprecated.booleanReturn if the component is visible on the screen.booleanMethod that deals with opening and closing of theGridelements set to closable.voidSets the size of the grid border.voidSets the event to be launched from grid.voidSets the horizontal size of the grid to fullsize.voidSets the string that appears as a message for the event associated to the grid.voidSets the string that appears as a message for the event associated to the grid.voidSets one (or more) parameter for the events associated to the grid (seesetEVENT()).voidsetSPACING(String s) Sets the mode to be set for spacing.voidsetVISIBLE(String s) Sets if the component must be shown on the screen.Methods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBASIC, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setup, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
_visible
-
_event
-
_param
-
_msg
-
_fullsize
protected boolean _fullsize -
_border
protected int _border -
_cols
protected int _cols -
_cellsize
protected byte _cellsize -
_spacing
-
-
Constructor Details
-
GridFrame
public GridFrame()Creates a new instance of GridFrame with the space sets toarrangingmode.
-
-
Method Details
-
setSPACING
Sets the mode to be set for spacing. It is usually set by the theme used.- Parameters:
s- The string that rappresents the name of the mode to use for the spacing. The standard names mode are:control,container,arranging.
-
setBORDER
Sets the size of the grid border. The default is0because this method is usally used in debugging to understand the occupation of the grid.- Parameters:
s- String containing an integer corresponding to the thickness of the border.
-
setVISIBLE
Sets if the component must be shown on the screen.- Specified by:
setVISIBLEin interfaceHideable- Parameters:
s- The string containing the boolean value to set as visibility of the component.
-
getVISIBLE
public boolean getVISIBLE()Deprecated.To useisVisible()- Specified by:
getVISIBLEin interfaceHideable- Returns:
- Use
Hideable.isVisible()
-
isVisible
public boolean isVisible()Return if the component is visible on the screen. -
setEVENT
Sets the event to be launched from grid. When the event is set, a button outside the grid is shown to launch it. The button hasn't set an icon, so it must be defined. This component can be used on any grid except for direct child grids of gridFrame.- Parameters:
s- Name of the event to launch
-
setMSG
Sets the string that appears as a message for the event associated to the grid.
If there is a message, when the user launch the event a javascript alert will appear, containing the message and two buttons; by pressing one of the two the event will be triggered, while pressing the other will not. Therefore usually this alert is used to request confirmation of proceeding to the user.
Using this method the message will be translated by theTeacher.- Parameters:
s- A string that represents the message contained in the alert that will appears when the user clicks the Button
-
setPARAM
Sets one (or more) parameter for the events associated to the grid (seesetEVENT()).
For the association event - parameter, it counts the position in which the attributes appear. If the parameters are fewer than the events, the last parameter of the list is associated with all the remaining events.- Parameters:
s- AListAttributeof strings (separated by the character | ) each of which represents the param attribute of an event associated to the field
-
setFULLSIZE
Sets the horizontal size of the grid to fullsize. So, when it is sets totrue, the width of the grid will occupy all the space possible- Parameters:
s- String containing the boolean value to enable fullsize mode or not.
-
getContentHtml
Description copied from interface:ArrangeableReturns the html code that represents the active part of the component, i.e. the field and the validation scripts- Specified by:
getContentHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the component
-
getHiddenHtml
Description copied from interface:ArrangeableReturns the hidden but active html part of an hidden component- Specified by:
getHiddenHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the hidden part of the component
-
getDescriptionHtml
Description copied from interface:ArrangeableReturns the html code that represents the component description i.e. the formatted label of the field- Specified by:
getDescriptionHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the label of the field
-
getGenerationHandle
Description copied from interface:ArrangeableReturns the object to generate when the Arrangeable element is composed by more than one element- Specified by:
getGenerationHandlein interfaceArrangeable- Returns:
- The Object to generate
-
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
getEventButton
public org.apache.ecs.Element getEventButton()Method that creates a button that launches the event associeted to the grid. If the grid is read-only, the event is not added to the button. Otherwise the event that button will launch will be the one associeted via the methodsetEVENT()with parameters and message set via the methodssetPARAM()andsetMSG().- Returns:
- Return the
Buttonelement with the event associeted.
-
addSectionRow
protected void addSectionRow(int cols, org.apache.ecs.html.TBody tb, Grid g, int sectionnumber, boolean closed, boolean ro, boolean ena, boolean roclosed) -
addEndSectionRow
protected void addEndSectionRow(int cols, org.apache.ecs.html.TBody tb) -
onOpenClose
Method that deals with opening and closing of theGridelements set to closable.- Parameters:
hg-HashGettercontaining the section number to close or open. The value is inside the"param"key.- Returns:
- false
-
getFrameHtml
public org.apache.ecs.Element getFrameHtml(overit.geocall.ux.servlet.processor.Change changed, EntitySet es) Description copied from interface:AjaxableComponentDefines the html part of the element that changes when an Ajax interaction occurs- Specified by:
getFrameHtmlin interfaceAjaxableComponent- Parameters:
changed- TheChangeobject that defines the specific morphing type for the elementes- TheEntitySetto which the element belongs- Returns:
- The html part of the element that changes when an Ajax interaction occurs
-
changedGrid
public void changedGrid(int n) Defines theChangeobject for the grid.- Parameters:
n- Number containing the section number of the grid
-
changed
public void changed(overit.geocall.ux.servlet.processor.Change change) Description copied from interface:AjaxableComponentDefines the morphing of the element that occurs when there is an Ajax interaction- Specified by:
changedin interfaceAjaxableComponent- Parameters:
change- TheChangeobject that defines the specific morphing type for the element
-
getDefaultChange
public overit.geocall.ux.servlet.processor.Change getDefaultChange()Description copied from interface:AjaxableComponentDefines the defaultChangeobject for the element- Specified by:
getDefaultChangein interfaceAjaxableComponent- Returns:
- The default
Changeobject that defines the default morphing type of the element
-
setMsg
Sets the string that appears as a message for the event associated to the grid.
If there is a message, when the user launch the event a javascript alert will appear, containing the message and two buttons; by pressing one of the two the event will be triggered, while pressing the other will not. Therefore usually this alert is used to request confirmation of proceeding to the user.
Using this method the message will not be translated by theTeacher.- Parameters:
s- A string that represents the message contained in the alert that will appears when the user clicks the Button
-
buildSetupScript
Description copied from class:ComponentEvery component can add a script to the StringBuilder, script executed when the component is created.- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
isVisible()