public class Dateline extends JPanel implements IDatelineModelListener, PropertyChangeListener, MouseListener, MouseWheelListener, MouseMotionListener, ICalendarModelListener
Eventline
is the other)
and responsible for displaying dates. A date can be based on a standard time
granularity such as hours, minutes, seconds. It can also just be time units
such as one, two, three, etc...
To perform the actual rendering the dateline uses instances of type
IDatelineRenderer
that can be mapped to model classes. This way
different renderers can be used for different dateline models.
The dateline is divided into an upper and a lower part. The upper part shows
major time units, the lower part shows minor time units. An example for a
major time unit is week. The matching minor time unit would be
day.setDatelineRenderer(Class, IDatelineRenderer)
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
Dateline.ZoomStrategy
The zoom strategy defines how the zoom operation will be performed.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FOCUS_BACKGROUND_COLOR
A constant used for property change events that get fired when the focus
background color changes.
|
static String |
PROPERTY_FOCUSED_TIME_SPAN
A constant used for property change events that get fired when the
focused time span changes.
|
static String |
PROPERTY_MODEL
A constant used for property change events that get fired when the
dateline model changes.
|
static String |
PROPERTY_POLICY_PROVIDER
A constant used for property change events that get fired when the policy
provider changes.
|
static String |
PROPERTY_SELECTION_BACKGROUND_COLOR
A constant used for property change events that get fired when the
selection background color changes.
|
static String |
PROPERTY_SELECTION_FOREGROUND_COLOR
A constant used for property change events that get fired when the
selection foreground color changes.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
Dateline(Timeline timeline)
Constructs a new dateline that uses the dateline model implementation
TimeGranularityDatelineModel as its default model. |
Modifier and Type | Method and Description |
---|---|
void |
calendarChanged(CalendarModelEvent evt)
Listener callback method that gets invoked whenever the calendar model
changes.
|
void |
datelineModelChanged(DatelineModelEvent e)
The listener's callback method that gets invoked when the model's time
span or time zone changes.
|
void |
datelineModelWillChange(DatelineModelEvent evt)
The listener's callback method that gets invoked when the model's time
span or time zone will change.
|
int |
getAnimationDuration()
Returns the duration of the animation that gets used during zoom in and
out operations.
|
IDatelineRenderer |
getDatelineRenderer()
Returns the currently used dateline renderer.
|
<T extends IDatelineModel> |
getDatelineRenderer(Class<T> modelClass)
Returns a dateline renderer for the given model type.
|
Color |
getFocusBackground()
Returns the focus background color.
|
ITimeSpan |
getFocusedTimeSpan()
Returns the currently focused time span.
|
IGranularity |
getGranularity()
Returns the time granularity that the dateline model should use for
calculating its minor grid.
|
Color |
getGridColor()
Returns the color used by the dateline to draw its grid lines.
|
Color |
getManualZoomColor()
Returns the color used to draw the manual zoom rectangle.
|
IDatelineMenuProvider |
getMenuProvider()
Returns the menu provider for the dateline.
|
IDatelineModel |
getModel()
Sets the model used by the dateline to convert time points to coordinates
and coordinates to time points.
|
IPolicyProvider |
getPolicyProvider()
Returns the dateline's policy provider.
|
Dimension |
getPreferredSize() |
Map<Class<? extends IDatelineModel>,IDatelineRenderer> |
getRendererMap()
Returns the map used to store the mappings between dateline model classes
and dateline renderers.
|
ITimeSpan |
getSelectedTimeSpan()
Returns the selected time span.
|
Color |
getSelectionBackground()
Returns the selection background color.
|
Color |
getSelectionForegroundColor()
Returns the selection foreground color.
|
long |
getTimeAt(int x)
Returns the time in millis at the given x-coordinate (location).
|
Timeline |
getTimeline()
Returns the parent timeline container of which the dateline is a member.
|
int |
getTimeLocation(long time)
Returns the location of the given time point.
|
ITimeSpan |
getTimeSpan()
Returns the time span represented by the dateline.
|
ITimeSpan |
getTimeSpanAt(int x,
boolean major)
Returns the time span in which the given x-coordinate is located.
|
ITimeSpan |
getTimeSpanAt(Point p)
Returns the time span in which the given point is located.
|
TimeZone |
getTimeZone()
Returns the time zone represented by the dateline.
|
ITimeSpan |
getVisibleTimeSpan()
Returns the currently visible time span.
|
int |
getZoomClicks()
Returns the number of clicks that are needed to trigger a zoom operation.
|
Dateline.ZoomStrategy |
getZoomStrategy()
Returns the currently used zoom strategy.
|
boolean |
isAnimatingZoom()
Determines whether the zoom in and out operations will use an animation
for user feedback.
|
boolean |
isAnimationThreadRunning()
Determines whether the dateline is currently animating a zoom operation.
|
boolean |
isClickZoomEnabled()
Returns whether the user is allowed to click on a day or an hour to make
them the new visible time span (default is true).
|
boolean |
isFocusTimeSpanEnabled()
Returns whether the currently focused time span will be highlighted with
a different background color.
|
boolean |
isManualZoomEnabled()
Determines if the manual zoom feature is enabled.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
mouseWheelMoved(MouseWheelEvent evt) |
protected void |
paintCell(Graphics g,
ITimeSpan span,
int x,
int y,
int width,
int height,
boolean major,
boolean focus)
Draws the content of a single time span cell.
|
protected void |
paintComponent(Graphics g) |
protected void |
paintGrid(Graphics g)
Paints the major and minor grid lines.
|
protected void |
paintGrid(Graphics g,
int y,
int height,
List<GridLine> grid,
boolean major)
Paints the given grid lines.
|
protected void |
paintSelectedTimeSpan(Graphics g)
Paints the time span selection.
|
protected void |
paintZoomRectangle(Graphics g,
Rectangle rect)
Draws the rectangle used to visualize an ongoing manual zoom operation,
where the user drags a grid line in order to manipulate the dateline
model's zoom variable.
|
void |
propertyChange(PropertyChangeEvent evt) |
void |
requestVisibleTimeSpan(ITimeSpan span)
Requests that the given time span will be made visible.
|
void |
setAnimatingZoom(boolean animate)
Specifies whether the zoom in and out operations will use an animation
for user feedback.
|
void |
setAnimationDuration(int duration)
Sets the duration of the animation that gets used during zoom in and out
operations.
|
void |
setClickZoomEnabled(boolean enabled)
Controls whether the user is allowed to click on a day or an hour to make
them the new visible time span (default is true).
|
<T extends IDatelineModel> |
setDatelineRenderer(Class<T> modelClass,
IDatelineRenderer<T> renderer)
Specifies a dateline renderer implementation that will be used to draw
the dateline if the dateline's model is of the given model type.
|
void |
setFocusBackground(Color color)
Sets the focus background color.
|
void |
setFocusedTimeSpan(ITimeSpan span)
Sets a new time span as the 'focused' time span.
|
void |
setFocusTimeSpanEnabled(boolean enabled)
Controls whether the currently focused time span will be highlighted with
a different background color.
|
void |
setGranularity(IGranularity granularity)
Specifies the time granularity that the dateline model should use for
calculating its minor grid.
|
void |
setGridColor(Color color)
Sets the color used by the dateline to draw its grid lines.
|
void |
setManualZoomColor(Color color)
Sets the color used to draw the manual zoom rectangle.
|
void |
setManualZoomEnabled(boolean enabled)
Specifies if the manual zoom feature is enabled.
|
void |
setMenuProvider(IDatelineMenuProvider provider)
Sets the menu provider for the dateline.
|
void |
setModel(IDatelineModel model)
Sets the model used by the dateline to convert time points to coordinates
and coordinates to time points.
|
void |
setPolicyProvider(IPolicyProvider provider)
Changes the dateline's policy provider.
|
void |
setRendererMap(Map<Class<? extends IDatelineModel>,IDatelineRenderer> map)
Sets the map used to store the mappings between dateline model classes
and dateline renderers.
|
void |
setSelectedTimeSpan(ITimeSpan span)
Sets the selected time span.
|
void |
setSelectionBackground(Color color)
Sets the selection background color.
|
void |
setSelectionForegroundColor(Color color)
Sets the selection foreground color.
|
void |
setTimeSpan(ITimeSpan span)
Sets the time span represented by the dateline.
|
void |
setTimeZone(TimeZone timeZone)
Sets a new time zone shown by the dateline.
|
void |
setZoomClicks(int zoomClicks)
Specifies how many clicks are needed to trigger a zoom operation.
|
void |
setZoomStrategy(Dateline.ZoomStrategy strategy)
Sets the currently used zoom strategy.
|
void |
showTime(long time,
boolean center)
Requests that the given time will be shown by the Gantt chart.
|
void |
showTimeNow(boolean center)
Requests that the time now will be shown by the Gantt chart.
|
void |
zoomIn()
Zooms into the dateline.
|
void |
zoomOut()
Zooms out of the dateline.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
public static final String PROPERTY_MODEL
setModel(IDatelineModel)
,
Constant Field Valuespublic static final String PROPERTY_SELECTION_FOREGROUND_COLOR
setSelectionForegroundColor(Color)
,
Constant Field Valuespublic static final String PROPERTY_SELECTION_BACKGROUND_COLOR
setSelectionBackground(Color)
,
Constant Field Valuespublic static final String PROPERTY_FOCUS_BACKGROUND_COLOR
setFocusBackground(Color)
,
Constant Field Valuespublic static final String PROPERTY_POLICY_PROVIDER
setSelectionBackground(Color)
,
Constant Field Valuespublic static final String PROPERTY_FOCUSED_TIME_SPAN
setFocusedTimeSpan(ITimeSpan)
,
Constant Field Valuespublic Dateline(Timeline timeline)
TimeGranularityDatelineModel
as its default model. The dateline
registers renderers for the TimeGranularityDatelineModel
and the
SimpleGranularityDatelineModel
(
TimeGranularityDatelineRenderer
,
SimpleGranularityDatelineRenderer
).timeline
- the timeline that contains the datelinepublic IPolicyProvider getPolicyProvider()
public void setPolicyProvider(IPolicyProvider provider)
PROPERTY_POLICY_PROVIDER
.provider
- the new policy providergetPolicyProvider()
public void setModel(IDatelineModel model)
PROPERTY_MODEL
.model
- getModel()
,
SimpleGranularityDatelineModel
,
TimeGranularityDatelineModel
public IDatelineModel getModel()
setModel(IDatelineModel)
public <T extends IDatelineModel> void setDatelineRenderer(Class<T> modelClass, IDatelineRenderer<T> renderer)
T
- the type of the dateline modelmodelClass
- the model class to which the renderer gets mappedrenderer
- the renderer to use for the given modelgetDatelineRenderer()
,
TimeGranularityDatelineModel
,
TimeGranularityDatelineRenderer
,
SimpleGranularityDatelineModel
,
SimpleGranularityDatelineRenderer
public <T extends IDatelineModel> IDatelineRenderer<T> getDatelineRenderer(Class<T> modelClass)
T
- the type of the modelmodelClass
- the model classpublic Timeline getTimeline()
public TimeZone getTimeZone()
IDatelineModel.getTimeZone()
.setTimeZone(TimeZone)
public void setTimeZone(TimeZone timeZone)
IDatelineModel.setTimeZone(TimeZone)
.timeZone
- the new time zone to usegetTimeZone()
public IDatelineRenderer getDatelineRenderer()
setDatelineRenderer(Class, IDatelineRenderer)
,
getDatelineRenderer(Class)
public void zoomIn()
IDatelineModel.requestVisibleTimeSpan(ITimeSpan)
.zoomOut()
public void zoomOut()
IDatelineModel.requestVisibleTimeSpan(ITimeSpan)
.zoomOut()
public void setSelectedTimeSpan(ITimeSpan span)
span
- the selected time spanpublic ITimeSpan getSelectedTimeSpan()
public int getTimeLocation(long time)
IDatelineModel.getTimeLocation(long)
.time
- the time for which to return an x-coordinategetTimeAt(int)
public ITimeSpan getTimeSpan()
IDatelineModel.getTimeSpan()
.setTimeSpan(ITimeSpan)
public void setGranularity(IGranularity granularity)
granularity
- the granularity requested for the minor time gridpublic IGranularity getGranularity()
public void setTimeSpan(ITimeSpan span)
IDatelineModel.setTimeSpan(ITimeSpan)
.span
- the dateline's horizongetTimeSpan()
public long getTimeAt(int x)
IDatelineModel.getTimeAt(int)
.x
- the location for which to return a time pointpublic ITimeSpan getTimeSpanAt(Point p)
p
- the coordinate to checkpublic ITimeSpan getTimeSpanAt(int x, boolean major)
IDatelineModel.getTimeSpanAt(int, boolean)
.x
- the x-coordinate to checkmajor
- if TRUE the major grid will be checked (the minor grid if
FALSE)public ITimeSpan getVisibleTimeSpan()
public void showTimeNow(boolean center)
AbstractGanttChart.showTimeNow(boolean)
.center
- if TRUE the time now will be shown in the center / middle of
the layer container, otherwise it will be on the left edge of
the layer containershowTime(long, boolean)
public void showTime(long time, boolean center)
AbstractGanttChart.showTime(long, boolean)
.time
- the time to make visiblecenter
- if TRUE the time now will be shown in the center / middle of
the layer container, otherwise it will be on the left edge of
the layer containershowTimeNow(boolean)
public void requestVisibleTimeSpan(ITimeSpan span)
span
- the time span that is requested to be shownIDatelineModel.requestVisibleTimeSpan(ITimeSpan)
public boolean isAnimationThreadRunning()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void paintGrid(Graphics g)
g
- the graphics context into which to drawsetGridColor(Color)
,
paintGrid(Graphics, int, int, List, boolean)
,
paintCell(Graphics, ITimeSpan, int, int, int, int, boolean,
boolean)
protected void paintSelectedTimeSpan(Graphics g)
g
- the graphics context into which to drawIDatelineModel.getSelectedTimeSpan()
protected void paintGrid(Graphics g, int y, int height, List<GridLine> grid, boolean major)
g
- the graphics context in which to drawy
- the y-coordinate (will be 0 when drawing the major time and
getHeight() / 2
when drawing the minor time)height
- the height used for each half of the dateline (equals
getHeight() / 2
)grid
- a list of x-coordinates where two succeeding coordinates in
combination with the given y-coordinate and the given height
specify one cell that needs to be filled by the
renderermajor
- a flag indicating whether the given grid represents major or
minor timeprotected void paintCell(Graphics g, ITimeSpan span, int x, int y, int width, int height, boolean major, boolean focus)
g
- the graphics context in which to drawspan
- the time span represented by the cellx
- the x-coordinate of the celly
- the y-coordinate of the cell the y-coordinate (will be 0 when
drawing the major time and getHeight() / 2
when
drawing the minor time)width
- the width of the cellheight
- the height used for each half of the dateline (equals
getHeight() / 2
)major
- a flag indicating whether the given grid represents major or
minor timefocus
- if TRUE the cell is the current focus ownerprotected void paintZoomRectangle(Graphics g, Rectangle rect)
g
- the graphics context into which to drawrect
- the zoom rectangleIDatelineModel.setZoom(double)
public Color getSelectionForegroundColor()
setSelectionForegroundColor(Color)
public void setSelectionForegroundColor(Color color)
color
- the color to use for the foreground of selected time spansgetSelectionForegroundColor()
public Color getSelectionBackground()
setSelectionBackground(Color)
public void setSelectionBackground(Color color)
color
- the color to use for the background of the currently selected
time spangetSelectionBackground()
public Color getFocusBackground()
setFocusBackground(Color)
public void setFocusBackground(Color color)
color
- the color to use for the background of the currently focused
time spangetFocusBackground()
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void datelineModelWillChange(DatelineModelEvent evt)
IDatelineModelListener
datelineModelWillChange
in interface IDatelineModelListener
evt
- the event that occured on the datelinepublic void datelineModelChanged(DatelineModelEvent e)
IDatelineModelListener
datelineModelChanged
in interface IDatelineModelListener
e
- the event that occured on the datelinepublic Dateline.ZoomStrategy getZoomStrategy()
Dateline.ZoomStrategy
. The default value for the zoom strategy is
Dateline.ZoomStrategy.CHANGE_VISIBLE_END_TIME
.public void setZoomStrategy(Dateline.ZoomStrategy strategy)
Dateline.ZoomStrategy
.strategy
- the strategy used for zooming into the datelinepublic void setClickZoomEnabled(boolean enabled)
enabled
- if TRUE the user can zoom into time spans by clicking on thempublic boolean isClickZoomEnabled()
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void setFocusTimeSpanEnabled(boolean enabled)
enabled
- TRUE if the background color of the focused time span will
change (default is TRUE)setFocusBackground(Color)
public boolean isFocusTimeSpanEnabled()
setFocusBackground(Color)
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseWheelMoved(MouseWheelEvent evt)
mouseWheelMoved
in interface MouseWheelListener
public IDatelineMenuProvider getMenuProvider()
public void setMenuProvider(IDatelineMenuProvider provider)
provider
- the dateline's menu providerpublic Color getGridColor()
public void setGridColor(Color color)
color
- the grid line colorpublic void setFocusedTimeSpan(ITimeSpan span)
span
- the new focused time spanpublic ITimeSpan getFocusedTimeSpan()
public void calendarChanged(CalendarModelEvent evt)
ICalendarModelListener
calendarChanged
in interface ICalendarModelListener
evt
- the change event with more information on the source of the
changepublic Map<Class<? extends IDatelineModel>,IDatelineRenderer> getRendererMap()
public void setRendererMap(Map<Class<? extends IDatelineModel>,IDatelineRenderer> map)
map
- the renderer mappublic void setZoomClicks(int zoomClicks)
zoomClicks
- number of mouse clicks needed to trigger a zoom operationpublic int getZoomClicks()
public Color getManualZoomColor()
public void setManualZoomColor(Color color)
color
- the color of the zoom rectanglepublic boolean isManualZoomEnabled()
IDatelineModel.setZoom(double)
public void setManualZoomEnabled(boolean enabled)
enabled
- if TRUE the user can manually change the zoom variable in the
dateline modelIDatelineModel.setZoom(double)
public boolean isAnimatingZoom()
setAnimationDuration(int)
public void setAnimatingZoom(boolean animate)
animate
- if TRUE the dateline will animate zooming operationssetAnimationDuration(int)
public int getAnimationDuration()
public void setAnimationDuration(int duration)
duration
- the duration of the zoom animationCopyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.