Class AbstractFlippableItem
- java.lang.Object
-
- ca.cgjennings.apps.arkham.deck.item.AbstractItem
-
- ca.cgjennings.apps.arkham.deck.item.AbstractFlippableItem
-
- All Implemented Interfaces:
FlippablePageItem
,PageItem
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractRenderedItem
,TuckBox
public abstract class AbstractFlippableItem extends AbstractItem implements FlippablePageItem
An abstract base class for items that can be turned and flipped.- Author:
- Chris Jennings
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ca.cgjennings.apps.arkham.deck.item.PageItem
PageItem.SnapClass, PageItem.SnapTarget
-
-
Field Summary
Fields Modifier and Type Field Description protected int
orientation
-
Fields inherited from class ca.cgjennings.apps.arkham.deck.item.AbstractItem
dragHandles, group, parent, selectionLock, snapClass, snapTarget, snapToClasses, xOff, yOff
-
Fields inherited from interface ca.cgjennings.apps.arkham.deck.item.PageItem
ICON_SIZE, ORIENT_MIRROR_TURN_LEFT, ORIENT_MIRROR_TURN_RIGHT, ORIENT_MIRROR_UPRIGHT, ORIENT_MIRROR_UPSIDEDOWN, ORIENT_TURN_LEFT, ORIENT_TURN_RIGHT, ORIENT_UPRIGHT, ORIENT_UPSIDEDOWN
-
-
Constructor Summary
Constructors Constructor Description AbstractFlippableItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flip()
int
getOrientation()
Return an the item's current orientation.protected void
readImpl(java.io.ObjectInputStream in)
void
setOrientation(int orientation)
void
turnLeft()
void
turnRight()
protected void
writeImpl(java.io.ObjectOutputStream out)
-
Methods inherited from class ca.cgjennings.apps.arkham.deck.item.AbstractItem
clone, customizePopupMenu, getBleedMargin, getClassesSnappedTo, getClientProperty, getDragHandles, getFoldMarks, getGroup, getHeight, getLocation, getOutline, getPage, getRectangle, getSnapClass, getSnapTarget, getThumbnailIcon, getWidth, getX, getY, hasExteriorHandles, hitTest, isBleedMarginMarked, isHorizontal, isMirrored, isSelectionLocked, isTurned0DegreesFrom, isTurned180DegreesFrom, isTurned90DegreesFrom, isVertical, itemChanged, itemChanging, paint, prepareToPaint, putClientProperty, setClassesSnappedTo, setGroup, setLocation, setLocation, setPage, setSelectionLocked, setSnapClass, setSnapTarget, setX, setY, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ca.cgjennings.apps.arkham.deck.item.PageItem
clone, customizePopupMenu, getBleedMargin, getClassesSnappedTo, getClientProperty, getDragHandles, getFoldMarks, getGroup, getHeight, getLocation, getName, getOutline, getPage, getRectangle, getSnapClass, getSnapTarget, getThumbnailIcon, getWidth, getX, getY, hasExteriorHandles, hitTest, isBleedMarginMarked, isHorizontal, isMirrored, isSelectionLocked, isTurned0DegreesFrom, isTurned180DegreesFrom, isTurned90DegreesFrom, isVertical, paint, prepareToPaint, putClientProperty, setClassesSnappedTo, setGroup, setLocation, setLocation, setPage, setSelectionLocked, setSnapClass, setSnapTarget, setX, setY
-
-
-
-
Method Detail
-
setOrientation
public void setOrientation(int orientation)
- Specified by:
setOrientation
in interfaceFlippablePageItem
-
getOrientation
public int getOrientation()
Description copied from interface:PageItem
Return an the item's current orientation. If the item does not implementFlippablePageItem
, it should always returnPageItem.ORIENT_UPRIGHT
.- Specified by:
getOrientation
in interfacePageItem
- Overrides:
getOrientation
in classAbstractItem
- Returns:
- the item's orientation value
-
turnLeft
public final void turnLeft()
- Specified by:
turnLeft
in interfaceFlippablePageItem
-
turnRight
public final void turnRight()
- Specified by:
turnRight
in interfaceFlippablePageItem
-
flip
public final void flip()
- Specified by:
flip
in interfaceFlippablePageItem
-
writeImpl
protected void writeImpl(java.io.ObjectOutputStream out) throws java.io.IOException
- Overrides:
writeImpl
in classAbstractItem
- Throws:
java.io.IOException
-
readImpl
protected void readImpl(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Overrides:
readImpl
in classAbstractItem
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-