Class CSSGridData
java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.prop.ui.LayoutProp
com.iizix.prop.ui.CSSGridData
- All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, ILayoutAssumeHeight, ILayoutAssumeWidth, ILayoutDataAlignX, ILayoutDataAlignY, ILayoutUnitHeight, ILayoutUnitWidth, Cloneable
- Direct Known Subclasses:
ECSSGridData
public class CSSGridData extends LayoutProp implements ILayoutUnitWidth, ILayoutUnitHeight, ILayoutDataAlignX, ILayoutDataAlignY, ILayoutAssumeWidth, ILayoutAssumeHeight
The CSSGridData is the layout data for components in a container with
CSSGridLayout.The properties, all optional:
column, row IntProp the start column and row line, 1-based; 0 (default) = auto-placed
spanX, spanY IntProp how many columns and rows the component covers, default 1
alignX, alignY IntProp the alignment of the component in its area: 1=left/top,
2=center/middle, 3=right/bottom, 4=fill
cx, cy UnitProp the width and height of the component inside its area
cxMin .. cyMax UnitProp the minimum and maximum width and height
The grid item always fills its area; the component is aligned inside it with the same classes as in every other IIZI layout. Sizes are CSS units only: a % is the CSS % of the grid area (see CSSGridLayout).
An auto-placed component follows its predecessors in document order; one with an explicit column or row is placed there and the auto-placed ones flow around it. Two explicitly placed components may share an area; the later one in document order is drawn on top.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the start column property.static final StringThe name of the start row property.static final StringThe name of the column span property.static final StringThe name of the row span property.Fields inherited from class PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields inherited from class GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_PROVENANCE, PROP_ATTR_STRING_READ_ONLY, PROP_ATTR_STRING_SECRET, PROP_USER_1, PROP_USER_2Fields inherited from interface IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EQC_SAVE_RELEVANT_ONLY, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface ILayoutAssumeHeight
PN_ASSUME_HEIGHTFields inherited from interface ILayoutAssumeWidth
PN_ASSUME_WIDTHFields inherited from interface ILayoutDataAlignX
ALIGN_X_CENTER, ALIGN_X_FILL, ALIGN_X_LEFT, ALIGN_X_NAME, ALIGN_X_RIGHTFields inherited from interface ILayoutDataAlignY
ALIGN_Y_BOTTOM, ALIGN_Y_FILL, ALIGN_Y_MIDDLE, ALIGN_Y_NAME, ALIGN_Y_TOPConstructor Summary
ConstructorsConstructorDescriptionCreates a CSSGridData container without name and with a null value.CSSGridData(Atom propertyAtom) Creates a CSSGridData container with the specified name with a null value.CSSGridData(Atom propertyAtom, GProp<?>[] properties) Creates a CSSGridData container with the specified name and properties.Method Summary
Modifier and TypeMethodDescriptionbooleanVerifies if the component height can be set.booleanVerifies if the component width can be set.intReturns the explicit start column.intgetRow()Returns the explicit start row.intgetSpanX()Returns the number of columns covered.intgetSpanY()Returns the number of rows covered.booleanReturns if the component is auto-placed in both axes.voidsetCell(int column, int row) Places the component at an explicit column and row, or back to auto-placement.booleansetSize(GUnit width, GUnit height, IComplexOperation op) Assigns the component width and/or height.voidsetSpan(int spanX, int spanY) Sets the spans.Methods inherited from class LayoutProp
canSetPosition, getLayoutHeight, getLayoutWidth, isHeightIndirectlyDefined, isWidthIndirectlyDefined, setPositionMethods inherited from class PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, clone, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializePropTree, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isPropValueTreeLockNeeded, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hashCode, hasPrivateChangeEventProp, hasPropError, hasPropProvenance, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropErrorPersisted, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropForEditorAtCreation, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropSaveRelevant, isPropSecret, isPropSecretCapable, isPropUSER, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onInitialize, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropProvenance, setPropReadOnly, setPropSecret, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toShortString, toShortString, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, onRemoteEvent, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, verify, warning, warning, warningMethods inherited from interface ILayoutAssumeHeight
hasAssumedHeightMethods inherited from interface ILayoutAssumeWidth
hasAssumedWidthMethods inherited from interface ILayoutDataAlignX
getAlignPropX, getAlignX, getDefaultAlignX, hasFillX, setAlignX, setAlignX, verifyAlignXMethods inherited from interface ILayoutDataAlignY
getAlignPropY, getAlignY, getDefaultAlignY, hasFillY, setAlignY, setAlignY, verifyAlignYMethods inherited from interface ILayoutUnitHeight
getHeightUnit, getPropValue, setHeight, setPropValueMethods inherited from interface ILayoutUnitWidth
getPropValue, getWidthUnit, setPropValue, setWidthMethods inherited from interface IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstances
Field Details
COLUMN
ROW
SPAN_X
SPAN_Y
Constructor Details
CSSGridData
public CSSGridData()Creates a CSSGridData container without name and with a null value.CSSGridData
Creates a CSSGridData container with the specified name with a null value.- Parameters:
propertyAtom- the property atom.
CSSGridData
Creates a CSSGridData container with the specified name and properties.- Parameters:
propertyAtom- the property atom.properties- the property array value for the property.- Throws:
PropException- as structural changes in containers on client is prohibited.
Method Details
getColumn
public int getColumn()Returns the explicit start column.- Returns:
- The 1-based column line, 0 when auto-placed.
getRow
public int getRow()Returns the explicit start row.- Returns:
- The 1-based row line, 0 when auto-placed.
getSpanX
public int getSpanX()Returns the number of columns covered.- Returns:
- The span, at least 1.
getSpanY
public int getSpanY()Returns the number of rows covered.- Returns:
- The span, at least 1.
isAutoPlaced
public boolean isAutoPlaced()Returns if the component is auto-placed in both axes.- Returns:
- true when neither a column nor a row is set.
setCell
public void setCell(int column, int row) Places the component at an explicit column and row, or back to auto-placement.- Parameters:
column- The 1-based start column, 0 for auto, -1 for no change.row- The 1-based start row, 0 for auto, -1 for no change.- Throws:
IllegalArgumentException- For a value below -1.
setSpan
public void setSpan(int spanX, int spanY) Sets the spans.- Parameters:
spanX- The column span, at least 1; 0 for no change.spanY- The row span, at least 1; 0 for no change.- Throws:
IllegalArgumentException- For a negative value.
canSetWidth
public boolean canSetWidth()Verifies if the component width can be set.- Overrides:
canSetWidthin classLayoutProp- Returns:
- true if the width can be set.
canSetHeight
public boolean canSetHeight()Verifies if the component height can be set.- Overrides:
canSetHeightin classLayoutProp- Returns:
- true if the height can be set.
setSize
Assigns the component width and/or height.- Overrides:
setSizein classLayoutProp- Parameters:
width- The width to set, null for no change.height- The height to set, null for no change.op- The complex operation interface for undo/redo operations, null for none.- Returns:
- true for success.