|
||||||||||
| 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.JImageComponent
jview.JEarth
stella.jview.JEarthNight
public class JEarthNight
We display an image of the earth with the current day-night boundary overlayed.
| Nested Class Summary | |
|---|---|
static class |
JEarthNight.Show
Shows the earth in a mercator projection with the current day/night terminator. |
| 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 Color |
DEFNIGHTCOLOR
The default night color. |
private static long |
DEFREFRESH
The default refresh interval in ms. |
private static double |
DEFTWILIGHT
The default twilight border. |
private static Color |
DEFTWILIGHTCOLOR
The default twilight color. |
static String |
KEY_NIGHTCOLOR
The key to the color for night. |
static String |
KEY_REFRESH
The refresh interval in ms. |
static String |
KEY_TWILIGHT
The sol-height border between night and twilight. |
static String |
KEY_TWILIGHTCOLOR
The key to the color for twilight. |
private SiderealTime |
sid
Greenwich sidereal time. |
private SolDec |
solde
Solar position. |
private SolRa |
solra
Solar position. |
| Fields inherited from class jview.JEarth |
|---|
KEY_LAMBDA0, KEY_MERCATOR, KEY_XORIGIN, KEY_XSCALE, KEY_YORIGIN, KEY_YSCALE |
| 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 | |
|---|---|
JEarthNight(PropertyBearing info)
Constructs a new night earth giving its properties. |
|
| Method Summary | |
|---|---|
long |
getRefreshInterval()
The refresh interval is a property. |
private Vector2D |
getRiseSet(double phi,
double h)
For a given latitude and a twilight calculate the two geographical longitudes for which this is the case. |
private VectorG |
getSolar(double phi,
double h)
Returns a four-dimensional vector with four geographical longitudes. |
void |
init()
Initializes additionally the parameters needed. |
private boolean |
isAlwaysBelow(double phi,
double h)
Checks if the sun is currently below the given height for all possible longitudes at the given latitude. |
boolean |
isFixedRate()
We do not want fixed rate, merely act like a cursor. |
boolean |
isRefreshNeeded()
We only want updates if we are visible. |
void |
paintComponent(Graphics g)
Paints the individual bars of twilight and night onto the component using x-or mode. |
void |
refresh()
On refresh, we repaint. |
void |
setComposedProperties(PropertyBearing prop)
Sets the proberties of the earth and defailts colors. |
| Methods inherited from class jview.JEarth |
|---|
getComposedProperties, getGeography, getPixel |
| Methods inherited from class jview.JImageComponent |
|---|
createBufferedImage, getImage, getPreferredSize, setImage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_NIGHTCOLOR
public static final String KEY_TWILIGHTCOLOR
public static final String KEY_TWILIGHT
public static final String KEY_REFRESH
private static final Color DEFNIGHTCOLOR
private static final Color DEFTWILIGHTCOLOR
private static final double DEFTWILIGHT
private static final long DEFREFRESH
private SolRa solra
private SolDec solde
private SiderealTime sid
| Constructor Detail |
|---|
public JEarthNight(PropertyBearing info)
| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
setComposedProperties in interface PropertyAwaresetComposedProperties in class JEarthpublic void init()
init in interface Initializableinit in class JEarthpublic void paintComponent(Graphics g)
paintComponent in class JImageComponentpublic boolean isRefreshNeeded()
isRefreshNeeded in interface ConditionalRefreshingpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic void refresh()
refresh in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface RefreshingTimer
private boolean isAlwaysBelow(double phi,
double h)
private VectorG getSolar(double phi,
double h)
private Vector2D getRiseSet(double phi,
double h)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||