ucar.unidata.ui
Class Timeline

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ucar.unidata.ui.Timeline
All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
IdvTimeline

public class Timeline
extends JPanel
implements MouseListener, MouseMotionListener

Widget for selecting dates and times

Version:
$Revision: 1.36 $
Author:
IDV Development Team
See Also:
Serialized Form

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
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  ucar.unidata.util.DatedThing findClosest(Point p)
          find closest thing
protected  ucar.unidata.util.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
 ucar.unidata.util.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
 ucar.unidata.util.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, ucar.unidata.util.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(ucar.unidata.util.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(ucar.unidata.util.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 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CMD_APPLY

public static String CMD_APPLY
Action command used for the Apply button


CMD_CANCEL

public static String CMD_CANCEL
Action command used for the Cancel button


CMD_OK

public static String CMD_OK
Action command used for the Cancel button


CURSOR_NORMAL

public static final Cursor CURSOR_NORMAL
The normal cursor_


CURSOR_MOVE

public static final Cursor CURSOR_MOVE
The normal cursor_


CURSOR_LEFT

public static final Cursor CURSOR_LEFT
The normal cursor_


CURSOR_RIGHT

public static final Cursor CURSOR_RIGHT
The normal cursor_


DIM_TIME_HEIGHT

public static final int DIM_TIME_HEIGHT
drawing size

See Also:
Constant Field Values

DRAGMODE_LEFT

public static final int DRAGMODE_LEFT
when dragging the date selection box what are we dragging

See Also:
Constant Field Values

DRAGMODE_RIGHT

public static final int DRAGMODE_RIGHT
when dragging the date selection box what are we dragging

See Also:
Constant Field Values

DRAGMODE_CENTER

public static final int DRAGMODE_CENTER
when dragging the date selection box what are we dragging

See Also:
Constant Field Values

sunriseDates

protected List sunriseDates
_more_

Constructor Detail

Timeline

public Timeline()
Default ctor


Timeline

public Timeline(List times,
                int initDimension)
ctor. start and end date is the min/max of the times

Parameters:
times - List of DatedThings
initDimension - initial width

Timeline

public Timeline(List times,
                int width,
                int height)
ctor. start and end date is the min/max of the times

Parameters:
times - List of DatedThings
width - init width
height - init height

Timeline

public Timeline(Date start,
                Date end)
Create a Timeline with the initial date range

Parameters:
start - start
end - end

Timeline

public Timeline(Date start,
                Date end,
                int initDimension)
ctor

Parameters:
start - start
end - end
initDimension - width
Method Detail

getTimeZone

public static TimeZone getTimeZone()
get default time zone

Returns:
time zone

setDateFormat

public static void setDateFormat(String format)
set the format

Parameters:
format - format

setTimeZone

public static void setTimeZone(TimeZone tz)
set timezone

Parameters:
tz - timezone

initGui

protected void initGui()
make gui


mouseMoved

public void mouseMoved(MouseEvent me)
handle mouse event

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
me - mouse event

mouseDragged

public void mouseDragged(MouseEvent e)
handle mouse event

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - mouse event

mouseExited

public void mouseExited(MouseEvent e)
handle mouse event

Specified by:
mouseExited in interface MouseListener
Parameters:
e - mouse event

mouseEntered

public void mouseEntered(MouseEvent e)
handle mouse event

Specified by:
mouseEntered in interface MouseListener
Parameters:
e - mouse event

mouseClicked

public void mouseClicked(MouseEvent e)
handle mouse event

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - mouse event

mousePressed

public void mousePressed(MouseEvent e)
handle mouse event

Specified by:
mousePressed in interface MouseListener
Parameters:
e - mouse event

mouseReleased

public void mouseReleased(MouseEvent e)
handle mouse event

Specified by:
mouseReleased in interface MouseListener
Parameters:
e - mouse event

setDateSelection

public void setDateSelection(ucar.unidata.util.DateSelection dateSelection)
Set the date selection

Parameters:
dateSelection - The date selection

getDateSelection

public ucar.unidata.util.DateSelection getDateSelection()
Get the DateSelection property.

Returns:
The DateSelection

getDatedThings

public List getDatedThings()
Get the list of dated things we are displaying

Returns:
List of dated things

setSelected

public void setSelected(List l)
Set the list of selected items

Parameters:
l - List of selected items

selectedDatesChanged

public void selectedDatesChanged()
_more_


getSelected

public List getSelected()
Get the list of selected DatedThing-s

Returns:
The Selected things

init

protected void init(Date start,
                    Date end)
initialize start/end time

Parameters:
start - start
end - end

showPopupMenu

protected void showPopupMenu(int x,
                             int y)
popup menu at

Parameters:
x - x
y - y

resetDateRange

public void resetDateRange()
reset to original date range


resetDateSelection

public void resetDateSelection()
reset to original date selection


setDateSelection

public void setDateSelection(Date[] r)
set the range of the date selection

Parameters:
r - range

setVisibleRange

public void setVisibleRange(Date[] r)
set the visible range

Parameters:
r - The date range

getMenuItems

protected void getMenuItems(List items)
make menu items

Parameters:
items - items

removeIntervals

public void removeIntervals()
clear intervals


setSkipFactor

public void setSkipFactor(Integer i)
set skip

Parameters:
i - skip

setInterval

public void setInterval(Double i)
set interval

Parameters:
i - interval

setPreRange

public void setPreRange(Double i)
set pre range

Parameters:
i - range

setPostRange

public void setPostRange(Double i)
set post range

Parameters:
i - range_

setCount

public void setCount(Integer i)
set count

Parameters:
i - count

showProperties

public void showProperties()
show properties dialog


makeButtons

public static JPanel makeButtons(ActionListener l,
                                 String[] labels)

makeButtons

public static JPanel makeButtons(ActionListener listener,
                                 String[] labels,
                                 String[] cmds)

setSticky

public void setSticky(boolean sticky)
Set the Sticky property.

Parameters:
sticky - The new value for Sticky

getSticky

public boolean getSticky()
Get the Sticky property.

Returns:
The Sticky

dateSelectionActive

protected boolean dateSelectionActive()
are we using the date selection

Returns:
using the date selection

setUseDateSelection

public void setUseDateSelection(boolean value)
Set the UseDateSelection property.

Parameters:
value - The new value for UseDateSelection

getUseDateSelection

public boolean getUseDateSelection()
Get the UseDateSelection property.

Returns:
The UseDateSelection

setShowIntervals

public void setShowIntervals(boolean value)
Set the ShowIntervals property.

Parameters:
value - The new value for ShowIntervals

getShowIntervals

public boolean getShowIntervals()
Get the ShowIntervals property.

Returns:
The ShowIntervals

dateSelectionChanged

protected void dateSelectionChanged()
handle changed date selection


timelineChanged

public void timelineChanged()
The timeline changed. repaint, etc.


makeSunriseDates

public void makeSunriseDates()

selectDaytime

public void selectDaytime()
_more_


findClosest

protected ucar.unidata.util.DatedThing findClosest(Point p)
find closest thing

Parameters:
p - location
Returns:
closest thing

findClosest

protected ucar.unidata.util.DatedThing findClosest(Point p,
                                                   int minimumDistance)
find closest thing

Parameters:
p - location
minimumDistance - within
Returns:
closest thing

getToolTipLocation

public Point getToolTipLocation(MouseEvent e)
_more_

Overrides:
getToolTipLocation in class JComponent
Parameters:
e - _more_
Returns:
_more_

getToolTipText

public String getToolTipText(MouseEvent event)
get tooltip

Overrides:
getToolTipText in class JComponent
Parameters:
event - event
Returns:
tooltip

getContents

public JComponent getContents(boolean withButtons)
make gui

Parameters:
withButtons - add dialog buttons
Returns:
gui

getContents

public JComponent getContents(boolean withButtons,
                              boolean withBorder)

doMakeContents

protected void doMakeContents(boolean withButtons)
make gui

Parameters:
withButtons - with dialog buttons

doMakeContents

protected void doMakeContents(boolean withButtons,
                              boolean withBorder)

paintDateSelection

protected void paintDateSelection(Graphics2D g,
                                  ucar.unidata.util.DateSelection dateSelection)
paint

Parameters:
g - graphics
dateSelection - the date selection

paintIntervals

protected void paintIntervals(Graphics2D g)
paint intervals

Parameters:
g - graphics

getBaseLine

protected int getBaseLine()
get the axis line

Returns:
axis line location

getBottom

protected int getBottom()
bottom of drawing area

Returns:
bottom

getLeft

protected int getLeft()
left of drawing area

Returns:
left

getRight

protected int getRight()
right of drawing area

Returns:
right

paintAxis

protected void paintAxis(Graphics2D g)
paint axis

Parameters:
g - graphics

paintBackgroundDecoration

public void paintBackgroundDecoration(Graphics2D g)
paint after we filled the background but before we do anything else

Parameters:
g - graphics

paint

public void paint(Graphics g)
paint

Overrides:
paint in class JComponent
Parameters:
g - graphics

setHighlightedDate

public void setHighlightedDate(ucar.unidata.util.DatedThing d)

getHighlightedDate

public ucar.unidata.util.DatedThing getHighlightedDate()

setDatedThings

public void setDatedThings(List l)
set list of things

Parameters:
l - list of DatedThings

setGroup

public void setGroup(List group)
set the group we're linked to

Parameters:
group - group of Timelines

setDatedThings

public void setDatedThings(List l,
                           boolean andSetRange)
set list of things

Parameters:
l - list of DatedThings
andSetRange - also set the start/end visible range

format

public String format(Date date)
format date

Parameters:
date - date
Returns:
date formatted

getFormat

public String getFormat()
get the format to use given the size of the visible range

Returns:
format

format

public String format(long time)
format time

Parameters:
time - time
Returns:
formatted time

format

public String format(long time,
                     String pattern)
format time

Parameters:
time - time
pattern - date format
Returns:
formatted time

reset

protected void reset(boolean doDateSelection)
reset range

Parameters:
doDateSelection - determines whether we reset the date selection range or the visible range

shiftByPercent

protected void shiftByPercent(double percent,
                              boolean doDateSelection)
shift left/right a percentage

Parameters:
percent - how much
doDateSelection - visible or date selection

expandByPercent

public void expandByPercent(double percent,
                            boolean doDateSelection)
zoom

Parameters:
percent - how much
doDateSelection - visible or date selection

toDate

public Date toDate(int location)
map x location to date

Parameters:
location - x
Returns:
date

toLocation

public int toLocation(Date date)
map date to x location

Parameters:
date - location
Returns:
x

toLocation

public int toLocation(long date)
map date to x

Parameters:
date - date
Returns:
x

setRange

public void setRange(Date start,
                     Date end)
Set the StartDate property.

Parameters:
start - start
end - end

makeCurrentRangeOriginal

public void makeCurrentRangeOriginal()
_more_


setRange

public void setRange(Date start,
                     Date end,
                     boolean makeTheseTheOriginal)
_more_

Parameters:
start - _more_
end - _more_
makeTheseTheOriginal - _more_

setStartDate

public void setStartDate(Date value)
Set the StartDate property.

Parameters:
value - The new value for StartDate

getStartDate

public Date getStartDate()
Get the StartDate property.

Returns:
The StartDate

setEndDate

public void setEndDate(Date value)
Set the EndDate property.

Parameters:
value - The new value for EndDate

getEndDate

public Date getEndDate()
Get the EndDate property.

Returns:
The EndDate

popup

public boolean popup()
popup timeline in a dialog

Returns:
ok

main

public static void main(String[] args)
                 throws Exception
main

Parameters:
args - args
Throws:
Exception - _more_

setIsCapableOfSelection

public void setIsCapableOfSelection(boolean value)
Set the IsCapableOfSelection property.

Parameters:
value - The new value for IsCapableOfSelection

getIsCapableOfSelection

public boolean getIsCapableOfSelection()
Get the IsCapableOfSelection property.

Returns:
The IsCapableOfSelection

setShortDisplay

public void setShortDisplay(boolean value)
Set the ShortDisplay property.

Parameters:
value - The new value for ShortDisplay

getShortDisplay

public boolean getShortDisplay()
Get the ShortDisplay property.

Returns:
The ShortDisplay

setColorTimeSelected

public void setColorTimeSelected(Color value)
Set the ColorTimeSelected property.

Parameters:
value - The new value for ColorTimeSelected

getColorTimeSelected

public Color getColorTimeSelected()
Get the ColorTimeSelected property.

Returns:
The ColorTimeSelected

setColorTimeUnselected

public void setColorTimeUnselected(Color value)
Set the ColorTimeUnselected property.

Parameters:
value - The new value for ColorTimeUnselected

getColorTimeUnselected

public Color getColorTimeUnselected()
Get the ColorTimeUnselected property.

Returns:
The ColorTimeUnselected