public class Viewport2D extends Object implements PropertyChangeSupportProxy
| Modifier and Type | Field and Description |
|---|---|
static Geometry |
EMPTY_GEOMETRY |
| Constructor and Description |
|---|
Viewport2D() |
Viewport2D(Project project) |
Viewport2D(Project project,
int width,
int height,
BoundingBox boundingBox) |
| Modifier and Type | Method and Description |
|---|---|
AffineTransform |
createModelToScreenTransform(BoundingBox boundingBox,
double viewWidth,
double viewHeight) |
static AffineTransform |
createScreenToModelTransform(BoundingBox boundingBox,
double viewWidth,
double viewHeight) |
void |
drawGeometry(Geometry geometry,
GeometryStyle style) |
void |
drawText(LayerRecord object,
Geometry geometry,
TextStyle style) |
BoundingBox |
getBoundingBox() |
BoundingBox |
getBoundingBox(GeometryFactory geometryFactory,
int pixels) |
BoundingBox |
getBoundingBox(GeometryFactory geometryFactory,
int x,
int y,
int pixels) |
BoundingBox |
getBoundingBox(GeometryFactory geometryFactory,
MouseEvent event,
int pixels) |
Geometry |
getGeometry(Geometry geometry) |
GeometryFactory |
getGeometryFactory()
Get the coordinate system the project is displayed in.
|
Graphics2D |
getGraphics()
Deprecated.
|
double |
getModelHeight() |
javax.measure.Measurable<javax.measure.quantity.Length> |
getModelHeightLength() |
AffineTransform |
getModelToScreenTransform() |
double |
getModelUnitsPerViewUnit() |
double |
getModelWidth() |
javax.measure.Measurable<javax.measure.quantity.Length> |
getModelWidthLength() |
double |
getOriginX() |
double |
getOriginY() |
double |
getPixelsPerXUnit() |
double |
getPixelsPerYUnit() |
protected double |
getPixelsPerYUnit(double viewHeight,
double mapHeight) |
Project |
getProject() |
PropertyChangeSupport |
getPropertyChangeSupport()
Get the property change support, used to fire property change
notifications.
|
<V extends Geometry> |
getRoundedGeometry(V geometry) |
GeometryFactory |
getRoundedGeometryFactory(GeometryFactory geometryFactory) |
double |
getScale() |
static double |
getScale(javax.measure.Measurable<javax.measure.quantity.Length> viewWidth,
javax.measure.Measurable<javax.measure.quantity.Length> modelWidth) |
double |
getScaleForUnitsPerPixel(double unitsPerPixel) |
List<Long> |
getScales() |
int |
getScreenResolution() |
AffineTransform |
getScreenToModelTransform() |
javax.measure.unit.Unit<javax.measure.quantity.Length> |
getScreenUnit() |
double |
getUnitsPerPixel() |
double |
getUnitsPerPixel(double scale) |
double |
getViewAspectRatio() |
javax.measure.Measurable<javax.measure.quantity.Length> |
getViewHeightLength() |
int |
getViewHeightPixels() |
<Q extends javax.measure.quantity.Quantity> |
getViewToModelUnit(javax.measure.unit.Unit<Q> modelUnit) |
javax.measure.Measurable<javax.measure.quantity.Length> |
getViewWidthLength() |
int |
getViewWidthPixels() |
double |
getZoomOutScale(double scale) |
boolean |
isHidden(AbstractRecordLayer layer,
LayerRecord record) |
boolean |
isInitialized() |
void |
render(Layer layer) |
BoundingBox |
setBoundingBox(BoundingBox boundingBox) |
protected void |
setBoundingBoxInternal(BoundingBox boundingBox) |
void |
setGeometryFactory(GeometryFactory geometryFactory)
Set the coordinate system the project is displayed in.
|
void |
setInitialized(boolean initialized) |
void |
setScale(double scale) |
void |
setScales(List<Long> scales) |
protected void |
setViewHeight(int height) |
protected void |
setViewWidth(int width) |
double |
toDisplayValue(javax.measure.Measure<javax.measure.quantity.Length> value) |
static double |
toDisplayValue(Viewport2D viewport,
javax.measure.Measure<javax.measure.quantity.Length> measure) |
double[] |
toModelCoordinates(double... viewCoordinates) |
Point |
toModelPoint(double... viewCoordinates) |
Point |
toModelPoint(GeometryFactory geometryFactory,
double... viewCoordinates) |
Point |
toModelPoint(GeometryFactory geometryFactory,
MouseEvent event) |
Point |
toModelPoint(GeometryFactory geometryFactory,
Point point) |
Point |
toModelPoint(Point point) |
Point |
toModelPointRounded(GeometryFactory geometryFactory,
int x,
int y) |
double[] |
toViewCoordinates(double... modelCoordinates) |
Point2D |
toViewPoint(double x,
double y) |
Point2D |
toViewPoint(Point point) |
void |
update() |
public static final Geometry EMPTY_GEOMETRY
public Viewport2D()
public Viewport2D(Project project)
public Viewport2D(Project project, int width, int height, BoundingBox boundingBox)
public static AffineTransform createScreenToModelTransform(BoundingBox boundingBox, double viewWidth, double viewHeight)
public static double getScale(javax.measure.Measurable<javax.measure.quantity.Length> viewWidth,
javax.measure.Measurable<javax.measure.quantity.Length> modelWidth)
public static double toDisplayValue(Viewport2D viewport, javax.measure.Measure<javax.measure.quantity.Length> measure)
public AffineTransform createModelToScreenTransform(BoundingBox boundingBox, double viewWidth, double viewHeight)
public void drawGeometry(Geometry geometry, GeometryStyle style)
public void drawText(LayerRecord object, Geometry geometry, TextStyle style)
public BoundingBox getBoundingBox()
public BoundingBox getBoundingBox(GeometryFactory geometryFactory, int pixels)
public BoundingBox getBoundingBox(GeometryFactory geometryFactory, int x, int y, int pixels)
public BoundingBox getBoundingBox(GeometryFactory geometryFactory, MouseEvent event, int pixels)
public GeometryFactory getGeometryFactory()
@Deprecated public Graphics2D getGraphics()
public double getModelHeight()
public javax.measure.Measurable<javax.measure.quantity.Length> getModelHeightLength()
public AffineTransform getModelToScreenTransform()
public double getModelUnitsPerViewUnit()
public double getModelWidth()
public javax.measure.Measurable<javax.measure.quantity.Length> getModelWidthLength()
public double getOriginX()
public double getOriginY()
public double getPixelsPerXUnit()
public double getPixelsPerYUnit()
protected double getPixelsPerYUnit(double viewHeight,
double mapHeight)
public Project getProject()
public PropertyChangeSupport getPropertyChangeSupport()
getPropertyChangeSupport in interface PropertyChangeSupportProxypublic <V extends Geometry> V getRoundedGeometry(V geometry)
public GeometryFactory getRoundedGeometryFactory(GeometryFactory geometryFactory)
public double getScale()
public double getScaleForUnitsPerPixel(double unitsPerPixel)
public int getScreenResolution()
public AffineTransform getScreenToModelTransform()
public javax.measure.unit.Unit<javax.measure.quantity.Length> getScreenUnit()
public double getUnitsPerPixel()
public double getUnitsPerPixel(double scale)
public double getViewAspectRatio()
public javax.measure.Measurable<javax.measure.quantity.Length> getViewHeightLength()
public int getViewHeightPixels()
public <Q extends javax.measure.quantity.Quantity> javax.measure.unit.Unit<Q> getViewToModelUnit(javax.measure.unit.Unit<Q> modelUnit)
public javax.measure.Measurable<javax.measure.quantity.Length> getViewWidthLength()
public int getViewWidthPixels()
public double getZoomOutScale(double scale)
public boolean isHidden(AbstractRecordLayer layer, LayerRecord record)
public boolean isInitialized()
public void render(Layer layer)
public BoundingBox setBoundingBox(BoundingBox boundingBox)
protected void setBoundingBoxInternal(BoundingBox boundingBox)
public void setGeometryFactory(GeometryFactory geometryFactory)
coordinateSystem - The coordinate system the project is displayed in.public void setInitialized(boolean initialized)
public void setScale(double scale)
protected void setViewHeight(int height)
protected void setViewWidth(int width)
public double toDisplayValue(javax.measure.Measure<javax.measure.quantity.Length> value)
public double[] toModelCoordinates(double... viewCoordinates)
public Point toModelPoint(double... viewCoordinates)
public Point toModelPoint(GeometryFactory geometryFactory, double... viewCoordinates)
public Point toModelPoint(GeometryFactory geometryFactory, Point point)
public Point toModelPoint(GeometryFactory geometryFactory, MouseEvent event)
public Point toModelPointRounded(GeometryFactory geometryFactory, int x, int y)
public double[] toViewCoordinates(double... modelCoordinates)
public Point2D toViewPoint(double x, double y)
public void update()
Copyright © 2015 Revolution Systems Inc.. All rights reserved.