public class CropTemplate extends BaseManager implements Item
CropTemplatesList.getCropTemplate(String)
Modifier and Type | Class and Description |
---|---|
static class |
CropTemplate.Constraint
The cropping constraints.
|
static class |
CropTemplate.OutputSizeMode
The cropping output size mode.
|
static class |
CropTemplate.Type
The type of crop template.
|
BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
JPack |
exportSet()
Exports this set into a
JPack . |
CropTemplate.Constraint |
getConstraint()
Returns the crop constraint of this crop template.
|
java.awt.Dimension |
getCropAspectRatio()
Returns the aspect ratio constraint values for this crop template
|
java.awt.Dimension |
getCropFixedSize()
Returns the fixed size constraint value for this crop template
|
java.lang.String |
getDescription(int languageID)
Returns the description for the given language id.
|
java.lang.String |
getDisplayName(int languageID,
boolean fallbackToDefaultName)
Returns the display name for the given language id.
|
java.lang.String |
getGroupName()
Returns the name of the group this template belongs to
|
java.lang.String |
getID()
Returns the UID of the item in the items namespace.
|
boolean |
getIsDefault()
Returns whether this crop template is the default crop template.
|
java.lang.String |
getName()
Returns the name of this crop template.
|
int |
getOrientation()
Returns the orientation of the focus area for this crop template (only for template of type Type#TYPE_FOCUS_AREA)
|
java.awt.Dimension |
getOutputFixedSize()
Returns the fixed output size value for this crop template
|
CropTemplate.OutputSizeMode |
getOutputSizeMode()
Returns the output size mode of this crop template.
|
RestrictionsList |
getRestrictionsList()
Returns the list of roles and users that are allowed to view this set.
|
CropTemplate.Type |
getType()
Returns the type of this crop template.
|
boolean |
isAllowMultiple()
Returns whether this template can have multiple value items
|
boolean |
isDefault()
Returns whether this item is the default item.
|
boolean |
isMaster()
Returns whether this template is a master in its group
|
boolean |
isSharingRestricted()
Returns whether the set visibility is restricted to a group of users or roles.
|
void |
setAllowMultiple(boolean allowMultiple)
Sets whether this crop template can be repeated (have multiple value items).
|
void |
setConstraint(CropTemplate.Constraint constraint)
Sets the constraint of this crop template
|
void |
setCropAspectRatio(java.awt.Dimension aspectRatio)
Sets the aspect ratio constraint values for this crop template.
|
void |
setCropFixedSize(java.awt.Dimension fixedSize)
Sets the fixed size constraint value for this crop template.
|
void |
setDescription(int languageID,
java.lang.String description)
Sets the description for the given language.
|
void |
setDisplayName(int languageID,
java.lang.String displayName)
Sets the display name for the given language.
|
void |
setGroupName(java.lang.String groupName)
Sets the fixed output size value for this crop template.
|
void |
setIsMaster(boolean isMaster)
Sets whether this crop template is a master in its group.
|
void |
setOrientation(int orientation)
Sets the fixed output size value for this crop template.
|
void |
setOutputFixedSize(java.awt.Dimension fixedSize)
Sets the fixed output size value for this crop template.
|
void |
setOutputSizeMode(CropTemplate.OutputSizeMode outputSizeMode)
Sets the output size mode of this crop template
|
void |
setSharingRestricted(boolean value)
Sets whether the set visibility is restricted to a group of users or roles.
|
void |
setType(CropTemplate.Type type)
Sets the type of this crop template
|
addChangeListener, addChangeListener, addGlobalChangeListener, addPackListener, forgetPush, getPack, isShared, popPack, pushPack, removeChangeListener, removeChangeListener, removeGlobalChangeListener, removePackListener, save, save, toString, writeAsXML
public java.lang.String getName()
public java.lang.String getID()
Item
public boolean isDefault()
Item
public boolean getIsDefault()
public CropTemplate.Type getType()
CropTemplate.Type.TYPE_MANUAL
or CropTemplate.Type.TYPE_FOCUS_AREA
public void setType(CropTemplate.Type type)
type
- either CropTemplate.Type.TYPE_MANUAL
or CropTemplate.Type.TYPE_FOCUS_AREA
public CropTemplate.Constraint getConstraint()
public void setConstraint(CropTemplate.Constraint constraint)
constraint
- either CropTemplate.Constraint.ASPECT_RATIO
, CropTemplate.Constraint.FIXED_SIZE
, or CropTemplate.Constraint.CUSTOM
public java.awt.Dimension getCropAspectRatio()
public void setCropAspectRatio(java.awt.Dimension aspectRatio)
public java.awt.Dimension getCropFixedSize()
public void setCropFixedSize(java.awt.Dimension fixedSize)
public CropTemplate.OutputSizeMode getOutputSizeMode()
public void setOutputSizeMode(CropTemplate.OutputSizeMode outputSizeMode)
outputSizeMode
- either CropTemplate.OutputSizeMode.AS_CROPPED
, CropTemplate.OutputSizeMode.FIXED_SIZE
, or CropTemplate.OutputSizeMode.CUSTOM
public java.awt.Dimension getOutputFixedSize()
public void setOutputFixedSize(java.awt.Dimension fixedSize)
fixedSize
- the new fixed output sizepublic int getOrientation()
public void setOrientation(int orientation)
orientation
- the new orientationpublic java.lang.String getGroupName()
public void setGroupName(java.lang.String groupName)
groupName
- the group namepublic boolean isMaster()
public void setIsMaster(boolean isMaster)
isMaster
- the master indicatorpublic boolean isAllowMultiple()
public void setAllowMultiple(boolean allowMultiple)
allowMultiple
- the multiple indicatorpublic java.lang.String getDescription(int languageID)
getDescription
in interface Item
languageID
- specifying the language for the descriptionpublic void setDescription(int languageID, java.lang.String description)
setDescription
in interface Item
languageID
- the language to set the description fordescription
- the new descriptionpublic java.lang.String getDisplayName(int languageID, boolean fallbackToDefaultName)
getDisplayName
in interface Item
languageID
- specifying the language for the display namefallbackToDefaultName
- when set to true this method returns the default name when now localized display name is available otherwise nullpublic void setDisplayName(int languageID, java.lang.String displayName)
setDisplayName
in interface Item
languageID
- the language to set the display name fordisplayName
- the new display namepublic JPack exportSet()
JPack
.exportSet
in interface Item
JPack
CropTemplatesList.importSet(JPack, SetImportDuplicatesMode)
public boolean isSharingRestricted()
isSharingRestricted
in interface Item
public void setSharingRestricted(boolean value)
setSharingRestricted
in interface Item
value
- set to true if the set visibility should be restricted to a group of users or rolespublic RestrictionsList getRestrictionsList()
isSharingRestricted()
returns
true.getRestrictionsList
in interface Item
www.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.