Class Perspective
- java.lang.Object
-
- java.awt.event.ComponentAdapter
-
- org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.Perspective
-
- All Implemented Interfaces:
ComponentListener
,EventListener
,IImageViewer
public class Perspective extends 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.VisRect
getDefaultVisibleRectangle(Component component, Image image)
Get the default visible rectangle for the projectionSet<Projections>
getSupportedProjections()
Get the supported projections for the image viewervoid
paintImage(Graphics g, BufferedImage image, Rectangle target, 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 Set<Projections> getSupportedProjections()
Description copied from interface:IImageViewer
Get the supported projections for the image viewer- Specified by:
getSupportedProjections
in interfaceIImageViewer
- Returns:
- The projections supported. Typically, only one.
-
paintImage
public void paintImage(Graphics g, BufferedImage image, Rectangle target, Rectangle r)
Description copied from interface:IImageViewer
Paint the image- Specified by:
paintImage
in interfaceIImageViewer
- Parameters:
g
- The graphics to paint onimage
- The image to painttarget
- The target arear
- The visible rectangle
-
getDefaultVisibleRectangle
public ImageDisplay.VisRect getDefaultVisibleRectangle(Component component, Image image)
Description copied from interface:IImageViewer
Get the default visible rectangle for the projection- Specified by:
getDefaultVisibleRectangle
in interfaceIImageViewer
- Parameters:
component
- The component the image will be displayed inimage
- The image that will be shown- Returns:
- The default visible rectangle
-
-