jview
Class JAntarctica

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by jview.JImageComponent
                  extended by jview.JAntarctica
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Initializable, ResourceAware, ResourceComposed
Direct Known Subclasses:
JAntarcticaNight

public class JAntarctica
extends JImageComponent
implements ResourceComposed, Initializable

Displays a stereographic projection of antarctica. The formulars governing a stereographic projection projection are

 x = R·sin(λ)
    y = R·cos(λ),
    R = cos(φ)/(1-sin(φ))
 
for Antarctica. Thus with inversions
 tan(λ) = x/y
    sin(φ) = (k²-1)/(k²+1),
    k = (x²+y²)
 
This class provides methods for converting geographical coordinates in x-y of a stereographic projection, but does not display anything except antarctica. The image of antarctica is loaded on init. This image is copyrgiht under Australian Antarctic Division 2002 Kingston Tasmania 7050. Downloaded from Antarctica and scaled to fit.

See Also:
Serialized Form

Nested Class Summary
static class JAntarctica.Show
          Shows the earth in a mercator projection.
 
Nested classes/interfaces inherited from class jview.JImageComponent
JImageComponent.Display
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private static String DEFANTARCTICA
          The location of the mercator map.
private static double DEFRADIUS
          The default scale factor in x.
private static String DEFURLRESOURCES
          The url-resources.
private static double DEFXORIGIN
          The default origin in x.
private static double DEFYORIGIN
          The default origin in y.
private  ResourceSupplying info
          My properties.
static String KEY_ANTARCTICA
          The key to the location of the mercator map as an image.
static String KEY_RADIUS
          The scale factor in x if coordinates are given in degrees.
static String KEY_XORIGIN
          The x-position of the zero point in geographical coordinates.
static String KEY_YORIGIN
          The y-position of the zero point in geographical coordinates.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JAntarctica(ResourceSupplying info)
          Constructs a new JMosaic with at least one of the row and column numbers specified.
 
Method Summary
 ResourceSupplying getComposedProperties()
          Returns my properties.
 Point2D getGeography(Point pix)
          Inverses the getPixel(double, double) method using the input coordinates on the image.
 Point getPixel(double lambda, double phi)
          Calculates the position on the mercator image of a geographical position on earth.
 void init()
          Loads the image on init.
 void setComposedProperties(ResourceSupplying prop)
          Sets the proberties of the mosaic and defines its layout as grid layout.
 
Methods inherited from class jview.JImageComponent
createBufferedImage, getImage, getPreferredSize, paintComponent, setImage
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_ANTARCTICA

public static final String KEY_ANTARCTICA
The key to the location of the mercator map as an image.

See Also:
Constant Field Values

KEY_XORIGIN

public static final String KEY_XORIGIN
The x-position of the zero point in geographical coordinates.

See Also:
Constant Field Values

KEY_YORIGIN

public static final String KEY_YORIGIN
The y-position of the zero point in geographical coordinates.

See Also:
Constant Field Values

KEY_RADIUS

public static final String KEY_RADIUS
The scale factor in x if coordinates are given in degrees.

See Also:
Constant Field Values

DEFURLRESOURCES

private static final String DEFURLRESOURCES
The url-resources.

See Also:
Constant Field Values

DEFANTARCTICA

private static final String DEFANTARCTICA
The location of the mercator map.

See Also:
Constant Field Values

DEFRADIUS

private static final double DEFRADIUS
The default scale factor in x.

See Also:
Constant Field Values

DEFXORIGIN

private static final double DEFXORIGIN
The default origin in x.

See Also:
Constant Field Values

DEFYORIGIN

private static final double DEFYORIGIN
The default origin in y.

See Also:
Constant Field Values

info

private ResourceSupplying info
My properties.

Constructor Detail

JAntarctica

public JAntarctica(ResourceSupplying info)
Constructs a new JMosaic with at least one of the row and column numbers specified.

Method Detail

getComposedProperties

public ResourceSupplying getComposedProperties()
Returns my properties.

Specified by:
getComposedProperties in interface ResourceComposed

setComposedProperties

public void setComposedProperties(ResourceSupplying prop)
Sets the proberties of the mosaic and defines its layout as grid layout. The list of images is cleared.

Specified by:
setComposedProperties in interface ResourceAware

init

public void init()
Loads the image on init.

Specified by:
init in interface Initializable

getPixel

public Point getPixel(double lambda,
                      double phi)
Calculates the position on the mercator image of a geographical position on earth.

Parameters:
lambda - Geographical longitude in degrees.
phi - Geographical lattitude in degrees.

getGeography

public Point2D getGeography(Point pix)
Inverses the getPixel(double, double) method using the input coordinates on the image.

Returns:
The longitude in degrees in x, latitude in degrees in y.