public abstract class AbstractClassificationAttributeEditorChip extends AbstractChip implements AttributeValueChangeListener
| Modifier and Type | Field and Description |
|---|---|
static String |
ADD |
protected static String |
ATTRIBUTE_WIDTH |
protected static int |
DEFAULT_EDITORWIDTH |
protected static int |
DEFAULT_UNIT_WIDTH |
static String |
REMOVE |
protected static String |
UNIT_WIDTH |
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AbstractClassificationAttributeEditorChip(SessionContext context,
Chip parent,
Map<String,String> xmlAttributes) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addValue()
Adds new empty editors representing a new feature value.
|
protected int |
addValue(AbstractAttributeEditorChip valueEditor,
AbstractAttributeEditorChip descriptionEditor,
AbstractAttributeEditorChip unitEditor) |
boolean |
containsValidValue()
Returns true if all the embedded editors contain valid values.
|
protected abstract Object |
convertValue(Object value)
Implementation of this method should convert the given value if necessary.
|
protected AbstractAttributeEditorChip |
createDescriptionEditor(Object initialValue)
Returns a new
AbstractAttributeEditorChip (usually a StringEditorChip) containing the given
initial value. |
protected AbstractAttributeEditorChip |
createDescriptionEditorChip()
Creates a string editor chip.
|
protected AbstractAttributeEditorChip |
createUnitEditor(Object initialValue)
Returns a new
AbstractAttributeEditorChip (usually a AllInstancesSelectEditorChip) containing the
given initial value. |
protected AbstractAttributeEditorChip |
createUnitEditorChip(ClassificationAttributeUnit currentValueUnit)
Returns a new instance of
AllInstancesSelectEditorChip for the type ClassificationAttributeUnit. |
protected AbstractAttributeEditorChip |
createValueEditor(Object initialValue)
Creates a new
AbstractAttributeEditorChip with the given initial value. |
protected abstract AbstractAttributeEditorChip |
createValueEditorChip()
Implementation of this method should create a new value editor.
|
protected ClassAttributeAssignment |
getClassAttributeAssignment()
Returns the
ClassAttributeAssignment this editor represents. |
SessionContext |
getContext()
Returns the
SessionContext for which this editor was created. |
protected ClassificationAttributeUnit |
getDefaultUnit()
For the current
ClassAttributeAssignment this method returns the default
ClassificationAttributeUnit. |
List<AbstractAttributeEditorChip> |
getDescriptionEditorChips()
Returns the List of description editors (usually of type StringEditorChip)
|
protected int |
getEditorWidth()
From the given xml attributes map this method will try to extract the editor width (the "width" attribute) and
return it.
|
TypedFeature<Object> |
getFeature()
Returns the
TypedFeature this editor represents. |
List |
getMenuEntries()
Returns context menu entries.
|
protected List<ClassificationAttributeUnit> |
getSelectableUnitsForAttribute() |
String |
getTooltip(int index)
For the given index the value of the descriptio editor is returned.
|
List<AbstractAttributeEditorChip> |
getUnitEditorChips()
Returns the List of unit editors (usually of type AllInstancesSelectEditorChip)
|
protected int |
getUnitEditorWidth()
From the given xml attributes map this method will try to extract the unit editor width (the "unitwidth"
attribute) and return it.
|
List<AbstractAttributeEditorChip> |
getValueEditorChips() |
protected Map<String,String> |
getXmlAttributes()
Returns the xml attributes which were used to configure this editor in the hmc.xml.
|
protected boolean |
hasUnitEditor() |
boolean |
isChanged()
Returns true if at least one of the value- or description editors have been changed.
|
boolean |
isEditable()
Returns true if this editor is being marked as editable.
|
boolean |
isMandatory()
Returns true if the the feature this editor represents is mandatory
|
boolean |
isMultiValued()
Returns true if the feature this editor represents allows for multiple values.
|
boolean |
isRange()
Returns true if the feature this editor represents should contain range values
|
void |
notifyAttributeValueChange(AttributeValueChangeEvent event)
Is called if one of the editors has been changed.
|
protected void |
notifyDesciptionEditorChanged(int index,
AttributeValueChangeEvent event) |
protected void |
notifyUnitEditorChanged(int index,
AttributeValueChangeEvent event) |
protected void |
notifyValueEditorChanged(int index,
AttributeValueChangeEvent event) |
void |
processEvents(Map events)
Processes 'add' and 'remove' events for feature values.
|
protected void |
removeValue(int index)
Removes the feature value with the given index (i.e.
|
void |
setEditable(boolean editable)
Sets this editor as editable.
|
void |
setFeature(TypedFeature<Object> feature)
Sets the
TypedFeature this editor represents. |
protected void |
setIsChanged(boolean changed)
Sets the current 'is changed' status.
|
protected abstract boolean |
supportUnits()
Implementing classes should return true if the editor should support units.
|
addEventListener, checkValid, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueName, getProposedUniqueNameFor, getRequestFocus, getSessionIdentifier, getStringValue, getUniqueName, getWindow, goFullScreen, hasVisibleContextMenuEntries, isButtonPushed, isButtonPushed, isErrorQueueEmpty, isValid, leaveFullScreen, notifyEventListeners, notifyEventListeners, postErrorMessage, postInfoMessage, postWindowEvent, refresh, refreshChild, registerUniqueName, removeEventListener, removeInfoMessage, render, render, setClipboard, setParent, setRequestFocus, setValid, setWindowStatus, translateFormFieldToEventName, translateFormFieldToEventValueprotected static final String ATTRIBUTE_WIDTH
protected static final String UNIT_WIDTH
protected static final int DEFAULT_EDITORWIDTH
protected static final int DEFAULT_UNIT_WIDTH
public static final String ADD
public static final String REMOVE
public AbstractClassificationAttributeEditorChip(SessionContext context, Chip parent, Map<String,String> xmlAttributes)
public List<AbstractAttributeEditorChip> getValueEditorChips()
public List<AbstractAttributeEditorChip> getDescriptionEditorChips()
public List<AbstractAttributeEditorChip> getUnitEditorChips()
public String getTooltip(int index)
public final void setEditable(boolean editable)
public final boolean isEditable()
protected int getEditorWidth()
protected boolean hasUnitEditor()
protected int getUnitEditorWidth()
protected final Map<String,String> getXmlAttributes()
public final TypedFeature<Object> getFeature()
TypedFeature this editor represents.public void setFeature(TypedFeature<Object> feature)
TypedFeature this editor represents.feature - the TypedFeature this editor represents.public final SessionContext getContext()
SessionContext for which this editor was created.public void processEvents(Map events)
processEvents in interface Chipprotected void removeValue(int index)
index - the index of the value to be removed.protected int addValue()
protected int addValue(AbstractAttributeEditorChip valueEditor, AbstractAttributeEditorChip descriptionEditor, AbstractAttributeEditorChip unitEditor)
protected abstract Object convertValue(Object value)
value - the value to be converted (if necessary)protected abstract boolean supportUnits()
protected abstract AbstractAttributeEditorChip createValueEditorChip()
protected final AbstractAttributeEditorChip createValueEditor(Object initialValue)
AbstractAttributeEditorChip with the given initial value.initialValue - the initial editor valueprotected AbstractAttributeEditorChip createDescriptionEditorChip()
protected final AbstractAttributeEditorChip createDescriptionEditor(Object initialValue)
AbstractAttributeEditorChip (usually a StringEditorChip) containing the given
initial value.initialValue - the initial value of the new editorprotected AbstractAttributeEditorChip createUnitEditorChip(ClassificationAttributeUnit currentValueUnit)
AllInstancesSelectEditorChip for the type ClassificationAttributeUnit.protected List<ClassificationAttributeUnit> getSelectableUnitsForAttribute()
protected final AbstractAttributeEditorChip createUnitEditor(Object initialValue)
AbstractAttributeEditorChip (usually a AllInstancesSelectEditorChip) containing the
given initial value.initialValue - the initial value of the new editorprotected void setIsChanged(boolean changed)
changed - public boolean isChanged()
public boolean containsValidValue()
public boolean isMultiValued()
public boolean isRange()
public boolean isMandatory()
protected ClassAttributeAssignment getClassAttributeAssignment()
ClassAttributeAssignment this editor represents.protected ClassificationAttributeUnit getDefaultUnit()
ClassAttributeAssignment this method returns the default
ClassificationAttributeUnit.public List getMenuEntries()
getMenuEntries in interface ChipgetMenuEntries in class AbstractChippublic void notifyAttributeValueChange(AttributeValueChangeEvent event)
notifyAttributeValueChange in interface AttributeValueChangeListenerprotected void notifyUnitEditorChanged(int index,
AttributeValueChangeEvent event)
protected void notifyDesciptionEditorChanged(int index,
AttributeValueChangeEvent event)
protected void notifyValueEditorChanged(int index,
AttributeValueChangeEvent event)
Copyright © 2017 SAP SE. All Rights Reserved.