|
||||||||||
| 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
ucar.unidata.ui.ChooserPanel
ucar.unidata.idv.chooser.IdvChooser
ucar.unidata.idv.chooser.TimesChooser
public class TimesChooser
A chooser that allows for selecting times
| Nested Class Summary |
|---|
| 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 | |
|---|---|
JCheckBox |
drivercbx
the time driver checkbox |
protected static String |
LABEL_TIMES
Label for times |
protected static String |
MSG_TIMES
Message for selecting times |
protected TwoFacedObject |
selectedDriver
Selected driver |
protected List |
timesComponents
times components |
protected JComponent |
timesContainer
times container |
| Fields inherited from class ucar.unidata.idv.chooser.IdvChooser |
|---|
ATTR_ID, ATTR_SHOWDETAILS, dirHistoryCbx, ignoreDirHistory, NULL_PROPERTIES, NULL_STRING, PREF_ADDESERVERS, PREF_CATALOGLIST, PREF_DEFAULTDIR, PREF_IMAGEDESCLIST, PREF_POLLINGINFO, PREF_RADARDESCLIST, PREF_TDSPOINTOBSERVER, PREF_TDSRADARSERVER, PROP_CHOOSER_MAPS, PROP_CHOOSER_PROJECTION_BOUNDS, PROP_CHOOSERCLASSNAME, PROP_STATUS_BACKGROUND, PROP_STATUS_FOREGROUND, PROP_STATUS_TEMPLATE, stationMap |
| Fields inherited from class ucar.unidata.ui.ChooserPanel |
|---|
cancelButton, CMD_LOAD, contents, GRID_INSETS, GRID_SPACING, GRID_SPACING_H, GRID_SPACING_V, haveData, helpPath, loadButton, MAP_COLOR, simpleMode, statusLabel |
| 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 | |
|---|---|
TimesChooser(IdvChooserManager mgr,
Element root)
Create me. |
|
| Method Summary | |
|---|---|
protected void |
absoluteTimesSelectionChanged()
Handle when the absolute times selection has changed |
static void |
addTimeSelectionListener(JList list,
Timeline timeline)
Add a listener to the JList that pops up a menu on a right click that allos for the selection of different strides. |
protected boolean |
checkActiveViewWithDriver()
Check the current active view window and make sure it does has a time driver, otherwise, reset the active view window |
protected void |
checkTimesLists()
Check the times lists |
protected void |
clearTimesList()
Clear all times in the times list. |
protected void |
disableTimeWidgets()
Disable the GUI widgets |
void |
doLoad()
Gets called by doLoad in a thread when the user presses the load button. |
protected void |
enableAbsoluteTimesList(boolean enabled)
Enable the absolute times list |
protected void |
enableTimeWidgets()
Enable the GUI widgets based on what has been selected. |
protected void |
enableWidgets()
Enable the GUI widgets based on what has been selected. |
protected List |
getAbsoluteTimes()
Get the list of all absolute times. |
protected int |
getAbsoluteTimeSelectMode()
Get the selection mode for the absolute times panel. |
protected int |
getDefaultRelativeTimeIndex()
Get the default selected index for the relative times list. |
protected int |
getDefaultTimeDriverIndex()
Get the default time driver index |
protected boolean |
getDoAbsoluteTimes()
Do we do absolute or relative times |
protected boolean |
getDoRelativeTimes()
Did the user select relative times? |
protected boolean |
getDoTimeDrivers()
See if we should be doing timedrivers |
protected JComponent |
getExtraAbsoluteTimeComponent()
Get the extra absolute time component |
protected JComponent |
getExtraRelativeTimeComponent()
Get the extra relative time component |
protected JComponent |
getExtraTimeComponent()
Get the extra time widget. |
protected boolean |
getHaveAbsoluteTimesSelected()
Any absolute times selected |
protected int |
getNumTimesToSelect()
Get the number of times to select |
float |
getRelativeTimeIncrement()
Get the increment between times for relative time requests. |
int[] |
getRelativeTimeIndices()
Get the relative time indices |
JComponent |
getRelativeTimesChooser()
Create (if needed) and return the list that shows times. |
ChooserList |
getRelativeTimesList()
Create (if needed) and return the list that shows times. |
protected List |
getSelectedAbsoluteTimes()
Get selected absolute times |
JPopupMenu |
getTimeDriverPopupMenu()
Get the time driver popup menu |
protected List |
getTimeDrivers()
Get the list of timedrivers |
protected Timeline |
getTimeLine()
Get the timeline |
ChooserList |
getTimesList()
Create (if needed) and return the list that shows times. |
protected boolean |
haveAnyTimes()
Are there any times in the times list. |
protected boolean |
haveTimeSelected()
Are there any times selected. |
protected List<DatedThing> |
makeDatedObjects(List items)
Utility to wrap the given items as DatedThings |
protected JPanel |
makeTimesPanel()
Create the absolute/relative times selector |
protected JPanel |
makeTimesPanel(boolean includeExtra)
Make the times panel |
protected JPanel |
makeTimesPanel(boolean includeExtra,
boolean useTimeLine)
Make the times panel |
protected JPanel |
makeTimesPanel(boolean includeExtra,
boolean useTimeLine,
boolean includeTimeDriver)
Make the times panel |
void |
popupTimeline()
Show the timeline |
void |
readDrivers()
Read the time drives |
void |
readTimes()
Do what needs to be done to read in the times. |
protected void |
setAbsoluteTimes(List times)
Set the absolute times list. |
protected void |
setDoAbsoluteTimes(boolean yesorno)
Set whether we do absolute or relative times |
protected void |
setDoTimeDrivers(boolean value)
Set the time driver property |
protected void |
setSelectedAbsoluteTime(int selectedIndex)
Set the selected index |
protected void |
setSelectedAbsoluteTime(int from,
int to)
Set range of selected times |
protected void |
setSelectedAbsoluteTimes(int[] indices)
Set the selected indices in the absolute times list |
protected void |
setSelectedAbsoluteTimes(List selectedTimes)
Set the selected indices in the absolute times list |
protected void |
setSelectedTimes(DateTime[] times)
Set the selected times in the list based on the input times. |
protected void |
setTimeDrivers(List drivers)
Set the time drivers in the list |
protected void |
updateStatus()
Update the status label |
protected List |
updateTimeDriver()
Update the time driver list |
void |
updatetimeline(TwoFacedObject id)
Update the timeline |
| 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 |
|---|
protected static final String MSG_TIMES
protected static final String LABEL_TIMES
protected TwoFacedObject selectedDriver
protected JComponent timesContainer
protected List timesComponents
public JCheckBox drivercbx
| Constructor Detail |
|---|
public TimesChooser(IdvChooserManager mgr,
Element root)
mgr - The chooser managerroot - The chooser.xml node| Method Detail |
|---|
protected boolean haveAnyTimes()
public ChooserList getTimesList()
public JPopupMenu getTimeDriverPopupMenu()
protected int getAbsoluteTimeSelectMode()
public ChooserList getRelativeTimesList()
protected void clearTimesList()
public void readTimes()
public void readDrivers()
protected List updateTimeDriver()
protected JPanel makeTimesPanel()
protected void absoluteTimesSelectionChanged()
protected JPanel makeTimesPanel(boolean includeExtra)
includeExtra - true if including extra time component
protected void updateStatus()
updateStatus in class IdvChooser
protected JPanel makeTimesPanel(boolean includeExtra,
boolean useTimeLine)
includeExtra - true to include the extra stuffuseTimeLine - true to include the time line
protected JPanel makeTimesPanel(boolean includeExtra,
boolean useTimeLine,
boolean includeTimeDriver)
includeExtra - true to include the extra stuffuseTimeLine - true to include the time lineincludeTimeDriver - include the time driver component
protected boolean checkActiveViewWithDriver()
public void doLoad()
doLoad in class ChooserPanelprotected void enableAbsoluteTimesList(boolean enabled)
enabled - enabledprotected void setAbsoluteTimes(List times)
times - List of thinggs to put into absolute times listprotected void setTimeDrivers(List drivers)
drivers - the List of time driverspublic void updatetimeline(TwoFacedObject id)
id - the timeline object idprotected int getNumTimesToSelect()
protected boolean getHaveAbsoluteTimesSelected()
protected Timeline getTimeLine()
protected List getAbsoluteTimes()
protected List getTimeDrivers()
protected List getSelectedAbsoluteTimes()
protected void setSelectedAbsoluteTimes(List selectedTimes)
selectedTimes - List of selected timesprotected void setSelectedAbsoluteTimes(int[] indices)
indices - selected indicesprotected void setSelectedAbsoluteTime(int selectedIndex)
selectedIndex - selected index
protected void setSelectedAbsoluteTime(int from,
int to)
from - from indexto - to indexprotected List<DatedThing> makeDatedObjects(List items)
items - List of items. Might be a DatedThing, an AddeImageDescriptor or a DateTime
public void popupTimeline()
throws Exception
Exception - On badnessprotected JComponent getExtraAbsoluteTimeComponent()
protected JComponent getExtraRelativeTimeComponent()
protected JComponent getExtraTimeComponent()
protected void setSelectedTimes(DateTime[] times)
times - times to use for samplingprotected int getDefaultRelativeTimeIndex()
protected int getDefaultTimeDriverIndex()
protected boolean haveTimeSelected()
public float getRelativeTimeIncrement()
public JComponent getRelativeTimesChooser()
public int[] getRelativeTimeIndices()
protected boolean getDoAbsoluteTimes()
protected boolean getDoTimeDrivers()
protected void setDoTimeDrivers(boolean value)
value - the propertyprotected void setDoAbsoluteTimes(boolean yesorno)
yesorno - true to do absolute timesprotected boolean getDoRelativeTimes()
protected void enableWidgets()
protected void enableTimeWidgets()
protected void disableTimeWidgets()
protected void checkTimesLists()
public static void addTimeSelectionListener(JList list,
Timeline timeline)
list - list to popup ontimeline - the timeline
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||