|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jview.JNormalizedCanvas
jview.JViewportCanvas
stella.jview.JNight
public class JNight
We display an image of the earth with the current day-night boundary overlayed.
| Nested Class Summary | |
|---|---|
static class |
JNight.Show
Shows the earth in a mercator projection with the current day/night terminator. |
| Nested classes/interfaces inherited from class jview.JViewportCanvas |
|---|
JViewportCanvas.Test, JViewportCanvas.ViewportKey |
| Nested classes/interfaces inherited from class jview.JNormalizedCanvas |
|---|
JNormalizedCanvas.ShowImage |
| 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 int |
curprior
My current importance. |
private static String |
DEFBORDERS
The default map. |
private static double |
DEFDAYTWILIGHT
The default twilight border for pitch black. |
private static String |
DEFMERIDIAN
On zero meridian. |
private static double |
DEFMOONDIM
The default k of the atmosphere. |
private static double |
DEFMOONHEIGHT
The default minimum moon height. |
private static double |
DEFMOONLIGHT
The default white for full moonlight. |
private static double |
DEFMOONSTEEP
The default white for full moonlight. |
private static double |
DEFNIGHTTWILIGHT
The default twilight border for pitch black. |
private static int |
DEFPRIORITY
Default maximum priority. |
private static String |
DEFPROJECTION
The default is a plate caree projection. |
private static long |
DEFREFRESH
The default refresh interval in ms. |
private static boolean |
DEFSHOWCOORDINATE
The cursor behaviour. |
private static boolean |
DEFSHOWTIME
Show current time. |
private static String |
DEFWORLD
The default map. |
private List<PriorityListener> |
ear
My importance may change. |
static String |
KEY_ACCELERATE
If artificial advances desired, use this multiplier. |
static String |
KEY_BORDERS
The image to overlay the dawn on, should be mostly transparent. |
static String |
KEY_DAYTWILIGHT
The sol-height border between day and foggytwilight. |
static String |
KEY_FORDATE
If not for current time, but for specific. |
static String |
KEY_MERIDIAN
If the central meridian is different than zero. |
static String |
KEY_MOONDIM
The atmospheric constant for moon-light dimming per airmass. |
static String |
KEY_MOONHEIGHT
The minimum height of the moon for giving light. |
static String |
KEY_MOONLIGHT
The value for maximum moon brightness in white-color. |
static String |
KEY_MOONSTEEP
The multiplicator for dimming moon light to horizon. |
static String |
KEY_NIGHTTWILIGHT
The sol-height border between night and twilight. |
static String |
KEY_PRIORITY
The maximum priority I can acheive. |
static String |
KEY_PROJECTION
The cylindrical projection of the map, class name. |
static String |
KEY_REFRESH
The refresh interval in ms. |
static String |
KEY_SHOWTIME
If true, the current UT is shown in the lower right corner. |
static String |
KEY_WORLD
The map resource to display, an image of the earth. |
static String |
KEY_XSTEPWIDTH
A different stepwidth than one pixel. |
static String |
KEY_YSTEPWIDTH
A different stepwidth than one pixel. |
private CoordinateTransforming |
map
Coordinate transformation that translates long/lat into normalized. |
private MoonDec |
moonde
Moon position. |
private static double |
MOONMAG
Moon brighness span in magnitudes. |
private MoonAngle |
moonphi
Moon phase. |
private MoonRa |
moonra
Moon position. |
private BufferedImage |
night
The overlay on the Earth to show current twilight/night. |
private AcceleratedTime |
now
The current time. |
private SolDec |
solde
Solar position. |
private SolRa |
solra
Solar position. |
private SiderealGreenwichApparent |
theta
Sidereal time. |
| Fields inherited from class jview.JViewportCanvas |
|---|
MAXVIEW, VIEWPORTIMAGEPROPERTY, VIEWPORTPROPERTY |
| 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 | |
|---|---|
JNight(Map<String,String> info)
Constructs a new night earth giving its properties. |
|
JNight(PropertyBearing info)
Constructs a new night earth giving its properties. |
|
| Method Summary | |
|---|---|
void |
addPriorityListener(PriorityListener to)
Adds a priority listener. |
int |
currentPriority(String id)
Last priority calculated. |
protected void |
drawNight(BufferedImage into,
Point2D grid,
Dimension s0,
double noon)
If we know nothing about the tranformation, we can only point-by-point step. |
private BufferedImage |
getOverlay()
Return the buffered image we draw the twilight and night in. |
long |
getRefreshInterval()
The refresh interval is a property. |
CoordinateTransforming |
getUserTransformation()
Returns the user transfromation. |
void |
init()
Initializes additionally the parameters needed. |
boolean |
isFixedRate()
We do not want fixed rate, merely act like a cursor. |
boolean |
isRefreshNeeded()
We only want updates if we are visible. |
private void |
notifyListeners(int np)
Notifies all listeners with my component name. |
void |
paintComponent(Graphics g)
Paints the individual bars of twilight and night onto the component using x-or mode. |
void |
refresh()
On refresh, we create the overlay buffer. |
void |
removePriorityListener(PriorityListener to)
Removes a priority listener. |
void |
setComposedProperties(PropertyBearing prop)
Sets the proberties of the earth and defailts colors. |
void |
setUserTransformation(CoordinateTransforming user)
Sets the tranformation from user coordinates to normalized cooridnates. |
| Methods inherited from class jview.JViewportCanvas |
|---|
addAttachedViewport, addZoom, calculateShapeTransform, getViewport, getViewportImage, isMaximalViewport, isNormalizedOnScreen, prepareCanvas, removeAttachedViewport, resetViewport, selectArea, selectViewport, setViewportImage, silentlySelectViewport, transferView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jview.NormalizedCoordinates |
|---|
getArea, getNormalized, getNormalizedRect, getScreen, getScreenRect, getViewport, isNormalizedOnScreen, isScreenInNormalized |
| Field Detail |
|---|
public static final String KEY_WORLD
public static final String KEY_BORDERS
public static final String KEY_PROJECTION
public static final String KEY_MERIDIAN
public static final String KEY_NIGHTTWILIGHT
public static final String KEY_DAYTWILIGHT
public static final String KEY_MOONHEIGHT
public static final String KEY_MOONLIGHT
public static final String KEY_MOONSTEEP
public static final String KEY_MOONDIM
public static final String KEY_REFRESH
public static final String KEY_FORDATE
public static final String KEY_ACCELERATE
public static final String KEY_SHOWTIME
public static final String KEY_PRIORITY
public static final String KEY_XSTEPWIDTH
public static final String KEY_YSTEPWIDTH
private static final String DEFWORLD
private static final String DEFBORDERS
private static final String DEFPROJECTION
private static final String DEFMERIDIAN
private static final double DEFNIGHTTWILIGHT
private static final double DEFDAYTWILIGHT
private static final double DEFMOONHEIGHT
private static final double DEFMOONLIGHT
private static final double DEFMOONSTEEP
private static final double DEFMOONDIM
private static final long DEFREFRESH
private static final boolean DEFSHOWCOORDINATE
private static final boolean DEFSHOWTIME
private static final int DEFPRIORITY
private static final double MOONMAG
private AcceleratedTime now
private SolRa solra
private SolDec solde
private MoonRa moonra
private MoonDec moonde
private MoonAngle moonphi
private SiderealGreenwichApparent theta
private BufferedImage night
private CoordinateTransforming map
private List<PriorityListener> ear
private int curprior
| Constructor Detail |
|---|
public JNight(Map<String,String> info)
public JNight(PropertyBearing info)
| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
setComposedProperties in interface PropertyAwaresetComposedProperties in class JNormalizedCanvaspublic void init()
init in interface Initializableinit in class JViewportCanvasprivate BufferedImage getOverlay()
#KEY_OVERLAY.
public void setUserTransformation(CoordinateTransforming user)
setUserTransformation in interface UserCoordinatespublic CoordinateTransforming getUserTransformation()
getUserTransformation in interface UserCoordinatespublic void addPriorityListener(PriorityListener to)
addPriorityListener in interface PriorityCasterpublic void removePriorityListener(PriorityListener to)
removePriorityListener in interface PriorityCasterpublic int currentPriority(String id)
currentPriority in interface PriorityCasterpublic boolean isRefreshNeeded()
isRefreshNeeded in interface ConditionalRefreshingpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic void refresh()
refresh in interface Refreshingpublic void paintComponent(Graphics g)
paintComponent in class JNormalizedCanvas
protected void drawNight(BufferedImage into,
Point2D grid,
Dimension s0,
double noon)
public boolean isFixedRate()
isFixedRate in interface RefreshingTimerprivate void notifyListeners(int np)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||