Class EnumConstraintEditor<T extends java.lang.Enum<T>>
- java.lang.Object
- 
- docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor<T>
- 
- docking.widgets.table.constrainteditor.EnumConstraintEditor<T>
 
 
- 
- All Implemented Interfaces:
- ColumnConstraintEditor<T>
 
 public class EnumConstraintEditor<T extends java.lang.Enum<T>> extends AbstractColumnConstraintEditor<T> A constraint editor for enumerated-type values;
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringCHECKBOX_NAME_PREFIX- 
Fields inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditorcurrentConstraint, INVALID_INPUT_COLOR, VALID_INPUT_COLOR
 
- 
 - 
Constructor SummaryConstructors Constructor Description EnumConstraintEditor(EnumColumnConstraint<T> constraint)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.ComponentbuildInlineEditorComponent()Delegate the construction of the inline editor component.protected booleancheckEditorValueValidity()Template method that subclasses must implement.java.lang.StringgetElementDisplayName(T value)Resolves and returns a more friendly display name for a given Enum value.java.lang.StringgetErrorMessage()If the editor contains and invalid value, this message should indicate why the value is invalid.protected ColumnConstraint<T>getValueFromComponent()Get the constraints' new value from the editor component.voidreset()Reset the editor to a known-good state.protected voidupdateEditorComponent()Indicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.protected voidupdateInfoMessage(boolean isValid)- 
Methods inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditoraddChangeListener, buildDetailEditorComponent, formatStatus, getDetailComponent, getInlineComponent, getValue, hasEditorComponents, hasValidValue, notifyConstraintChanged, removeChangeListener, setValue, valueChanged
 
- 
 
- 
- 
- 
Field Detail- 
CHECKBOX_NAME_PREFIXpublic static final java.lang.String CHECKBOX_NAME_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
EnumConstraintEditorpublic EnumConstraintEditor(EnumColumnConstraint<T> constraint) Constructor.- Parameters:
- constraint- Enum-type constraint for which this component is an editor.
 
 
- 
 - 
Method Detail- 
buildInlineEditorComponentprotected java.awt.Component buildInlineEditorComponent() Description copied from class:AbstractColumnConstraintEditorDelegate the construction of the inline editor component.- Specified by:
- buildInlineEditorComponentin class- AbstractColumnConstraintEditor<T extends java.lang.Enum<T>>
- Returns:
- the editors inline component
- See Also:
- AbstractColumnConstraintEditor.getInlineComponent()
 
 - 
getElementDisplayNamepublic java.lang.String getElementDisplayName(T value) Resolves and returns a more friendly display name for a given Enum value.Several Ghidra enumerated types provide functions for retrieving formatted name for a value; this attempts to locate one such function within the Enum class. This searches the enum class for a zero-argument, String-returning method called getName(),getDisplayName(), orgetDisplayString()before falling back totoString().- Returns:
- a more user-friendly name for the value
 
 - 
getValueFromComponentprotected ColumnConstraint<T> getValueFromComponent() Description copied from class:AbstractColumnConstraintEditorGet the constraints' new value from the editor component. This expects the UI to have been constructed.- Specified by:
- getValueFromComponentin class- AbstractColumnConstraintEditor<T extends java.lang.Enum<T>>
- Returns:
- See Also:
- AbstractColumnConstraintEditor.getValue()
 
 - 
updateEditorComponentprotected void updateEditorComponent() Description copied from class:AbstractColumnConstraintEditorIndicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.- Specified by:
- updateEditorComponentin class- AbstractColumnConstraintEditor<T extends java.lang.Enum<T>>
 
 - 
resetpublic void reset() Description copied from interface:ColumnConstraintEditorReset the editor to a known-good state.
 - 
checkEditorValueValidityprotected boolean checkEditorValueValidity() Description copied from class:AbstractColumnConstraintEditorTemplate method that subclasses must implement. This class will call this method whenever the value changes so that the validity state is updated.Only called when the editor component has been constructed and UI elements are defined. - Specified by:
- checkEditorValueValidityin class- AbstractColumnConstraintEditor<T extends java.lang.Enum<T>>
- Returns:
- true if the UI defines a valid value, false otherwise
- See Also:
- ColumnConstraintEditor.hasValidValue()
 
 - 
updateInfoMessageprotected void updateInfoMessage(boolean isValid) - Specified by:
- updateInfoMessagein class- AbstractColumnConstraintEditor<T extends java.lang.Enum<T>>
 
 - 
getErrorMessagepublic java.lang.String getErrorMessage() Description copied from interface:ColumnConstraintEditorIf the editor contains and invalid value, this message should indicate why the value is invalid. Only called ifhasValidValue()returns false.- Returns:
- an error message, or an empty string if no error
 
 
- 
 
-