Class Curve
- java.lang.Object
-
- ca.cgjennings.apps.arkham.deck.item.AbstractItem
-
- ca.cgjennings.apps.arkham.deck.item.Line
-
- ca.cgjennings.apps.arkham.deck.item.Curve
-
- All Implemented Interfaces:
LineStyle,PageItem,ShadowStyle,SizablePageItem,Style,java.io.Serializable,java.lang.Cloneable
public class Curve extends Line
An page item representing a quadratic parametric curve segment.- 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 inherited from class ca.cgjennings.apps.arkham.deck.item.Line
cachedIcon, DEFAULT_DASH_PATTERN, DEFAULT_LINE_CAP, DEFAULT_LINE_COLOR, DEFAULT_LINE_JOIN, DEFAULT_LINE_WIDTH, dsc
-
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 Curve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D.DoublegetControlPoint()doublegetCX()doublegetCY()DragHandle[]getDragHandles()Returns an array of the customDragHandles for this item.java.awt.ShapegetOutline()Return aShapethat corresponds to the outline of this item.javax.swing.ImageIcongetThumbnailIcon()Returns a small representative icon for this item.booleanhasExteriorHandles()Returnstrueif this item has one or more drag handles that may lie outside of the item's bounding box.voidpaint(java.awt.Graphics2D g, RenderTarget target, double renderResolutionHint)Paint this item at its current location.protected voidreadImpl(java.io.ObjectInputStream in)voidsetControlPoint(java.awt.geom.Point2D cp)protected voidwriteImpl(java.io.ObjectOutputStream out)-
Methods inherited from class ca.cgjennings.apps.arkham.deck.item.Line
applyStrokeAndPaint, clone, getEndPoint, getHeight, getLineCap, getLineColor, getLineDashPattern, getLineJoin, getLineWidth, getName, getRectangle, getStartPoint, getWidth, getX2, getY2, isShadowed, paintFast, setEndPoint, setLineCap, setLineColor, setLineDashPattern, setLineJoin, setLineWidth, setName, setShadowed, setSize, setStartPoint
-
Methods inherited from class ca.cgjennings.apps.arkham.deck.item.AbstractItem
customizePopupMenu, getBleedMargin, getClassesSnappedTo, getClientProperty, getFoldMarks, getGroup, getLocation, getOrientation, getPage, getSnapClass, getSnapTarget, getX, getY, hitTest, isBleedMarginMarked, isHorizontal, isMirrored, isSelectionLocked, isTurned0DegreesFrom, isTurned180DegreesFrom, isTurned90DegreesFrom, isVertical, itemChanged, itemChanging, 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
customizePopupMenu, getBleedMargin, getClassesSnappedTo, getClientProperty, getFoldMarks, getGroup, getLocation, getOrientation, getPage, getSnapClass, getSnapTarget, getX, getY, hitTest, isBleedMarginMarked, isHorizontal, isMirrored, isSelectionLocked, isTurned0DegreesFrom, isTurned180DegreesFrom, isTurned90DegreesFrom, isVertical, prepareToPaint, putClientProperty, setClassesSnappedTo, setGroup, setLocation, setLocation, setPage, setSelectionLocked, setSnapClass, setSnapTarget, setX, setY
-
-
-
-
Method Detail
-
getThumbnailIcon
public javax.swing.ImageIcon getThumbnailIcon()
Description copied from interface:PageItemReturns a small representative icon for this item. The icon should beICON_SIZEpixels wide and high.- Specified by:
getThumbnailIconin interfacePageItem- Overrides:
getThumbnailIconin classLine
-
getControlPoint
public java.awt.geom.Point2D.Double getControlPoint()
-
setControlPoint
public void setControlPoint(java.awt.geom.Point2D cp)
-
getCX
public double getCX()
-
getCY
public double getCY()
-
paint
public void paint(java.awt.Graphics2D g, RenderTarget target, double renderResolutionHint)Description copied from interface:PageItemPaint this item at its current location. The graphics context will be scaled so that 1 unit represents 1 point. The resolution hint is a suggestion as to the resolution the item should be rendered at if it must be converted to a bitmap before being drawn. It may or may not represent the actual resolution of the output target.
-
getOutline
public java.awt.Shape getOutline()
Description copied from interface:PageItemReturn aShapethat corresponds to the outline of this item. In the simplest case, this can return the same result asPageItem.getRectangle(). If precise geometry is available for the item, then this should return a more accurate bounding shape.- Specified by:
getOutlinein interfacePageItem- Overrides:
getOutlinein classLine- Returns:
- the outline of this object
-
getDragHandles
public DragHandle[] getDragHandles()
Description copied from class:AbstractItemReturns an array of the customDragHandles for this item. If the item has no handles, returnsnull.Concrete subclasses should create an array of handles on demand and cache them in the
dragHandlesfield in order to ensure that handles are not shared between copies of the item. Example:public DragHandle[] getDragHandles() { if( dragHandles == null ) { dragHandles = new DragHandle[] { ... }; } return dragHandles; }- Specified by:
getDragHandlesin interfacePageItem- Overrides:
getDragHandlesin classLine- Returns:
- an array of drag handles that can be used to manipulate the item,
or
null
-
hasExteriorHandles
public boolean hasExteriorHandles()
Description copied from interface:PageItemReturnstrueif this item has one or more drag handles that may lie outside of the item's bounding box. The editor normally only tests handles that lie within the bounding box to see if the user has pointed at them; if this method returnstruethen the item's handles are always tested.- Specified by:
hasExteriorHandlesin interfacePageItem- Overrides:
hasExteriorHandlesin classLine- Returns:
trueif some handles may be outside the bounding box
-
writeImpl
protected void writeImpl(java.io.ObjectOutputStream out) throws java.io.IOException
-
-