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 intorientation-
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 voidflip()intgetOrientation()Return an the item's current orientation.protected voidreadImpl(java.io.ObjectInputStream in)voidsetOrientation(int orientation)voidturnLeft()voidturnRight()protected voidwriteImpl(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:
setOrientationin interfaceFlippablePageItem
-
getOrientation
public int getOrientation()
Description copied from interface:PageItemReturn an the item's current orientation. If the item does not implementFlippablePageItem, it should always returnPageItem.ORIENT_UPRIGHT.- Specified by:
getOrientationin interfacePageItem- Overrides:
getOrientationin classAbstractItem- Returns:
- the item's orientation value
-
turnLeft
public final void turnLeft()
- Specified by:
turnLeftin interfaceFlippablePageItem
-
turnRight
public final void turnRight()
- Specified by:
turnRightin interfaceFlippablePageItem
-
flip
public final void flip()
- Specified by:
flipin interfaceFlippablePageItem
-
writeImpl
protected void writeImpl(java.io.ObjectOutputStream out) throws java.io.IOException- Overrides:
writeImplin classAbstractItem- Throws:
java.io.IOException
-
readImpl
protected void readImpl(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException- Overrides:
readImplin classAbstractItem- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-