Class Marker
- java.lang.Object
-
- ca.cgjennings.apps.arkham.component.AbstractGameComponent
-
- ca.cgjennings.apps.arkham.component.Marker
-
- All Implemented Interfaces:
GameComponent
,java.io.Serializable
,java.lang.Cloneable
public final class Marker extends AbstractGameComponent
TheGameComponent
used to create generic markers and tokens.- Author:
- Chris Jennings
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class ca.cgjennings.apps.arkham.component.AbstractGameComponent
comments, hasUndrawnChanges, privateSettings, sheets
-
-
Constructor Summary
Constructors Constructor Description Marker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAll()
Set all game component data to a neutral, blank state.double
computeIdealScaleForImage(java.awt.image.BufferedImage image, java.lang.String imageKey)
AbstractGameComponentEditor<Marker>
createDefaultEditor()
Creates an editor capable of modifying this component.Sheet<Marker>[]
createDefaultSheets()
Creates a set of default sheets that are compatible with this component and associates them with the component as if by callingGameComponent.setSheets(ca.cgjennings.apps.arkham.sheet.Sheet[])
.java.lang.String
getBackText()
double
getBleedMargin()
Returns the bleed margin for this marker, which is determined by the current silhouette.java.lang.String
getFrontText()
Portrait
getPortrait(int index)
int
getPortraitCount()
java.awt.image.BufferedImage
getStencil()
java.lang.String
getStencilKey()
protected void
installDefaultPortrait(boolean front)
void
setBackText(java.lang.String backText)
void
setFrontText(java.lang.String frontText)
void
setSilhouette(Silhouette sil)
-
Methods inherited from class ca.cgjennings.apps.arkham.component.AbstractGameComponent
clone, computeMinimumScaleForImage, coreCheck, filterComponentText, getComment, getDefaultPortrait, getFullName, getName, getSettings, getSheets, getSheetTitles, hasChanged, hasUnsavedChanges, idealScaleForImage, imagePathToImage, isDeckLayoutSupported, markChanged, markChanged, markSaved, markUnsavedChanges, read, setComment, setName, setNameImpl, setSheets, write
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.cgjennings.apps.arkham.component.GameComponent
convertFrom, convertTo, createUpgradeConversionTrigger, getClassName
-
-
-
-
Method Detail
-
clearAll
public void clearAll()
Description copied from class:AbstractGameComponent
Set all game component data to a neutral, blank state. Marks all sheets as changed, as well as marking the component unsaved. Sets this component's content to an empty state. Typically, this is called from an editor when the user wishes to erase their work and start over.The base class implementation will clear the name and comments, mark the sheets changed, clear any set expansion, and mark the component unsaved.
- Specified by:
clearAll
in interfaceGameComponent
- Overrides:
clearAll
in classAbstractGameComponent
-
installDefaultPortrait
protected void installDefaultPortrait(boolean front)
-
createDefaultSheets
public Sheet<Marker>[] createDefaultSheets()
Description copied from interface:GameComponent
Creates a set of default sheets that are compatible with this component and associates them with the component as if by callingGameComponent.setSheets(ca.cgjennings.apps.arkham.sheet.Sheet[])
. As withGameComponent.getSheets()
, the returned sheets are owned by the component and must not be modified.- Specified by:
createDefaultSheets
in interfaceGameComponent
- Specified by:
createDefaultSheets
in classAbstractGameComponent
- Returns:
- the newly created sheets
-
createDefaultEditor
public AbstractGameComponentEditor<Marker> createDefaultEditor()
Description copied from interface:GameComponent
Creates an editor capable of modifying this component.- Returns:
- a new editor that can be added to the application window to edit this component
- See Also:
StrangeEonsAppWindow.addEditor(ca.cgjennings.apps.arkham.StrangeEonsEditor)
-
getStencil
public java.awt.image.BufferedImage getStencil()
-
getStencilKey
public java.lang.String getStencilKey()
-
getBleedMargin
public double getBleedMargin()
Returns the bleed margin for this marker, which is determined by the current silhouette.- Returns:
- the current bleed margin
-
setSilhouette
public void setSilhouette(Silhouette sil)
-
getFrontText
public java.lang.String getFrontText()
-
setFrontText
public void setFrontText(java.lang.String frontText)
-
getBackText
public java.lang.String getBackText()
-
setBackText
public void setBackText(java.lang.String backText)
-
getPortraitCount
public int getPortraitCount()
-
getPortrait
public Portrait getPortrait(int index)
-
computeIdealScaleForImage
public double computeIdealScaleForImage(java.awt.image.BufferedImage image, java.lang.String imageKey)
- Overrides:
computeIdealScaleForImage
in classAbstractGameComponent
-
-