public class ComponentViewport2D extends Viewport2D implements PropertyChangeListener
EMPTY_GEOMETRY| Constructor and Description |
|---|
ComponentViewport2D(Project project,
JComponent component) |
| Modifier and Type | Method and Description |
|---|---|
BoundingBox |
getBoundingBox(double x,
double y,
double scale)
Get the bounding box for the dimensions of the viewport at the specified
scale, centred at the x, y model coordinates.
|
BoundingBox |
getBoundingBox(double x1,
double y1,
double x2,
double y2)
Get the bounding box in model units for the pair of coordinates in view
units.
|
BoundingBox |
getBoundingBox(int x,
int y,
double scale)
Get the bounding box for the dimensions of the viewport at the specified
scale, centred at the x, y view coordinates.
|
Cursor |
getCursor() |
double |
getMaxScale() |
double |
getModelHeight(double scale) |
<Q extends javax.measure.quantity.Quantity> |
getModelToScreenUnit(javax.measure.unit.Unit<Q> modelUnit) |
double |
getModelWidth(double scale) |
Rectangle |
getRectangle(int x1,
int y1,
int x2,
int y2)
Get the rectangle in view units for the pair of coordinates in view units.
|
javax.measure.unit.Unit<javax.measure.quantity.Length> |
getScaleUnit(double scale) |
<Q extends javax.measure.quantity.Quantity> |
getScreenToModelUnit(javax.measure.unit.Unit<Q> modelUnit) |
BoundingBox |
getValidBoundingBox(BoundingBox boundingBox) |
void |
propertyChange(PropertyChangeEvent event) |
void |
repaint() |
void |
setGeometryFactory(GeometryFactory geometryFactory)
Set the coordinate system the map is displayed in.
|
void |
setInitialized(boolean initialized) |
void |
translate(double dx,
double dy) |
void |
update() |
void |
updateCachedFields() |
createModelToScreenTransform, createScreenToModelTransform, drawGeometry, drawText, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getGeometry, getGeometryFactory, getGraphics, getModelHeight, getModelHeightLength, getModelToScreenTransform, getModelUnitsPerViewUnit, getModelWidth, getModelWidthLength, getOriginX, getOriginY, getPixelsPerXUnit, getPixelsPerYUnit, getPixelsPerYUnit, getProject, getPropertyChangeSupport, getRoundedGeometry, getRoundedGeometryFactory, getScale, getScale, getScaleForUnitsPerPixel, getScales, getScreenResolution, getScreenToModelTransform, getScreenUnit, getUnitsPerPixel, getUnitsPerPixel, getViewAspectRatio, getViewHeightLength, getViewHeightPixels, getViewToModelUnit, getViewWidthLength, getViewWidthPixels, getZoomOutScale, isHidden, isInitialized, render, setBoundingBox, setBoundingBoxInternal, setScale, setScales, setViewHeight, setViewWidth, toDisplayValue, toDisplayValue, toModelCoordinates, toModelPoint, toModelPoint, toModelPoint, toModelPoint, toModelPoint, toModelPointRounded, toViewCoordinates, toViewPoint, toViewPointpublic ComponentViewport2D(Project project, JComponent component)
public BoundingBox getBoundingBox(double x, double y, double scale)
x - The model x coordinate.y - The model y coordinate.scale - The scale.public BoundingBox getBoundingBox(double x1, double y1, double x2, double y2)
x1 - The first x value.y1 - The first y value.x2 - The second x value.y2 - The second y value.public BoundingBox getBoundingBox(int x, int y, double scale)
x - The view x coordinate.y - The view y coordinate.scale - The scale.public Cursor getCursor()
public double getMaxScale()
public double getModelHeight(double scale)
public <Q extends javax.measure.quantity.Quantity> javax.measure.unit.Unit<Q> getModelToScreenUnit(javax.measure.unit.Unit<Q> modelUnit)
public double getModelWidth(double scale)
public Rectangle getRectangle(int x1, int y1, int x2, int y2)
x1 - The first x value.y1 - The first y value.x2 - The second x value.y2 - The second y value.public javax.measure.unit.Unit<javax.measure.quantity.Length> getScaleUnit(double scale)
public <Q extends javax.measure.quantity.Quantity> javax.measure.unit.Unit<Q> getScreenToModelUnit(javax.measure.unit.Unit<Q> modelUnit)
public BoundingBox getValidBoundingBox(BoundingBox boundingBox)
public void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerpublic void repaint()
public void setGeometryFactory(GeometryFactory geometryFactory)
setGeometryFactory in class Viewport2DcoordinateSystem - The coordinate system the map is displayed in.public void setInitialized(boolean initialized)
setInitialized in class Viewport2Dpublic void translate(double dx,
double dy)
public void update()
update in class Viewport2Dpublic void updateCachedFields()
Copyright © 2015 Revolution Systems Inc.. All rights reserved.