|
||||||||||
| 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
javax.swing.JPanel
jview.JChronology
public class JChronology
A component that displays component in a chronological order.
| Nested Class Summary | |
|---|---|
private class |
JChronology.ReplayThread
A replay thread takes a list of componts and displays them until stopped. |
static class |
JChronology.Show
Test class that reads a properties file and constructs a image chronology out of it. |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 SortedMap<Date,Component> |
cache
The cache table linking times to components. |
private DisplayChronology |
chronos
The object that provides me with components. |
private static int |
DEFCACHESIZE
Default cache size. |
private static boolean |
DEFINCLUDEBORDER
Default include border. |
private static int |
DEFMAXLOOPS
Default replay delay. |
private static long |
DEFREPLAYDELAY
Default replay delay. |
private static boolean |
DEFREPLAYONCLICK
|
private static long |
DEFRESTARTDELAY
Default replay delay. |
private static String |
DEFTIMEZONE
Default time zone. |
private static DateFormat |
DEFTOOLTIPDATE
Default tool tip format. |
private PropertyBearing |
info
The properties of this component. |
static String |
KEY_CACHESIZE
The maximum number of items cached in chronological order. |
static String |
KEY_CHRONOLOGY
If given, properties the chronology can be instantiated from. |
static String |
KEY_INCLUDEBORDER
If true, on replays we also include the objects just prior and after. |
static String |
KEY_MAINREFRESH
The main refresh rate. |
static String |
KEY_MAXLOOPS
On replay the maximum number of rewinds. |
static String |
KEY_PREFERREDHEIGHT
A key to the preferred height of this component. |
static String |
KEY_PREFERREDWIDTH
A key to the preferred width of this component. |
static String |
KEY_REPLAYDELAY
On replay options the wait between components update. |
static String |
KEY_REPLAYONCLICK
|
static String |
KEY_RESTARTDELAY
On replay options the wait between components update. |
static String |
KEY_TIMEZONE
How the fetch time should be formatted. |
static String |
KEY_TOOLTIP
If set, the tooltip text to be displayed plust the fetch time. |
static String |
KEY_TOOLTIPDATE
How the fetch time should be formatted. |
private long |
lastfetch
The last time we tried to fetch a component. |
private boolean |
noendplay
If true, pictures fetched are added to the playlist. |
private JChronology.ReplayThread |
playing
The thread that replays cached components. |
private boolean |
push
If true, we display components as fast as delivered. |
| 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 | |
|---|---|
JChronology(Map<String,String> prop)
Construct a new panel that can be used for displaying chronologically updated components. |
|
JChronology(PropertyBearing prop)
Construct a new panel that can be used for displaying chronologically updated components. |
|
| Method Summary | |
|---|---|
private List<Component> |
derivePlayList(Date from,
Date to,
boolean addedge)
We traverse our cache to find the list of components we want to play. |
private void |
fetchComponent()
We try to fetch a component. |
PropertyBearing |
getComposedProperties()
Returns my composed properties. |
DisplayChronology |
getDisplayChronology()
Returns the currently served component chronology. |
Dimension |
getPreferredSize()
Returns the preferred size of this component. |
long |
getRefreshInterval()
The default update frequency is the frequency at which the chronology can deliver. |
void |
init()
Inits the chronology. |
boolean |
isFixedRate()
We are fixed rate. |
boolean |
isPlaying()
Returns true if we are currently playing. |
void |
refresh()
This method is normally called at higher frequencies than we actually want to request new components. |
void |
setComposedProperties(PropertyBearing prop)
Sets the composed properties and defaults some values. |
void |
setDisplayChronology(DisplayChronology webcam)
This sets the chronologically delivering components object. |
void |
startReplay()
We start a reply of cached componts. |
void |
startReplay(Date from,
Date to)
We start a replay between the two dates specified. |
protected void |
startReplay(List<Component> movie)
The class that directly takes the list of components that should be displayed in the movie. |
protected void |
startReplay(List<Component> movie,
int loops)
The class that directly takes the list of components that should be displayed in the movie. |
void |
stopReplay()
We stop the replay if we are currently playing. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_MAINREFRESH
ComponentChronolgy's.
public static final String KEY_CHRONOLOGY
public static final String KEY_CACHESIZE
public static final String KEY_MAXLOOPS
public static final String KEY_REPLAYDELAY
public static final String KEY_RESTARTDELAY
public static final String KEY_TOOLTIP
public static final String KEY_TOOLTIPDATE
public static final String KEY_TIMEZONE
public static final String KEY_INCLUDEBORDER
public static final String KEY_PREFERREDWIDTH
public static final String KEY_PREFERREDHEIGHT
public static final String KEY_REPLAYONCLICK
private static final int DEFCACHESIZE
private static final int DEFMAXLOOPS
private static final long DEFREPLAYDELAY
private static final long DEFRESTARTDELAY
private static final boolean DEFINCLUDEBORDER
private static final String DEFTIMEZONE
private static final boolean DEFREPLAYONCLICK
private static final DateFormat DEFTOOLTIPDATE
private PropertyBearing info
private DisplayChronology chronos
private SortedMap<Date,Component> cache
private boolean push
private long lastfetch
private boolean noendplay
private JChronology.ReplayThread playing
| Constructor Detail |
|---|
public JChronology(Map<String,String> prop)
public JChronology(PropertyBearing prop)
| Method Detail |
|---|
public void init()
init in interface Initializablepublic void setComposedProperties(PropertyBearing prop)
setComposedProperties in interface PropertyAwarepublic PropertyBearing getComposedProperties()
getComposedProperties in interface PropertyComposedpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface RefreshingTimerpublic void refresh()
KEY_MAINREFRESH, than we update.
refresh in interface Refreshingprivate void fetchComponent()
public void setDisplayChronology(DisplayChronology webcam)
public DisplayChronology getDisplayChronology()
public boolean isPlaying()
public void stopReplay()
public void startReplay()
public void startReplay(Date from,
Date to)
KEY_INCLUDEBORDER property, we either include the component
that is just before the stated date or not. If any of the start
or end dates is null, we include all that there is in cache.
protected void startReplay(List<Component> movie)
protected void startReplay(List<Component> movie,
int loops)
private List<Component> derivePlayList(Date from,
Date to,
boolean addedge)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||