facets.core.app.avatar
Class PlaneViewWorks

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.StatefulCore
          extended by facets.core.superficial.app.SelectionView
              extended by facets.core.app.avatar.AvatarViewWorks
                  extended by facets.core.app.avatar.PlaneViewWorks
All Implemented Interfaces:
AvatarView, PlaneView, SView, Stateful, Titled, java.io.Serializable
Direct Known Subclasses:
ZoomPanViewWorks

public class PlaneViewWorks
extends AvatarViewWorks
implements PlaneView

AvatarViewWorks that implements PlaneView.

Also has a number of utility class methods.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface facets.core.app.avatar.PlaneView
PlaneView.ResizeResponse
 
Field Summary
static int LINES_GROUP
           
static int LINES_SINGLE
           
static int MODEL_CONSTRAIN
           
static int MODEL_EDIT
           
static int MODEL_ELEMENTS
           
static int MODEL_SNAP
           
static double NO_SCALE
           
 
Fields inherited from class facets.core.app.avatar.AvatarViewWorks
avatars
 
Fields inherited from interface facets.core.app.avatar.PlaneView
INCH_PTS, ZOOM_IN, ZOOM_OUT
 
Fields inherited from interface facets.core.superficial.app.SView
NO_VIEW
 
Constructor Summary
PlaneViewWorks(java.lang.String title, double showWidth, double showHeight, Vector plotShift, double scale, AvatarPolicies avatars)
           
 
Method Summary
 java.lang.Object backgroundStyle()
          Style for view background.
 boolean doConstrain()
           
 boolean doSnap()
           
 boolean isLive()
          Implements interface method.
 int markLeapPixels()
          Specifies the pixel gap that should be leapt to a point mark.
 int markPixels()
          Specifies the pixel size of a point mark.
 STarget newFrame()
           
protected  STarget[] newFrameElements()
           
 Line[][] newLineSets(Point at, double width, double height, int count)
          Generate sets of abstract lines.
 Line[] newTestLineSet(double scale, Point boxAt, double height, double width, int shiftCount)
           
 int pickHitPixels()
          Specifies the pixel gap that counts as a hit when picking.
 Vector plotShift()
          The location of the viewport origin.
 PlaneView.ResizeResponse resizeResponse()
          Does the view adjust its scale or its shape if the viewer facet is resized?
 double scale()
           
 void setShowValues(double width, double height, Vector plotShift, double scale)
          Set the view area.
 void setState(java.lang.Object state)
          Implements interface method.
 double showHeight()
          The minimum unscaled height of the viewport onto the plane.
 double showWidth()
          The minimum unscaled width of the viewport onto the plane.
 java.lang.Object stamp()
          Identifier that should change with each change in view properties.
 java.lang.String toString()
          Re-implementation wrapping Debug.info(Object).
 int ySign()
          Which way up is the unscaled Y axis?.
 
Methods inherited from class facets.core.app.avatar.AvatarViewWorks
allowMultipleSelection, avatars, doesDnD
 
Methods inherited from class facets.core.superficial.app.SelectionView
newViewerSelection
 
Methods inherited from class facets.util.StatefulCore
copyState, setTitle, stateEquals, stateStamp, title, updateStateStamp
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface facets.core.app.avatar.AvatarView
avatars, doesDnD
 
Methods inherited from interface facets.core.superficial.app.SView
allowMultipleSelection
 
Methods inherited from interface facets.util.Titled
title
 

Field Detail

LINES_SINGLE

public static final int LINES_SINGLE
See Also:
Constant Field Values

LINES_GROUP

public static final int LINES_GROUP
See Also:
Constant Field Values

MODEL_CONSTRAIN

public static final int MODEL_CONSTRAIN
See Also:
Constant Field Values

MODEL_SNAP

public static final int MODEL_SNAP
See Also:
Constant Field Values

MODEL_EDIT

public static final int MODEL_EDIT
See Also:
Constant Field Values

MODEL_ELEMENTS

public static final int MODEL_ELEMENTS
See Also:
Constant Field Values

NO_SCALE

public static final double NO_SCALE
See Also:
Constant Field Values
Constructor Detail

PlaneViewWorks

public PlaneViewWorks(java.lang.String title,
                      double showWidth,
                      double showHeight,
                      Vector plotShift,
                      double scale,
                      AvatarPolicies avatars)
Method Detail

setShowValues

public void setShowValues(double width,
                          double height,
                          Vector plotShift,
                          double scale)
Description copied from interface: PlaneView
Set the view area.

Specified by:
setShowValues in interface PlaneView
Parameters:
width - will be returned as PlaneView.showWidth()
height - will be returned as PlaneView.showHeight()
plotShift - will be returned as PlaneView.plotShift()
scale - will be returned as

newFrame

public STarget newFrame()

setState

public void setState(java.lang.Object state)
Description copied from class: StatefulCore
Implements interface method.

Does not actually set any state, but does change the value returned by StatefulCore.stateStamp(): if updating itself by calling StatefulCore.updateStateStamp(), otherwise by casting src to a Stateful and copying its StatefulCore.stateStamp()

Specified by:
setState in interface Stateful
Overrides:
setState in class StatefulCore
Parameters:
state - must be non-null and interpretable by the implementation as state information; it will usually be another instance of the Stateful's class.

toString

public java.lang.String toString()
Description copied from class: StatefulCore
Re-implementation wrapping Debug.info(Object).

Overrides:
toString in class StatefulCore

newLineSets

public final Line[][] newLineSets(Point at,
                                  double width,
                                  double height,
                                  int count)
Generate sets of abstract lines.

The number and arrangement of lines is unspecified, but each set will fit within a box proportioned as defined by width and height; the sets will be generated right and down from at.

Parameters:
at - the starting point for generating line sets
width - the width of the defining bounding box
height - the height of the defining bounding box
count - how many line sets to generate (the more, the smaller)

newFrameElements

protected STarget[] newFrameElements()

newTestLineSet

public final Line[] newTestLineSet(double scale,
                                   Point boxAt,
                                   double height,
                                   double width,
                                   int shiftCount)

showHeight

public final double showHeight()
Description copied from interface: PlaneView
The minimum unscaled height of the viewport onto the plane.

Specified by:
showHeight in interface PlaneView
Returns:
a positive double

showWidth

public final double showWidth()
Description copied from interface: PlaneView
The minimum unscaled width of the viewport onto the plane.

Specified by:
showWidth in interface PlaneView
Returns:
a positive double

plotShift

public final Vector plotShift()
Description copied from interface: PlaneView
The location of the viewport origin.

Specified by:
plotShift in interface PlaneView
Returns:
any Vector

scale

public final double scale()
Specified by:
scale in interface PlaneView

ySign

public int ySign()
Description copied from interface: PlaneView
Which way up is the unscaled Y axis?.

Specified by:
ySign in interface PlaneView
Returns:
either +1 or -1.

resizeResponse

public PlaneView.ResizeResponse resizeResponse()
Description copied from interface: PlaneView
Does the view adjust its scale or its shape if the viewer facet is resized?

Specified by:
resizeResponse in interface PlaneView

backgroundStyle

public java.lang.Object backgroundStyle()
Description copied from interface: AvatarView
Style for view background.

Can specify colour, texture etc.

Specified by:
backgroundStyle in interface AvatarView

doConstrain

public boolean doConstrain()

doSnap

public boolean doSnap()

isLive

public boolean isLive()
Description copied from class: SelectionView
Implements interface method.

Default returns false.

Specified by:
isLive in interface SView
Overrides:
isLive in class SelectionView

markLeapPixels

public final int markLeapPixels()
Description copied from interface: AvatarView
Specifies the pixel gap that should be leapt to a point mark.

Specified by:
markLeapPixels in interface AvatarView
Returns:
a positive integer

markPixels

public final int markPixels()
Description copied from interface: AvatarView
Specifies the pixel size of a point mark.

Specified by:
markPixels in interface AvatarView
Returns:
a positive integer

pickHitPixels

public final int pickHitPixels()
Description copied from interface: AvatarView
Specifies the pixel gap that counts as a hit when picking.

Specified by:
pickHitPixels in interface AvatarView
Returns:
a positive integer

stamp

public java.lang.Object stamp()
Description copied from interface: PlaneView
Identifier that should change with each change in view properties.

Specified by:
stamp in interface PlaneView
Returns:
typically an Integer containing an auto-incremented value