Class DisplayColumn
java.lang.Object
org.applecommander.ui.DisplayColumn
A DisplayColumn supports formatted output from various FileStores in a
dynamic fashion. The intent is to provide a flexible display interface
across interfaces that does not rely on hard-coded implementations.
The Builder should be utilized to construct the DisplayColumn.
The read-only settings include:
titleis the column titlealignmentis the alignment of the column datamodeis the display mode that the column applies to (native, detail, or both)columnDataTypeis the (simplified) data typegetValueFnis the method reference to get the column's valueformatFnis the function that takes the column's value and prepares it for display
The editable attributes are:
setValueFnis the method reference to set the value; note that the builder wraps the actual setter with a conversion functioneditInLineindicates if this specific cell can be edited in a grid; at this time this is only used for the name fieldmaxLengthis the maximum length of the inputoptionsare the options available for selectionvalidCharactersis aCharacterMapperto transform input textvalidInputPatternis aPatternused to validate the input
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDisplayColumn.Builder<T extends FileEntry>static classDisplayColumn.ColumnBuilder<T extends FileEntry> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends FileEntry>
DisplayColumn.Builder<T> booleanIndicates this column can be edited directly in the file viewer.formatObject(Object object) Explicitly format the object.Retrieve the column alignment.Indicates the (generic) data type of this column.getDisplayText(FileEntry fileEntry) Convert the column into a formatted string for display.intIndicates the maximum length for the input.Get list of options (if any) when editing.getTitle()The column title.Get the CharacterMapper that maps the input string into the valid set of characters.Get the valid input regex.Get the column value for this FileEntry.booleanIndicates if this field is editablevoidbooleansupports(DisplayMode mode) Indicates if this DisplayColumn supports the DisplayMode.
-
Method Details
-
getTitle
The column title. -
getAlignment
Retrieve the column alignment. -
supports
Indicates if this DisplayColumn supports the DisplayMode. In this manner, the columns can be filtered out. Or it can be ignored to display everything. -
getDataType
Indicates the (generic) data type of this column. -
getValue
-
getDisplayText
-
formatObject
-
setValue
-
isEditable
public boolean isEditable()Indicates if this field is editable -
canEditInLine
public boolean canEditInLine()Indicates this column can be edited directly in the file viewer. Typically just the name. -
getMaxLength
public int getMaxLength()Indicates the maximum length for the input. 0 means not applicable. -
getOptions
Get list of options (if any) when editing. -
getValidCharacters
Get the CharacterMapper that maps the input string into the valid set of characters. -
getValidInputPattern
Get the valid input regex. If input does not match this regex, it will be ignored. The intent is to be able to limit to numbers, or the valid filename characters. -
builder
-