public class Perspective2D extends TypedPropertyObject implements IPerspective
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
bgColor
The background color.
|
protected java.util.Comparator |
displayorder
Order in which objects are displayed
|
protected SimpleValueFetcher |
fetcher
The fetcher.
|
protected boolean |
invertxaxis
Flag if the x-axis should be inverted
|
protected boolean |
invertyaxis
Flag if the y-axis should be inverted
|
protected DrawableCombiner |
marker
The marker drawable combiner
|
protected java.lang.String |
name
Name of the presentation
|
protected IVector2 |
objectShift
The object shift
|
protected IObserverCenter |
obscenter
The ObserverCenter
|
static boolean |
OPENGL
Global flag for turning off OpenGL from starter.
|
protected Layer[] |
postlayers
The postlayers
|
protected Layer[] |
prelayers
The prelayers
|
protected int |
selectCycle
Selection cycle for stacked objects
|
protected java.lang.Object |
selectedobject
The selected object
|
protected jadex.extension.envsupport.observer.perspective.Perspective2D.SelectionController |
selectioncontroller
Selection controller.
|
protected IVector1 |
selectorDistance
Maximum selection distance
|
protected boolean |
tryopengl
Try OpenGL if true
|
protected IViewport |
viewport
The viewport
|
protected java.util.Map |
visuals
The visuals (DrawableCombiners)
|
protected double |
zoomlimit
The maximum zoom
|
pcs, properties
Constructor and Description |
---|
Perspective2D()
Creates a 2D-Perspective.
|
Modifier and Type | Method and Description |
---|---|
void |
addVisual(java.lang.Object id,
java.lang.Object visual)
Adds a new visual object.
|
void |
flushRenderInfo()
Flushes the render information.
|
java.util.Comparator |
getDisplayOrder()
Gets the display order.
|
SimpleValueFetcher |
getFetcher()
Get the value fetcher.
|
boolean |
getInvertXAxis()
Gets x-axis inversion.
|
boolean |
getInvertYAxis()
Gets y-axis inversion.
|
DrawableCombiner |
getMarkerDrawCombiner()
Gets the drawable combiner object for the object marker
|
java.lang.String |
getName()
Returns the name of the perspective
|
IVector2 |
getObjectShift()
Gets the object shift.
|
IObserverCenter |
getObserverCenter()
Get the ObserverCenter.
|
boolean |
getOpenGl()
Gets whether to try to use OpenGL.
|
Layer[] |
getPostlayers()
Returns the Postlayers.
|
Layer[] |
getPrelayers()
Returns the prelayers.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns a property.
|
java.lang.Object |
getSelectedObject()
Returns the currently selected object.
|
IVector1 |
getSelectorDistance()
Gets the maximum distance for selecting objects.
|
java.awt.Component |
getView()
Gets the view of the perspective.
|
IViewport |
getViewport()
Gets the viewport
|
double |
getZoom()
Returns the zoom factor
|
double |
getZoomLimit()
Gets the maximum zoom.
|
double |
getZoomStepping()
Returns the current zoom stepping
|
void |
refresh()
Refreshes the perspective.
|
void |
removeVisual(java.lang.Object id)
Removes a new visual object.
|
void |
reset()
Resets position and flushes render info
|
void |
resetZoomAndPosition()
Resets the zoom and position.
|
void |
setBackground(java.awt.Color bgColor)
Sets the background color.
|
void |
setDisplayOrder(java.util.Comparator order)
Sets the display order.
|
void |
setInvertXAxis(boolean invert)
Sets x-axis inversion.
|
void |
setInvertYAxis(boolean invert)
Sets y-axis inversion.
|
void |
setMarkerDrawCombiner(DrawableCombiner marker)
Sets the drawable combiner object for the object marker
|
void |
setName(java.lang.String name)
Sets the name of the perspective
|
void |
setObjectShift(IVector2 shift)
Sets the object shift.
|
void |
setObserverCenter(IObserverCenter obscenter)
Sets the ObserverCenter.
|
boolean |
setOpenGl(boolean opengl)
Sets whether to try to use OpenGL.
|
void |
setPostlayers(Layer[] postlayers)
Sets the Postlayers.
|
void |
setPrelayers(Layer[] prelayers)
Sets the prelayers.
|
void |
setSelectedObject(java.lang.Object obj)
Sets the selected object.
|
void |
setSelectorDistance(IVector1 maxDist)
Sets the maximum distance for selecting objects.
|
void |
setZoom(double zoom)
Sets a new zoom factor
|
void |
setZoomLimit(double zoomlimit)
Sets the maximum zoom.
|
void |
shiftPosition(IVector2 shift)
Shifts the viewport position.
|
getMetaData, getMetaDatas
addPropertyChangeListener, getProperties, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMetaData, getMetaDatas
getPropertyNames, hasProperty, setProperty
public static boolean OPENGL
protected java.lang.String name
protected IObserverCenter obscenter
protected IViewport viewport
protected jadex.extension.envsupport.observer.perspective.Perspective2D.SelectionController selectioncontroller
protected java.lang.Object selectedobject
protected int selectCycle
protected java.util.Comparator displayorder
protected IVector2 objectShift
protected IVector1 selectorDistance
protected boolean invertxaxis
protected boolean invertyaxis
protected boolean tryopengl
protected java.awt.Color bgColor
protected java.util.Map visuals
protected Layer[] prelayers
protected Layer[] postlayers
protected DrawableCombiner marker
protected double zoomlimit
protected SimpleValueFetcher fetcher
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface IPropertyObject
getProperty
in class SimplePropertyObject
name
- name of the propertypublic SimpleValueFetcher getFetcher()
public java.lang.String getName()
getName
in interface IPerspective
public void setName(java.lang.String name)
setName
in interface IPerspective
name
- name of the perspectivepublic java.lang.Object getSelectedObject()
getSelectedObject
in interface IPerspective
public void setSelectedObject(java.lang.Object obj)
setSelectedObject
in interface IPerspective
obj
- selected objectpublic void setObserverCenter(IObserverCenter obscenter)
setObserverCenter
in interface IPerspective
obscenter
- the ObserverCenterpublic IObserverCenter getObserverCenter()
getObserverCenter
in interface IPerspective
public void addVisual(java.lang.Object id, java.lang.Object visual)
addVisual
in interface IPerspective
id
- identifier of the objectvisual
- the visual objectpublic void removeVisual(java.lang.Object id)
removeVisual
in interface IPerspective
id
- identifier of the objectpublic Layer[] getPrelayers()
public void setPrelayers(Layer[] prelayers)
prelayers
- the prelayerspublic Layer[] getPostlayers()
public void setPostlayers(Layer[] postlayers)
Postlayers
- the Postlayerspublic DrawableCombiner getMarkerDrawCombiner()
public void setMarkerDrawCombiner(DrawableCombiner marker)
marker
- the marker drawablepublic java.awt.Component getView()
getView
in interface IPerspective
public IViewport getViewport()
public boolean getOpenGl()
getOpenGl
in interface IPerspective
public boolean setOpenGl(boolean opengl)
setOpenGl
in interface IPerspective
opengl
- true, if attempt should be made to use OpenGLpublic boolean getInvertXAxis()
public void setInvertXAxis(boolean invert)
invert
- true, if the x-axis should be inverted.public boolean getInvertYAxis()
public void setInvertYAxis(boolean invert)
invert
- true, if the y-axis should be inverted.public void setBackground(java.awt.Color bgColor)
bgColor
- the background colorpublic void setSelectorDistance(IVector1 maxDist)
maxDist
- selections distancepublic IVector1 getSelectorDistance()
public java.util.Comparator getDisplayOrder()
public void setDisplayOrder(java.util.Comparator order)
order
- the display orderpublic IVector2 getObjectShift()
public void setObjectShift(IVector2 shift)
shift
- the object shiftpublic double getZoomLimit()
public void setZoomLimit(double zoomlimit)
zoomlimit
- the zoom limitpublic double getZoomStepping()
public double getZoom()
public void setZoom(double zoom)
zoom
- new zoom factorpublic void shiftPosition(IVector2 shift)
shift
- relative (to current zoom/size) shift vectorpublic void reset()
reset
in interface IPerspective
public void resetZoomAndPosition()
resetZoomAndPosition
in interface IPerspective
public void flushRenderInfo()
public void refresh()
refresh
in interface IPerspective