Class Perspective
- java.lang.Object
-
- java.awt.event.ComponentAdapter
-
- org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.Perspective
-
- All Implemented Interfaces:
java.awt.event.ComponentListener,java.util.EventListener,IImageViewer
public class Perspective extends java.awt.event.ComponentAdapter implements IImageViewer
The default perspective image viewer class. This also handles (by default) unknown projections.- Since:
- 18246
-
-
Constructor Summary
Constructors Constructor Description Perspective()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageDisplay.VisRectgetDefaultVisibleRectangle(java.awt.Component component, java.awt.Image image)Get the default visible rectangle for the projectionjava.util.Set<Projections>getSupportedProjections()Get the supported projections for the image viewervoidpaintImage(java.awt.Graphics g, java.awt.image.BufferedImage image, java.awt.Rectangle target, java.awt.Rectangle r)Paint the image-
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentMoved, componentResized, componentShown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.awt.event.ComponentListener
componentHidden, componentMoved, componentResized, componentShown
-
Methods inherited from interface org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.IImageViewer
checkAndModifyVisibleRectSize, getMaxImageSize, getRotation, mouseDragged
-
-
-
-
Constructor Detail
-
Perspective
public Perspective()
-
-
Method Detail
-
getSupportedProjections
public java.util.Set<Projections> getSupportedProjections()
Description copied from interface:IImageViewerGet the supported projections for the image viewer- Specified by:
getSupportedProjectionsin interfaceIImageViewer- Returns:
- The projections supported. Typically, only one.
-
paintImage
public void paintImage(java.awt.Graphics g, java.awt.image.BufferedImage image, java.awt.Rectangle target, java.awt.Rectangle r)
Description copied from interface:IImageViewerPaint the image- Specified by:
paintImagein interfaceIImageViewer- Parameters:
g- The graphics to paint onimage- The image to painttarget- The target arear- The visible rectangle
-
getDefaultVisibleRectangle
public ImageDisplay.VisRect getDefaultVisibleRectangle(java.awt.Component component, java.awt.Image image)
Description copied from interface:IImageViewerGet the default visible rectangle for the projection- Specified by:
getDefaultVisibleRectanglein interfaceIImageViewer- Parameters:
component- The component the image will be displayed inimage- The image that will be shown- Returns:
- The default visible rectangle
-
-