edu.umd.cfar.lamp.viper.gui.canvas
Class ViperDataPLayer

java.lang.Object
  extended byedu.umd.cs.piccolo.PNode
      extended byedu.umd.cs.piccolo.PLayer
          extended byedu.umd.cfar.lamp.viper.gui.canvas.ViperDataPLayer
All Implemented Interfaces:
java.lang.Cloneable, java.awt.print.Printable, java.io.Serializable

public class ViperDataPLayer
extends edu.umd.cs.piccolo.PLayer

This is a view of what a ViperViewMediator calls the 'majorMoment', hopefully the frame of interest to the user.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.umd.cs.piccolo.PLayer
PROPERTY_CAMERAS
 
Fields inherited from class edu.umd.cs.piccolo.PNode
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
ViperDataPLayer(DataViewGenerator gen, ViperViewMediator med)
           
 
Method Summary
 void addEditor(CanvasEditor e)
          Add editor object to current frame
 void addEditorToPLayer(Attributable attr, java.lang.String attrType)
          An editor manages the mouse events, and updates the Attributable which is contained in the editor
 void clearEditors()
           
 void connectToCanvas()
           
static void debugErrPrint(boolean alwaysPrint, java.lang.String s)
           
static void debugErrPrint(java.lang.String s)
           
static void debugPrint(boolean alwaysPrint, java.lang.String s)
           
static void debugPrint(java.lang.String s)
           
 CanvasCreator getActiveCreator()
           
 CanvasEditor getActiveEditor()
           
 Attributable getAttributable(java.lang.String attrType, Attribute currAttr)
          Gets the Attributable PNode.
 CanvasEditor getEditorAt(int index)
           
 ViperViewMediator getMediator()
           
 edu.umd.cs.piccolo.PCamera getMyCamera()
           
 ViperData getViperData()
           
 boolean isMousePressed()
           
static void main(java.lang.String[] args)
          Create a simple view of the viper file passed in the command line argument.
 void mouseIsPressed()
           
 void mouseIsReleased()
           
 int numEditors()
           
static void printUsage()
           
 void setActiveEditor(CanvasEditor editor)
           
 void setDwrtEditor(CanvasEditor editor)
           
 void setMediator(ViperViewMediator mediator)
           
 void setMyCamera(edu.umd.cs.piccolo.PCamera camera)
           
 void setViperDataCanvas(ViperDataCanvas canvas)
           
 void stop()
           
 
Methods inherited from class edu.umd.cs.piccolo.PLayer
addCamera, addCamera, getCamera, getCameraCount, getCamerasReference, notifyCameras, removeCamera, removeCamera, repaintFrom
 
Methods inherited from class edu.umd.cs.piccolo.PNode
addActivity, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperty, getClientPropertyKeysIterator, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveToBack, moveToBack, moveToFront, moveToFront, offset, paint, paintAfterChildren, paramString, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ViperDataPLayer

public ViperDataPLayer(DataViewGenerator gen,
                       ViperViewMediator med)
                throws java.io.IOException
Method Detail

debugPrint

public static void debugPrint(java.lang.String s)

debugErrPrint

public static void debugErrPrint(java.lang.String s)

debugPrint

public static void debugPrint(boolean alwaysPrint,
                              java.lang.String s)

debugErrPrint

public static void debugErrPrint(boolean alwaysPrint,
                                 java.lang.String s)

mouseIsPressed

public void mouseIsPressed()

mouseIsReleased

public void mouseIsReleased()

isMousePressed

public boolean isMousePressed()

getAttributable

public Attributable getAttributable(java.lang.String attrType,
                                    Attribute currAttr)
Gets the Attributable PNode. Based on the attrType.

Parameters:
attrType - The name of a "shape" like obox, bbox, etc
currAttr - The attribute, which allows access to current value, in this frame
Returns:
Attributable is basically a PNode combined with an Attribute. This is placed on the canvas

addEditorToPLayer

public void addEditorToPLayer(Attributable attr,
                              java.lang.String attrType)
An editor manages the mouse events, and updates the Attributable which is contained in the editor

Parameters:
attr - Attributable is a combination of a PPath plus an Attribute
attrType - This indicates what kind of Attribute, e.g., obox, bbox, etc

printUsage

public static void printUsage()

main

public static void main(java.lang.String[] args)
                 throws java.net.URISyntaxException
Create a simple view of the viper file passed in the command line argument. Attempts to create a view of the first sourcefile found in the metadatafile, searching the user's file system if necessary.

Throws:
java.net.URISyntaxException

getMediator

public ViperViewMediator getMediator()

getActiveCreator

public CanvasCreator getActiveCreator()

numEditors

public int numEditors()

setMediator

public void setMediator(ViperViewMediator mediator)

clearEditors

public void clearEditors()

addEditor

public void addEditor(CanvasEditor e)
Add editor object to current frame

Parameters:
e - The editor object being added

setActiveEditor

public void setActiveEditor(CanvasEditor editor)

setDwrtEditor

public void setDwrtEditor(CanvasEditor editor)

getEditorAt

public CanvasEditor getEditorAt(int index)

getActiveEditor

public CanvasEditor getActiveEditor()

getViperData

public ViperData getViperData()
Returns:

stop

public void stop()

getMyCamera

public edu.umd.cs.piccolo.PCamera getMyCamera()
Returns:

setMyCamera

public void setMyCamera(edu.umd.cs.piccolo.PCamera camera)
Parameters:
camera -

setViperDataCanvas

public void setViperDataCanvas(ViperDataCanvas canvas)

connectToCanvas

public void connectToCanvas()