public class Perspective2D extends TypedPropertyObject implements IPerspective
Modifier and Type | Field and Description |
---|---|
static boolean |
OPENGL
Global flag for turning off OpenGL from starter.
|
Constructor and Description |
---|
Perspective2D()
Creates a 2D-Perspective.
|
Modifier and Type | Method and Description |
---|---|
void |
addVisual(Object id,
Object visual)
Adds a new visual object.
|
void |
flushRenderInfo()
Flushes the render information.
|
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
|
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.
|
Object |
getProperty(String name)
Returns a property.
|
Object |
getSelectedObject()
Returns the currently selected object.
|
IVector1 |
getSelectorDistance()
Gets the maximum distance for selecting objects.
|
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(Object id)
Removes a new visual object.
|
void |
reset()
Resets position and flushes render info
|
void |
resetZoomAndPosition()
Resets the zoom and position.
|
void |
setBackground(Color bgColor)
Sets the background color.
|
void |
setDisplayOrder(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(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(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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMetaData, getMetaDatas
getPropertyNames, hasProperty, setProperty
public Object getProperty(String name)
getProperty
in interface IPropertyObject
getProperty
in class SimplePropertyObject
name
- name of the propertypublic SimpleValueFetcher getFetcher()
public String getName()
getName
in interface IPerspective
public void setName(String name)
setName
in interface IPerspective
name
- name of the perspectivepublic Object getSelectedObject()
getSelectedObject
in interface IPerspective
public void setSelectedObject(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(Object id, Object visual)
addVisual
in interface IPerspective
id
- identifier of the objectvisual
- the visual objectpublic void removeVisual(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 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(Color bgColor)
bgColor
- the background colorpublic void setSelectorDistance(IVector1 maxDist)
maxDist
- selections distancepublic IVector1 getSelectorDistance()
public Comparator getDisplayOrder()
public void setDisplayOrder(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
Copyright © 2013. All Rights Reserved.