Class AbstractLabeledComponent<CC extends Component>
- All Implemented Interfaces:
Component,LabeledComponent
- Direct Known Subclasses:
AbstractBox,AbstractDataComponent,ActionSeparatorImpl,ContainerImpl,DefaultAction,DefaultColumn,DefaultTemplate,DescriptionFieldImpl,LocationFieldImpl,SearchFilterFieldImpl
Most components will always use the label, for example a text field. Some components like box layout containers might use one, or not. To keep it the most flexible all labeled components may turn it off, even a text field (yes I see use cases for it).
If a component really depends on the label in the gui then it can still ignore the disabling feature. Just like a component may choose to ignore the label under certain circumstances.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.Component
Component.ComponentFilter, Component.DataNavigationType, Component.DisplayType, Component.PositionNested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.LabeledComponent
LabeledComponent.UseLabel -
Field Summary
Fields inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponent
attributeProps, extProps, name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractLabeledComponent(boolean acceptChildren, @Nullable Component parent) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Subclasses must override this if they don't want to inherit the NONE value.getLabel()Deprecated.Deprecated.Tells if the label is to be used in the gui.protected voidmapAllAttributesTo(Component comp) Deprecated.Copies the attributes of this component into the passed component.final voidsetLabel(DisplayValue value) Deprecated.voidsetUseLabel(LabeledComponent.UseLabel useLabel) Deprecated.Sets wheter the label is to be used in the gui.Methods inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponent
addComponent, addComponent, collectDataParts, collectDataParts, createCopy, createCopy, equals, find, findByName, findByType, findFirst, findFirstByName, getAttributeProps, getChild, getChildren, getDisplayType, getEventHandler, getExtProps, getForm, getName, getParent, getParentOrEx, getPosition, getRelativeToPositionName, getScopes, getType, hashCode, hasParent, isForceEditable, isLeaf, isReplace, newInstanceForCopy, overrideParent, removeComponent, replaceComponent, replaceComponent, setAttributeProps, setChildren, setDisplayType, setEventHandler, setExtProps, setForceEditable, setName, setPosition, setRelativeToPositionName, setReplace, setScopes, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.form.api.components.Component
addComponent, addComponent, collectDataParts, collectDataParts, createCopy, createCopy, find, findByName, findByType, findFirst, findFirstByName, getAttributeProps, getChild, getChildren, getDisplayType, getEventHandler, getExtProps, getForm, getName, getParent, getParentOrEx, getPosition, getRelativeToPositionName, getScopes, getType, hasParent, isForceEditable, isLeaf, isReplace, overrideParent, removeComponent, replaceComponent, replaceComponent, setAttributeProps, setChildren, setDisplayType, setEventHandler, setExtProps, setForceEditable, setName, setPosition, setRelativeToPositionName, setReplace, setScopes, wrap
-
Constructor Details
-
AbstractLabeledComponent
Deprecated.- Parameters:
acceptChildren- set this explicit in your constructor. If true, the implementation will accept children, (For exaple an group-component), otherwise not (For example a textfield-component).parent- The parent of this component, null if none.
-
-
Method Details
-
getLabel
Deprecated.- Specified by:
getLabelin interfaceLabeledComponent
-
setLabel
Deprecated.- Specified by:
setLabelin interfaceLabeledComponent- Parameters:
value- value
-
getUseLabel
Deprecated.Description copied from interface:LabeledComponentTells if the label is to be used in the gui.- Specified by:
getUseLabelin interfaceLabeledComponent- Returns:
- Tells if and how the label should be used.
-
setUseLabel
Deprecated.Description copied from interface:LabeledComponentSets wheter the label is to be used in the gui.- Specified by:
setUseLabelin interfaceLabeledComponent- Parameters:
useLabel- true to use it, false to ignore it
-
mapAllAttributesTo
Deprecated.Description copied from class:AbstractComponentCopies the attributes of this component into the passed component.This is used to copy the attributes collected by the xml reading process from "general" field tags into datatype-specific customized fields (mapped by FieldComponentConverter). And also for copying instances, kind of like cloning.
Override this in your subclasses. Also, subclasses are required to let their anchestors do their work using
super.copyOtherFields(cpy).- Overrides:
mapAllAttributesToin classAbstractComponent<CC extends Component>- Parameters:
comp- The new field into which everything needs to be copied.
-