public class ViewScreen2D extends GRActor2D implements Placeable, ViewScreenInterface
Red (cxh) |
Yellow (ismael) |
Modifier and Type | Class and Description |
---|---|
class |
ViewScreen2D.ViewScreen2DListener
Listen for Layer, LayerMotion and Key events.
|
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
ColorAttribute |
backgroundColor
The red, green, blue, and alpha components of the background color
of the viewscreen.
|
Parameter |
horizontalPixels
The horizontal resolution of the display screen.
|
Parameter |
lowerRightX
The x coordinate of the canvas point visible in the lower right
corner of the display screen.
|
Parameter |
lowerRightY
The y coordinate of the canvas point visible in the lower right
corner of the display screen.
|
Parameter |
rotatable
Boolean variable that determines if the user is allowed to
rotate the scene.
|
Parameter |
scalable
Boolean variable that determines if the user is allowed to
scale the scene.
|
TypedIOPort |
sceneGraphIn
The input scene graph.
|
Parameter |
showAxes
Boolean variable that determines if the axes crosshairs are shown
This parameter should contain a BooleanToken.
|
Parameter |
translatable
Boolean variable that determines if the user is allowed to
translate the scene.
|
Parameter |
upperLeftX
The x coordinate of the canvas point visible in the upper left
corner of the display screen.
|
Parameter |
upperLeftY
The y coordinate of the canvas point visible in the upper left
corner of the display screen.
|
Parameter |
verticalPixels
The vertical resolution of the display screen.
|
_viewScreen
_allowAttributeChanges, _isSceneGraphInitialized
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
ViewScreen2D(CompositeEntity container,
java.lang.String name)
Construct a ViewScreen2D in the given container with the given name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_addChild(Figure figure)
Add a figure to the figure layer and set its interactor.
|
protected void |
_createViewScreen2D()
Create the view screen component.
|
protected int |
_getHorizontalPixels()
Return the horizontal pixels by reading the horizontalPixels parameter.
|
protected int |
_getVerticalPixels()
Return the vertical pixels by reading the verticalPixels parameter.
|
protected boolean |
_isRotatable()
Return the value of the rotatable parameter.
|
protected boolean |
_isScalable()
Return the value of the scalable parameter.
|
protected boolean |
_isTranslatable()
Return the value of the translatable parameter.
|
protected void |
_makeSceneGraphConnection()
Set up the scene graph connections of this actor.
|
void |
fire()
Repaint the canvas.
|
JCanvas |
getCanvas()
Return the Diva canvas used by this view screen.
|
BasicFigure |
getCrosshairX()
Return the horizontal component of the crosshair which marks
the origin.
|
BasicFigure |
getCrosshairY()
Return the vertical component of the crosshair which marks the
origin.
|
java.awt.geom.Point2D.Double |
getOrigin()
Return the location of the origin of the viewscreen.
|
Figure |
getSelectedFigure()
Return the figure currently selected in the viewscreen.
|
void |
initialize()
Initialize the execution.
|
void |
place(java.awt.Container container)
Set the container that this actor should display data in.
|
void |
setSelectedFigure(Figure figure)
Update the state of this object to reflect which figure is
currently selected in the viewscreen.
|
void |
wrapup()
Wrap up an execution.
|
_setViewScreen
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public ColorAttribute backgroundColor
public TypedIOPort sceneGraphIn
public Parameter horizontalPixels
public Parameter rotatable
public Parameter scalable
public Parameter showAxes
public Parameter translatable
public Parameter verticalPixels
public Parameter upperLeftX
public Parameter upperLeftY
public Parameter lowerRightX
public Parameter lowerRightY
public ViewScreen2D(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- Container of the director.name
- Name of this ViewScreen2D.IllegalActionException
- If this actor
is not compatible with the specified container.NameDuplicationException
- If the container not a
CompositeActor and the name collides with an entity in the container.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class GRActor
IllegalActionException
- If an error occurs
during the scene graph initialization.public JCanvas getCanvas()
public BasicFigure getCrosshairX()
public BasicFigure getCrosshairY()
public java.awt.geom.Point2D.Double getOrigin()
public Figure getSelectedFigure()
setSelectedFigure(Figure figure)
public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class GRActor
IllegalActionException
- If the base class throws it.public void place(java.awt.Container container)
public void setSelectedFigure(Figure figure)
figure
- The figure currently selected.getSelectedFigure()
public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
wrapup
in class GRActor
IllegalActionException
- If the base class throws it.protected void _addChild(Figure figure) throws IllegalActionException
figure
- The figure that is to be added.IllegalActionException
- Always thrown for this base class.protected void _createViewScreen2D() throws IllegalActionException
IllegalActionException
- If there is a problem reading
a parameter.protected int _getHorizontalPixels() throws IllegalActionException
IllegalActionException
- If thrown while reading the
parameter.protected int _getVerticalPixels() throws IllegalActionException
IllegalActionException
- If thrown while reading the
parameter.protected boolean _isRotatable() throws IllegalActionException
IllegalActionException
- If thrown while reading the
parameter.protected boolean _isScalable() throws IllegalActionException
IllegalActionException
- If thrown while reading the
parameter.protected boolean _isTranslatable() throws IllegalActionException
IllegalActionException
- If thrown while reading the
parameter.protected void _makeSceneGraphConnection() throws IllegalActionException
_makeSceneGraphConnection
in class GRActor
IllegalActionException
- Always thrown for this base class.