|
||||||||||
| 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.Timeline
public class Timeline
Widget for selecting dates and 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
CMD_APPLY
Action command used for the Apply button |
static String |
CMD_CANCEL
Action command used for the Cancel button |
static String |
CMD_OK
Action command used for the Cancel button |
static Cursor |
CURSOR_LEFT
The normal cursor_ |
static Cursor |
CURSOR_MOVE
The normal cursor_ |
static Cursor |
CURSOR_NORMAL
The normal cursor_ |
static Cursor |
CURSOR_RIGHT
The normal cursor_ |
static int |
DIM_TIME_HEIGHT
drawing size |
static int |
DRAGMODE_CENTER
when dragging the date selection box what are we dragging |
static int |
DRAGMODE_LEFT
when dragging the date selection box what are we dragging |
static int |
DRAGMODE_RIGHT
when dragging the date selection box what are we dragging |
protected List |
sunriseDates
_more_ |
| 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 | |
|---|---|
Timeline()
Default ctor |
|
Timeline(Date start,
Date end)
Create a Timeline with the initial date range |
|
Timeline(Date start,
Date end,
int initDimension)
ctor |
|
Timeline(List times,
int initDimension)
ctor. |
|
Timeline(List times,
int width,
int height)
ctor. |
|
| Method Summary | |
|---|---|
protected boolean |
dateSelectionActive()
are we using the date selection |
protected void |
dateSelectionChanged()
handle changed date selection |
protected void |
doMakeContents(boolean withButtons)
make gui |
protected void |
doMakeContents(boolean withButtons,
boolean withBorder)
|
void |
expandByPercent(double percent,
boolean doDateSelection)
zoom |
protected DatedThing |
findClosest(Point p)
find closest thing |
protected DatedThing |
findClosest(Point p,
int minimumDistance)
find closest thing |
String |
format(Date date)
format date |
String |
format(long time)
format time |
String |
format(long time,
String pattern)
format time |
protected int |
getBaseLine()
get the axis line |
protected int |
getBottom()
bottom of drawing area |
Color |
getColorTimeSelected()
Get the ColorTimeSelected property. |
Color |
getColorTimeUnselected()
Get the ColorTimeUnselected property. |
JComponent |
getContents(boolean withButtons)
make gui |
JComponent |
getContents(boolean withButtons,
boolean withBorder)
|
List |
getDatedThings()
Get the list of dated things we are displaying |
DateSelection |
getDateSelection()
Get the DateSelection property. |
Date |
getEndDate()
Get the EndDate property. |
String |
getFormat()
get the format to use given the size of the visible range |
DatedThing |
getHighlightedDate()
|
boolean |
getIsCapableOfSelection()
Get the IsCapableOfSelection property. |
protected int |
getLeft()
left of drawing area |
protected void |
getMenuItems(List items)
make menu items |
protected int |
getRight()
right of drawing area |
List |
getSelected()
Get the list of selected DatedThing-s |
boolean |
getShortDisplay()
Get the ShortDisplay property. |
boolean |
getShowIntervals()
Get the ShowIntervals property. |
Date |
getStartDate()
Get the StartDate property. |
boolean |
getSticky()
Get the Sticky property. |
static TimeZone |
getTimeZone()
get default time zone |
Point |
getToolTipLocation(MouseEvent e)
_more_ |
String |
getToolTipText(MouseEvent event)
get tooltip |
boolean |
getUseDateSelection()
Get the UseDateSelection property. |
protected void |
init(Date start,
Date end)
initialize start/end time |
protected void |
initGui()
make gui |
static void |
main(String[] args)
main |
static JPanel |
makeButtons(ActionListener l,
String[] labels)
|
static JPanel |
makeButtons(ActionListener listener,
String[] labels,
String[] cmds)
|
void |
makeCurrentRangeOriginal()
_more_ |
void |
makeSunriseDates()
|
void |
mouseClicked(MouseEvent e)
handle mouse event |
void |
mouseDragged(MouseEvent e)
handle mouse event |
void |
mouseEntered(MouseEvent e)
handle mouse event |
void |
mouseExited(MouseEvent e)
handle mouse event |
void |
mouseMoved(MouseEvent me)
handle mouse event |
void |
mousePressed(MouseEvent e)
handle mouse event |
void |
mouseReleased(MouseEvent e)
handle mouse event |
void |
paint(Graphics g)
paint |
protected void |
paintAxis(Graphics2D g)
paint axis |
void |
paintBackgroundDecoration(Graphics2D g)
paint after we filled the background but before we do anything else |
protected void |
paintDateSelection(Graphics2D g,
DateSelection dateSelection)
paint |
protected void |
paintIntervals(Graphics2D g)
paint intervals |
boolean |
popup()
popup timeline in a dialog |
void |
removeIntervals()
clear intervals |
protected void |
reset(boolean doDateSelection)
reset range |
void |
resetDateRange()
reset to original date range |
void |
resetDateSelection()
reset to original date selection |
void |
selectDaytime()
_more_ |
void |
selectedDatesChanged()
_more_ |
void |
setColorTimeSelected(Color value)
Set the ColorTimeSelected property. |
void |
setColorTimeUnselected(Color value)
Set the ColorTimeUnselected property. |
void |
setCount(Integer i)
set count |
void |
setDatedThings(List l)
set list of things |
void |
setDatedThings(List l,
boolean andSetRange)
set list of things |
static void |
setDateFormat(String format)
set the format |
void |
setDateSelection(Date[] r)
set the range of the date selection |
void |
setDateSelection(DateSelection dateSelection)
Set the date selection |
void |
setEndDate(Date value)
Set the EndDate property. |
void |
setGroup(List group)
set the group we're linked to |
void |
setHighlightedDate(DatedThing d)
|
void |
setInterval(Double i)
set interval |
void |
setIsCapableOfSelection(boolean value)
Set the IsCapableOfSelection property. |
void |
setPostRange(Double i)
set post range |
void |
setPreRange(Double i)
set pre range |
void |
setRange(Date start,
Date end)
Set the StartDate property. |
void |
setRange(Date start,
Date end,
boolean makeTheseTheOriginal)
_more_ |
void |
setSelected(List l)
Set the list of selected items |
void |
setShortDisplay(boolean value)
Set the ShortDisplay property. |
void |
setShowIntervals(boolean value)
Set the ShowIntervals property. |
void |
setSkipFactor(Integer i)
set skip |
void |
setStartDate(Date value)
Set the StartDate property. |
void |
setSticky(boolean sticky)
Set the Sticky property. |
static void |
setTimeZone(TimeZone tz)
set timezone |
void |
setUseDateSelection(boolean value)
Set the UseDateSelection property. |
void |
setVisibleRange(Date[] r)
set the visible range |
protected void |
shiftByPercent(double percent,
boolean doDateSelection)
shift left/right a percentage |
protected void |
showPopupMenu(int x,
int y)
popup menu at |
void |
showProperties()
show properties dialog |
void |
timelineChanged()
The timeline changed. |
Date |
toDate(int location)
map x location to date |
int |
toLocation(Date date)
map date to x location |
int |
toLocation(long date)
map date to x |
| 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 String CMD_APPLY
public static String CMD_CANCEL
public static String CMD_OK
public static final Cursor CURSOR_NORMAL
public static final Cursor CURSOR_MOVE
public static final Cursor CURSOR_LEFT
public static final Cursor CURSOR_RIGHT
public static final int DIM_TIME_HEIGHT
public static final int DRAGMODE_LEFT
public static final int DRAGMODE_RIGHT
public static final int DRAGMODE_CENTER