public class RecordField extends BaseManager
Modifier and Type | Class and Description |
---|---|
static class |
RecordField.Visibility |
BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
Modifier and Type | Field and Description |
---|---|
static int |
ENUM_VIEW_MODE_OPTION_DROPDOWN_MENU |
static int |
ENUM_VIEW_MODE_OPTION_RADIO_BUTTONS |
static int |
IMAGE_SIZE_OPTION_LARGE |
static int |
IMAGE_SIZE_OPTION_MEDIUM |
static int |
IMAGE_SIZE_OPTION_SMALL |
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCategoryViewSet()
Returns the category view set to use for showing further details.
|
java.lang.String |
getFieldName()
Returns this fields display name.
|
java.lang.String |
getFieldName(int languageID)
Returns the name for the given language id.
|
FontDetail |
getFont()
This returns the font configuration for this field for the current platform.
|
FontDetail |
getFontMac()
This returns the font configuration for this field for the Mac platform.
|
FontDetail |
getFontWin()
This returns the font configuration for this field for the Windows platform.
|
int |
getImageSize()
Returns the wanted default image size for this thumbnail field.
|
int |
getMaximumFractionDigits()
Returns the number of fraction digits to use when displaying this field.
|
int |
getPreferredLanguageID()
Returns the language ID to use for displaying the content.
|
int |
getPreferredSingleValueEnumView()
Returns the mode for rendering this enum field.
|
boolean |
getShowEmbeddedMetadataTags()
Returns whether a
FieldTypes.FieldTypePicture field will be extended with the content of the GUID.UID_EMBEDDED_METADATA_TAGS field. |
boolean |
getShowFrame()
Returns whether this field should be rendered with a frame.
|
int |
getSpacing()
Returns the spacing around this field when being rendered.
|
int |
getTextNumberOfLines()
Returns the number of lines to use when rendering this field.
|
int |
getType()
Returns the type of this field.
|
java.lang.String |
getUID()
Returns this fields UID.
|
boolean |
getUseRegionalSettings()
Returns whether a
FieldTypes.FieldTypeInteger or FieldTypes.FieldTypeLong field will be displayed by using regional settings or just as a
plain number. |
int |
getValueInterpretation()
Returns this fields value interpretation.
|
java.util.Set<java.lang.Integer> |
getVisibilityMatchingEnumIDs()
Return the selected enum IDs when using the visibility mode
RecordField.Visibility.STRING_ENUM_MATCH for this field. |
RecordField.Visibility |
getVisibilityMode()
Return the visibility mode for this field.
|
java.lang.String |
getVisibilityQueryMatchName()
Return the query name to use when using the visibility mode
RecordField.Visibility.QUERY_MATCH for this field. |
java.lang.String |
getVisibilityQueryString()
Return the query string to use when using the visibility mode
RecordField.Visibility.STRING_ENUM_MATCH for this field. |
boolean |
isSeparator()
Returns whether this field represents a field or a field grouping separator element.
|
boolean |
isUsePreferredLanguage()
Returns whether this field is configured to use a preferred language for displaying the content.
|
boolean |
isVisibleForItem(Item item,
java.util.Map<java.lang.String,java.lang.Boolean> visibilityQueryResultCache)
Returns whether this field should be shown for the given item according to the visibility rules of this field.
|
void |
setCategoryViewSet(java.lang.String categoryViewSet)
Sets the category view set to use for showing further details.
|
void |
setFieldName(int languageID,
java.lang.String name)
Sets the name for the given language.
|
void |
setImageSize(int value)
Configures the wanted default image size for this thumbnail field.
|
void |
setMaximumFractionDigits(int value)
Configures the number of fraction digits to use when displaying this field.
|
void |
setPreferredLanguageID(int languageID)
Specifies the language ID to use for displaying the content.
|
void |
setPreferredSingleValueEnumView(int view)
Configures the mode for rendering this enum field.
|
void |
setShowEmbeddedMetadataTags(boolean value)
Specifies whether a
FieldTypes.FieldTypePicture field should be extended with the content of the GUID.UID_EMBEDDED_METADATA_TAGS field. |
void |
setShowFrame(boolean value)
Configures whether this field should be rendered with a frame.
|
void |
setSpacing(int value)
Sets the spacing around this field when being rendered.
|
void |
setTextNumberOfLine(int value)
Configures the number of lines to use when rendering this field.
|
void |
setUsePreferredLanguage(boolean value)
Specifies whether this field should configured to use a preferred language for displaying the content.
|
void |
setUseRegionalSettings(boolean value)
Specifies whether a
FieldTypes.FieldTypeInteger or FieldTypes.FieldTypeLong field will be displayed by using regional settings or just as
a plain number. |
void |
setVisibilityMatchingEnumIDs(java.util.Set<java.lang.Integer> enumIDs)
Configures the selected enum IDs when using the visibility mode
RecordField.Visibility.STRING_ENUM_MATCH for this field. |
void |
setVisibilityMode(RecordField.Visibility visibility)
Configures the visibility mode for this field.
|
void |
setVisibilityQueryMatchName(java.lang.String queryName)
Configures the query name to use when using the visibility mode
RecordField.Visibility.QUERY_MATCH for this field. |
void |
setVisibilityQueryString(java.lang.String query)
Configures the query string to use when using the visibility mode
RecordField.Visibility.QUERY_MATCH or as a fallback for the mode RecordField.Visibility.QUERY_MATCH . |
addChangeListener, addChangeListener, addGlobalChangeListener, addPackListener, forgetPush, getPack, isShared, popPack, pushPack, removeChangeListener, removeChangeListener, removeGlobalChangeListener, removePackListener, save, save, toString, writeAsXML
public static final int ENUM_VIEW_MODE_OPTION_DROPDOWN_MENU
public static final int ENUM_VIEW_MODE_OPTION_RADIO_BUTTONS
public static final int IMAGE_SIZE_OPTION_SMALL
public static final int IMAGE_SIZE_OPTION_MEDIUM
public static final int IMAGE_SIZE_OPTION_LARGE
public int getType()
public boolean isSeparator()
public java.lang.String getUID()
public int getValueInterpretation()
public java.lang.String getFieldName()
public java.lang.String getFieldName(int languageID)
languageID
- specifying the language for the descriptionpublic void setFieldName(int languageID, java.lang.String name)
languageID
- the language to set the name forname
- the new namepublic int getSpacing()
public void setSpacing(int value)
value
- spacing around this field when being renderedpublic boolean getShowFrame()
public void setShowFrame(boolean value)
value
- set to true if this field should be rendered with a framepublic int getTextNumberOfLines()
FieldTypes.FieldTypeString
and FieldTypes.FieldTypeEnum
. Defaults to 1 for FieldTypes.FieldTypeString
and 5 for FieldTypes.FieldTypeEnum
.public void setTextNumberOfLine(int value)
FieldTypes.FieldTypeString
and FieldTypes.FieldTypeEnum
.value
- number of lines for this fieldpublic int getMaximumFractionDigits()
FieldTypes.FieldTypeDouble
. Defaults to
2.public void setMaximumFractionDigits(int value)
FieldTypes.FieldTypeDouble
.value
- number of fraction digits for this fieldpublic int getPreferredSingleValueEnumView()
ENUM_VIEW_MODE_OPTION_DROPDOWN_MENU
and ENUM_VIEW_MODE_OPTION_RADIO_BUTTONS
. Defaults to ENUM_VIEW_MODE_OPTION_DROPDOWN_MENU
.public void setPreferredSingleValueEnumView(int view)
ENUM_VIEW_MODE_OPTION_DROPDOWN_MENU
and ENUM_VIEW_MODE_OPTION_RADIO_BUTTONS
.view
- mode for rendering this enum fieldpublic java.lang.String getCategoryViewSet()
public void setCategoryViewSet(java.lang.String categoryViewSet)
categoryViewSet
- category view set to use for showing further detailspublic int getImageSize()
IMAGE_SIZE_OPTION_SMALL
, IMAGE_SIZE_OPTION_MEDIUM
and IMAGE_SIZE_OPTION_LARGE
. Defaults to IMAGE_SIZE_OPTION_SMALL
.public void setImageSize(int value)
IMAGE_SIZE_OPTION_SMALL
, IMAGE_SIZE_OPTION_MEDIUM
and IMAGE_SIZE_OPTION_LARGE
.value
- default image size for this thumbnail fieldpublic FontDetail getFontMac()
public FontDetail getFontWin()
public FontDetail getFont()
public boolean isUsePreferredLanguage()
GUID.UID_REC_CATEGORIES
field.public void setUsePreferredLanguage(boolean value)
GUID.UID_REC_CATEGORIES
field.value
- whether this field is configured to use a preferred language for displaying the contentpublic int getPreferredLanguageID()
GUID.UID_REC_CATEGORIES
field.public void setPreferredLanguageID(int languageID)
GUID.UID_REC_CATEGORIES
field.languageID
- language ID to use for displaying the contentpublic boolean getShowEmbeddedMetadataTags()
FieldTypes.FieldTypePicture
field will be extended with the content of the GUID.UID_EMBEDDED_METADATA_TAGS
field.public void setShowEmbeddedMetadataTags(boolean value)
FieldTypes.FieldTypePicture
field should be extended with the content of the GUID.UID_EMBEDDED_METADATA_TAGS
field.value
- true if the picture should be extendedpublic boolean getUseRegionalSettings()
FieldTypes.FieldTypeInteger
or FieldTypes.FieldTypeLong
field will be displayed by using regional settings or just as a
plain number.public void setUseRegionalSettings(boolean value)
FieldTypes.FieldTypeInteger
or FieldTypes.FieldTypeLong
field will be displayed by using regional settings or just as
a plain number.value
- true if regional settings should be respectedpublic RecordField.Visibility getVisibilityMode()
public void setVisibilityMode(RecordField.Visibility visibility)
visibility
- new visibility mode for this fieldpublic java.util.Set<java.lang.Integer> getVisibilityMatchingEnumIDs()
RecordField.Visibility.STRING_ENUM_MATCH
for this field.RecordField.Visibility.STRING_ENUM_MATCH
for this fieldpublic void setVisibilityMatchingEnumIDs(java.util.Set<java.lang.Integer> enumIDs)
RecordField.Visibility.STRING_ENUM_MATCH
for this field.enumIDs
- selected enum IDs when using the visibility mode RecordField.Visibility.STRING_ENUM_MATCH
for this fieldpublic java.lang.String getVisibilityQueryMatchName()
RecordField.Visibility.QUERY_MATCH
for this field.RecordField.Visibility.QUERY_MATCH
for this field or null
if not configuredpublic void setVisibilityQueryMatchName(java.lang.String queryName)
RecordField.Visibility.QUERY_MATCH
for this field.queryName
- query name to use when using the visibility mode RecordField.Visibility.QUERY_MATCH
for this fieldpublic java.lang.String getVisibilityQueryString()
RecordField.Visibility.STRING_ENUM_MATCH
for this field. When this field uses the mode RecordField.Visibility.QUERY_MATCH
try to look up the query referenced by getVisibilityQueryMatchName()
using Preferences.getRecordQuery(String)
first and use this query string only as a fallback in case that query is currently not available.public void setVisibilityQueryString(java.lang.String query)
RecordField.Visibility.QUERY_MATCH
or as a fallback for the mode RecordField.Visibility.QUERY_MATCH
.query
- query stringpublic boolean isVisibleForItem(Item item, java.util.Map<java.lang.String,java.lang.Boolean> visibilityQueryResultCache)
item
- item to checkvisibilityQueryResultCache
- null
or a cache map which is filled by this method based on the given item and should be reused for the next
calls to this method on the same itemwww.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.