jview
Class JBaycam

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by jview.JWebcam
                      extended by jview.JDaycam
                          extended by jview.JBaycam
All Implemented Interfaces:
Cloneable, Displayable, DisplayChronology, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Direct Known Subclasses:
JAllsky

public class JBaycam
extends JDaycam

A baycam canvas is connected to a webcam that stores images with a special date extension.


Nested Class Summary
static class JBaycam.Direct
          Returns and displays an image directly retrieved from tenerife.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFTIMEZONE
          Default time zone.
private  boolean failure
           
static String KEY_APPEND
          The file-name to append to the download url after date.
static String KEY_DATEFILE
          The date formatter to use.
static String KEY_DEFAULTURL
          An image known to exist.
static String KEY_TIMEZONE
          How the fetch time should be formatted.
private  URL lasturl
          My last download url to check for equality.
 
Fields inherited from class jview.JDaycam
KEY_INVERSE, KEY_SITE, KEY_SOLARLIGHT
 
Fields inherited from class jview.JWebcam
KEY_CLIPRAW, KEY_DATECOLOR, KEY_DATEFONT, KEY_DATEFORMAT, KEY_DATEHORJUST, KEY_DATEPOS, KEY_DATEVERTJUST, KEY_HOST, KEY_PASSPHRASE, KEY_PATH, KEY_PROTOCOL, KEY_SHOWDATE, KEY_TIMEMETHOD, KEY_UPDATE
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JBaycam(Map<String,String> prop)
          Constructs a new webcam canvas.
 
Method Summary
 boolean canDeliver()
          We can deliver if the modification time on the server is below the modification time of our latest retrieval.
protected  URL getDownloadUrl(Date when)
          Formats the given day and uses the server path to retrieve a download url.
static Image getTenerife(String label)
          Calls a remote method on archive, which gets an image pointed toward the telescope without turn on of light.
static Image getTenerife(String label, ProgressMonitor echo)
          Calls a remote method on archive, which gets an image pointed toward the telescope without turn on of light.
protected  BufferedImage getWebcamImage(URL download)
          Returns the webcam image from the stated url.
 void init()
          Additionally constructs the solar height parameter.
 
Methods inherited from class jview.JWebcam
getAuthentication, getRefreshInterval, getRepresentation, getRepresentationAt
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jview.Displayable
getIcon
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_APPEND

public static final String KEY_APPEND
The file-name to append to the download url after date.

See Also:
Constant Field Values

KEY_DATEFILE

public static final String KEY_DATEFILE
The date formatter to use.

See Also:
Constant Field Values

KEY_TIMEZONE

public static final String KEY_TIMEZONE
How the fetch time should be formatted.

See Also:
Constant Field Values

KEY_DEFAULTURL

public static final String KEY_DEFAULTURL
An image known to exist.

See Also:
Constant Field Values

DEFTIMEZONE

private static final String DEFTIMEZONE
Default time zone.

See Also:
Constant Field Values

lasturl

private URL lasturl
My last download url to check for equality.


failure

private boolean failure
Constructor Detail

JBaycam

public JBaycam(Map<String,String> prop)
Constructs a new webcam canvas.

Method Detail

init

public void init()
Additionally constructs the solar height parameter.

Specified by:
init in interface Initializable
Overrides:
init in class JDaycam

canDeliver

public boolean canDeliver()
We can deliver if the modification time on the server is below the modification time of our latest retrieval.

Specified by:
canDeliver in interface DisplayChronology
Overrides:
canDeliver in class JDaycam

getDownloadUrl

protected URL getDownloadUrl(Date when)
Formats the given day and uses the server path to retrieve a download url.

Overrides:
getDownloadUrl in class JWebcam

getWebcamImage

protected BufferedImage getWebcamImage(URL download)
                                throws IOException
Returns the webcam image from the stated url. We cache the name of the url here.

Overrides:
getWebcamImage in class JWebcam
Throws:
IOException

getTenerife

public static Image getTenerife(String label)
Calls a remote method on archive, which gets an image pointed toward the telescope without turn on of light. The position pointed to is one of four pointings, labeled 'a' to 'd'.


getTenerife

public static Image getTenerife(String label,
                                ProgressMonitor echo)
Calls a remote method on archive, which gets an image pointed toward the telescope without turn on of light. The position pointed to is one of four pointings, labeled 'a' to 'd'.