public final class GanttComposite extends org.eclipse.swt.widgets.Canvas implements org.eclipse.swt.events.MouseListener, org.eclipse.swt.events.MouseMoveListener, org.eclipse.swt.events.MouseTrackListener, org.eclipse.swt.events.KeyListener, IZoomHandler
gc.stringExtent()
, image rotation and so on. Anything that is slow _should_
be cached as it is a slowdown to the chart. A redraw should be as fast as possible and whenever possible should be
specific to certain bounds instead of a full redraw.Modifier and Type | Field and Description |
---|---|
static int |
_osType |
Constructor and Description |
---|
GanttComposite(GanttChart parent,
int style,
ISettings settings,
IColorManager colorManager,
IPaintManager paintManager,
ILanguageManager languageManager) |
GanttComposite(GanttChart parent,
int style,
ISettings settings,
IColorManager colorManager,
IPaintManager paintManager,
ILanguageManager languageManager,
Holiday[] holidays) |
Modifier and Type | Method and Description |
---|---|
void |
addConnection(GanttEvent source,
GanttEvent target)
Same as addDependency().
|
void |
addConnection(GanttEvent source,
GanttEvent target,
org.eclipse.swt.graphics.Color color)
Same as addDependency().
|
void |
addDependency(GanttEvent source,
GanttEvent target)
Adds a connection between two GanttEvents.
|
void |
addDependency(GanttEvent source,
GanttEvent target,
org.eclipse.swt.graphics.Color color)
Adds a connection between two GanttEvents.
|
void |
addEvent(GanttEvent event)
Adds a GanttEvent to the chart.
|
void |
addEvent(GanttEvent event,
boolean redraw)
Adds an GanttEvent to the chart and redraws.
|
void |
addEvent(GanttEvent event,
int index)
Adds an event at a given index.
|
void |
addGanttEventListener(IGanttEventListener listener)
Adds a listener that will be notified of Gantt events.
|
void |
addGroup(GanttGroup group)
Adds a GanttGroup to the chart.
|
void |
addPhase(GanttPhase phase)
Adds a GanttPhase to the chart.
|
void |
addPhase(GanttPhase phase,
boolean redraw)
Adds a GanttPhase to the chart with optional redraw call.
|
void |
addSection(GanttSection section)
Adds a GanttSection to the chart.
|
void |
addSection(GanttSection section,
int index)
Adds a GanttSection to the chart.
|
void |
addSelectionDetailClickListener(ISectionDetailMoreClickListener listener) |
void |
addSpecialDateRange(GanttSpecialDateRange range)
Adds a
GanttSpecialDateRange to the chart. |
void |
addSpecialDateRange(GanttSpecialDateRange range,
boolean redraw)
Adds a
GanttSpecialDateRange and optionally redraws. |
void |
clearAllSelectedHeaders()
Clears all selected headers and redraws the chart.
|
void |
clearChart()
Clears the entire chart of everything (all types of events) and leaves the chart blank.
|
void |
clearGanttEvents()
Clears all GanttEvents events from the chart.
|
void |
clearGanttGroups()
Clears all GanttGroups from the chart.
|
void |
clearGanttSections()
Clears all GanttSections from the chart.
|
void |
clearPhases()
Removes all GanttPhases from the chart
|
void |
clearSpecialDateRanges()
Removes all
GanttSpecialDateRange s and redraws. |
(package private) void |
connectionAdded(GanttConnection conn) |
(package private) void |
connectionRemoved(GanttConnection conn) |
void |
deselectAll()
Clears all selected events
|
void |
drawMarker(java.util.Date date)
Draws a dotted vertical marker at the given date.
|
(package private) void |
eventDatesChanged(GanttEvent ge,
boolean redraw) |
(package private) void |
flagForceFullUpdate() |
(package private) static org.eclipse.swt.graphics.ImageData |
flip(org.eclipse.swt.graphics.ImageData srcData,
boolean vertical) |
(package private) void |
forceFullUpdate() |
java.util.List |
getAllSelectedHeaderDates()
Returns a list of all selected header dates (Calendar).
|
GanttEvent |
getBottomEvent()
Returns the bottom most visible event in the current view of the chart.
|
org.eclipse.swt.graphics.Rectangle |
getBounds() |
int |
getCurrentView()
Returns the current view.
|
java.util.Calendar |
getDate()
Returns the current date (left-most date).
|
java.util.Calendar |
getDateAt(int x)
Gets the date for a given x position.
|
int |
getDaysVisible() |
int |
getDayWidth()
Returns the width of one day in the current zoom level.
|
java.util.Calendar |
getDDayCalendar()
Returns (a clone) of the D-Day calendar
|
java.util.List |
getEvents()
Returns all events.
|
org.eclipse.swt.graphics.Image |
getFullImage()
Returns the image that is the entire chart, regardless of what is currently visible.
|
java.util.List |
getGanttConnections()
Returns all currently connected events as a list of
GanttConnection objects. |
java.util.List |
getGanttSections()
Returns a list of all GanttSections.
|
java.util.List<GanttGroup> |
getGroups()
Returns a list of all GanttGroups.
|
int |
getHeaderHeight() |
org.eclipse.swt.graphics.Image |
getImage()
Returns the current visible area of the chart as an image
|
org.eclipse.swt.graphics.Image |
getImage(org.eclipse.swt.graphics.Rectangle bounds)
Returns the chart as an image for the given bounds.
|
int |
getLayerOpacity(int layer)
Returns the layer opacity for a layer.
|
(package private) int |
getLeftMostPixel() |
(package private) int |
getRightMostPixel() |
java.util.Calendar |
getRootCalendar()
Returns the non-cloned root calendar of the chart.
|
java.util.Calendar |
getRootEndCalendar()
Returns the non-cloned root end calendar of the chart.
|
java.util.Calendar |
getRootStartCalendar()
Returns the non-cloned root start calendar of the chart.
|
GanttSection |
getSectionAt(org.eclipse.swt.events.MouseEvent me)
Returns a section that corresponds to where the given MouseEvent is fired
|
java.util.List<java.lang.Object> |
getSelectedEvents()
Returns the a list of all currently selected events, or an emtpy list if none.
|
ISettings |
getSettings() |
int |
getStartingXFor(java.util.Calendar date)
Returns the starting x for a given date.
|
int |
getStartingXForEventDate(java.util.Calendar date)
Returns the starting x position for a given date in the current view.
|
GanttEvent |
getTopEvent()
Returns the topmost visible event in the current view of the chart.
|
int |
getTotalVisibileGanttEvents()
Returns the number of visible events on in the current viewport
|
GanttUndoRedoManager |
getUndoRedoManager()
Returns the Undo/Redo manager.
|
org.eclipse.swt.graphics.Image |
getVerticallyFullImage()
Returns the chart as an image with the visible horizontal area
but showing all information in the chart vertically.
|
IViewPortHandler |
getViewPortHandler() |
org.eclipse.swt.graphics.Rectangle |
getVisibleBounds()
Returns a rectangle with the bounds of what is actually visible inside the chart.
|
int |
getXForDate(java.util.Calendar cal)
Gets the x position where the given date starts in the current visible area.
|
int |
getXForDate(java.util.Date date)
Gets the X for a given date.
|
boolean |
hasEvent(GanttEvent event)
Checks whether the chart has a given event.
|
(package private) boolean |
hasGanttPhases() |
(package private) boolean |
hasGanttSections() |
(package private) boolean |
hasSpecialDateRanges() |
void |
heavyRedraw()
This will cause a full recaclulation of events and a lot of other things.
|
void |
hideAllLayers()
Hides all layers and redraws the event area.
|
void |
hideLayer(int layer)
Hides all layers of the given value and redraws the event area.
|
(package private) boolean |
isChartReady() |
boolean |
isConnected(GanttEvent ge)
Returns true if the given event is connected to another.
|
boolean |
isConnected(GanttEvent source,
GanttEvent target)
Checks whether two events are connected to each other.
|
(package private) boolean |
isDDayCalendar() |
boolean |
isEventVisible(GanttEvent event,
org.eclipse.swt.graphics.Rectangle bounds)
Checks whether a certain event is visible in the current bounds.
|
boolean |
isShowingDaysOnEvents()
Returns whether event day number drawing is currently on or off.
|
boolean |
isShowingGanttSections()
Whether the chart has gantt sections or not
|
boolean |
isShowingPlannedDates()
Returns whether planned date drawing is currently on or off.
|
void |
jumpToEarliestEvent()
Moves the calendar to the earliest event date.
|
void |
jumpToEvent(GanttEvent event,
boolean start,
int side)
Moves the calendar to a particular event date horizontally.
|
void |
jumpToLatestEvent()
Moves the calendar to the latest event date.
|
void |
jumpToToday()
Moves calendar to the current date/time.
|
void |
jumpToToday(int side)
Moves calendar to the current date/time.
|
void |
keyPressed(org.eclipse.swt.events.KeyEvent e) |
void |
keyReleased(org.eclipse.swt.events.KeyEvent e) |
(package private) void |
killDialogs() |
void |
mouseDoubleClick(org.eclipse.swt.events.MouseEvent me) |
void |
mouseDown(org.eclipse.swt.events.MouseEvent me) |
void |
mouseEnter(org.eclipse.swt.events.MouseEvent event) |
void |
mouseExit(org.eclipse.swt.events.MouseEvent event) |
void |
mouseHover(org.eclipse.swt.events.MouseEvent me) |
void |
mouseMove(org.eclipse.swt.events.MouseEvent me) |
void |
mouseUp(org.eclipse.swt.events.MouseEvent event) |
(package private) void |
moveXBounds(boolean positive) |
void |
nextDay()
Jumps one day forward.
|
void |
nextHour()
Jumps to the next hour.
|
void |
nextMinute()
Jumps to the next hour.
|
void |
nextMonth()
Jumps to the next month.
|
void |
nextWeek()
Jumps one week forward.
|
void |
prevDay()
Jumps one day backwards.
|
void |
prevHour()
Jumps to the previous hour.
|
void |
prevMinute()
Jumps to the previous minute.
|
void |
prevMonth()
Jumps to the previous month.
|
void |
prevWeek()
Jumps one week backwards.
|
void |
redraw() |
void |
redraw(org.eclipse.swt.graphics.Rectangle rect) |
void |
refresh()
Redraws the calendar should some event not do it automatically.
|
void |
reindex(GanttEvent event,
int newIndex)
Re-indexes an event to a new index.
|
void |
reindex(GanttGroup group,
int newIndex)
Re-indexes a GanttGroup to a new index.
|
void |
reindex(GanttSection section,
int newIndex)
Re-indexes a GanttSection to a new index.
|
boolean |
removeEvent(GanttEvent event)
Removes a GanttEvent from the chart.
|
void |
removeGanttEventListener(IGanttEventListener listener)
Removes a listener from being notified of Gantt events.
|
void |
removeGroup(GanttGroup group)
Removes a GanttGroup from the chart.
|
void |
removePhase(GanttPhase phase)
Removes a GanttPhase from the chart.
|
void |
removePhase(GanttPhase phase,
boolean redraw)
Removes a GanttPhase from the chart with optional redraw call.
|
void |
removeSection(GanttSection section)
Removes a GanttSection from the chart.
|
void |
removeSelectionDetailClickListener(ISectionDetailMoreClickListener listener) |
void |
removeSpecialDateRange(GanttSpecialDateRange range)
Removes a
GanttSpecialDateRange to the chart and redraws. |
void |
removeSpecialDateRange(GanttSpecialDateRange range,
boolean redraw)
Removes a
GanttSpecialDateRange to the chart and redraws. |
void |
resetZoom()
Resets the zoom level to that set in the settings.
|
(package private) static org.eclipse.swt.graphics.ImageData |
rotate(org.eclipse.swt.graphics.ImageData srcData,
int direction) |
void |
selectAll()
Selects all events
|
void |
setDate(java.util.Calendar date)
Sets the calendar date.
|
void |
setDate(java.util.Calendar date,
boolean applyOffset)
Sets the new date of the calendar and redraws.
|
void |
setDate(java.util.Calendar date,
int side)
Sets the calendar date to the given date and shows it on the chart.
|
void |
setDate(java.util.Calendar date,
int side,
boolean clearMinutes)
Sets the calendar date to the given date and shows it on the chart.
|
void |
setDrawHorizontalLinesOverride(boolean drawHorizontal)
Setting this to true will force horizontal lines to draw despite what may be set in the settings.
|
void |
setDrawVerticalLinesOverride(boolean drawVertical)
Setting this to true will force vertical lines to draw despite what may be set in the settings.
|
void |
setEventFactory(IEventFactory factory) |
void |
setEventMenuItemFactory(IEventMenuItemFactory factory) |
void |
setEventSpacerOverride(int height)
Setting a fixed event spacer overrides all individual event space settings on chart items and all settings.
|
void |
setFixedRowHeightOverride(int height)
Setting a fixed row height override causes all rows to be the set height regardless of individual row heights set
on items themselves and all settings.
|
void |
setHolidays(Holiday[] holidays) |
void |
setLayerOpacity(int layer,
int opacity)
Sets the drawing opacity for a layer.
|
void |
setMenuItemFactory(IMenuItemFactory factory) |
(package private) void |
setNoRecalc() |
void |
setSelectedHeaderDates(java.util.List dates)
Sets a list of header dates that should be the selected dates.
|
void |
setSelection(GanttEvent event)
Sets the selection to be a specific GanttEvent.
|
void |
setSelection(java.util.List list)
Sets the selection to be a set of GanttEvents.
|
void |
setShowDaysOnEvents(boolean showDates)
Flag whether to show the number of days on events.
|
void |
setShowPlannedDates(boolean showPlanned)
Flag whether to show planned dates or not.
|
void |
setTopItem(GanttEvent ge,
int side)
Sets the top visible item in the chart and scrolls to show it.
|
void |
setTopItem(GanttEvent ge,
int yOffset,
int side)
Sets the top visible item in the chart and scrolls to show it.
|
void |
setUseAdvancedTooltips(boolean useAdvancedTooltips)
Sets whether to use advanced tooltips or not.
|
void |
setView(int view)
Sets the current view.
|
void |
setViewPortHandler(IViewPortHandler2 vph) |
void |
setZoomHandler(IZoomHandler zoomHandler) |
void |
setZoomLevel(int level)
Sets the zoom level.
|
void |
showAllLayers()
Shows all layers and redraws the event area.
|
void |
showEvent(GanttEvent ge,
int side)
Scrolls the chart to the selected item regardless if it is visible or not.
|
void |
showLayer(int layer)
Shows all layers of the given value and redraws the event area.
|
(package private) void |
showScrollDate() |
(package private) void |
updateHorizontalScrollbar() |
(package private) void |
updateVerticalScrollBar(boolean redraw) |
void |
vScroll() |
void |
zoomIn()
Zooms in.
|
void |
zoomIn(boolean fromMouseWheel,
org.eclipse.swt.graphics.Point mouseLoc) |
void |
zoomOut()
Zooms out.
|
void |
zoomOut(boolean fromMouseWheel,
org.eclipse.swt.graphics.Point mouseLoc) |
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
mouseDoubleClickAdapter, mouseDownAdapter, mouseUpAdapter
mouseEnterAdapter, mouseExitAdapter, mouseHoverAdapter
public GanttComposite(GanttChart parent, int style, ISettings settings, IColorManager colorManager, IPaintManager paintManager, ILanguageManager languageManager)
public GanttComposite(GanttChart parent, int style, ISettings settings, IColorManager colorManager, IPaintManager paintManager, ILanguageManager languageManager, Holiday[] holidays)
public void vScroll()
void updateVerticalScrollBar(boolean redraw)
public java.util.Calendar getDate()
public java.util.Calendar getRootCalendar()
public java.util.Calendar getRootEndCalendar()
public java.util.Calendar getRootStartCalendar()
public void hideLayer(int layer)
layer
- Layer to hide.public void showLayer(int layer)
layer
- Layer to show.public void redraw(org.eclipse.swt.graphics.Rectangle rect)
public void showAllLayers()
public void hideAllLayers()
public void setLayerOpacity(int layer, int opacity)
layer
- Layer to set opacity onopacity
- Opacity between 0 and 255public int getLayerOpacity(int layer)
layer
- Layer to get opacity forpublic void setFixedRowHeightOverride(int height)
height
- Height to set. Set to zero to turn off.public void setEventSpacerOverride(int height)
height
- Height to set. Set to zero to turn off.public void setDrawHorizontalLinesOverride(boolean drawHorizontal)
drawHorizontal
- true to draw horizontal lines.public void setDrawVerticalLinesOverride(boolean drawVertical)
drawVertical
- true to draw vertical lines.public void setSelection(GanttEvent event)
event
- GanttEvent to selectpublic void setSelection(java.util.List list)
SWT.SINGLE
you should be using
setSelection(GanttEvent)
as this method will do nothing. This method will cause a redraw.list
- List of GanttEvents to selectpublic void addGroup(GanttGroup group)
group
- Group to addpublic java.util.List<GanttGroup> getGroups()
public void removeGroup(GanttGroup group)
group
- Group to removepublic void addSection(GanttSection section)
section
- Section to addpublic void addSection(GanttSection section, int index)
section
- Section to addindex
- the index to add the Section atpublic void removeSection(GanttSection section)
section
- Section to removepublic java.util.List getGanttSections()
void showScrollDate()
public GanttEvent getTopEvent()
public GanttEvent getBottomEvent()
void killDialogs()
public void setShowPlannedDates(boolean showPlanned)
showPlanned
- true to show planned datespublic boolean isShowingPlannedDates()
public void setShowDaysOnEvents(boolean showDates)
showDates
- public boolean isShowingDaysOnEvents()
public boolean isShowingGanttSections()
public java.util.List<java.lang.Object> getSelectedEvents()
public void setTopItem(GanttEvent ge, int yOffset, int side)
ge
- Event to showyOffset
- y offset modifierside
- one of SWT.LEFT
, SWT.CENTER
,
SWT.RIGHT
, SWT.NONE
public void setTopItem(GanttEvent ge, int side)
ge
- Event to showside
- one of SWT.LEFT
, SWT.CENTER
,
SWT.RIGHT
, SWT.NONE
public void showEvent(GanttEvent ge, int side)
ge
- GanttEvent to scroll to.side
- one of SWT.LEFT
, SWT.CENTER
, SWT.RIGHT
public org.eclipse.swt.graphics.Rectangle getBounds()
getBounds
in class org.eclipse.swt.widgets.Control
public int getHeaderHeight()
public void addDependency(GanttEvent source, GanttEvent target)
source
- Source eventtarget
- Target eventpublic void addDependency(GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color color)
Source
will connect to Target
.source
- Source eventtarget
- Target eventColor
- to use to draw connection. Set null to use default color from Settings.void connectionAdded(GanttConnection conn)
void connectionRemoved(GanttConnection conn)
public boolean isConnected(GanttEvent ge)
ge
- GanttEvent to checkpublic boolean isConnected(GanttEvent source, GanttEvent target)
source
- Source eventtarget
- Target eventpublic void addConnection(GanttEvent source, GanttEvent target)
source
- Source eventtarget
- Target eventpublic void addConnection(GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color color)
source
- Source eventtarget
- Target eventColor
- to use to draw connection. Set null to use defaults.public void setDate(java.util.Calendar date)
date
- setDate(Calendar, boolean)
,
setDate(Calendar, int)
,
setDate(Calendar, int, boolean)
public void jumpToToday()
public void jumpToToday(int side)
side
- one of SWT.LEFT
, SWT.CENTER
, SWT.RIGHT
public void jumpToEarliestEvent()
public void jumpToLatestEvent()
public void jumpToEvent(GanttEvent event, boolean start, int side)
#setTopItem(GanttEvent)
or setTopItem(GanttEvent, int)
.event
- Event to move tostart
- true if to jump to the start date, false if to jump to the end date.side
- one of SWT.LEFT
, SWT.CENTER
, SWT.RIGHT
public void setDate(java.util.Calendar date, int side, boolean clearMinutes)
date
- Dateside
- one of SWT.LEFT
, SWT.CENTER
, SWT.RIGHT
clearMinutes
- true if to clear minutes, seconds, millisecondssetDate(Calendar, int)
public void setDate(java.util.Calendar date, int side)
setDate(Calendar, int, boolean)
date
- Dateside
- one of SWT.LEFT
, SWT.CENTER
, SWT.RIGHT
public void setDate(java.util.Calendar date, boolean applyOffset)
date
- Date to setapplyOffset
- whether to apply the settings offsetsetDate(Calendar)
,
setDate(Calendar, int)
,
setDate(Calendar, int, boolean)
public void reindex(GanttEvent event, int newIndex)
event
- GanttEvent to reindexnewIndex
- new indexpublic void reindex(GanttSection section, int newIndex)
section
- GanttSection to reindexnewIndex
- new indexpublic void reindex(GanttGroup group, int newIndex)
group
- GanttGroup to reindexnewIndex
- new indexpublic void addPhase(GanttPhase phase)
phase
- GanttPhase to addpublic void removePhase(GanttPhase phase)
phase
- GanttPhase to removepublic void addSpecialDateRange(GanttSpecialDateRange range)
GanttSpecialDateRange
to the chart.range
- GanttSpecialDateRange
to add.public void removeSpecialDateRange(GanttSpecialDateRange range)
GanttSpecialDateRange
to the chart and redraws.range
- GanttSpecialDateRange
to removepublic void removeSpecialDateRange(GanttSpecialDateRange range, boolean redraw)
GanttSpecialDateRange
to the chart and redraws.range
- GanttSpecialDateRange
to removeredraw
- true to redrawpublic void clearSpecialDateRanges()
GanttSpecialDateRange
s and redraws.public void addSpecialDateRange(GanttSpecialDateRange range, boolean redraw)
GanttSpecialDateRange
and optionally redraws.range
- GanttSpecialDateRange
to addredraw
- true to redrawpublic void addPhase(GanttPhase phase, boolean redraw)
phase
- GanttPhase to addredraw
- true to redrawpublic void removePhase(GanttPhase phase, boolean redraw)
phase
- GanttPhase to removeredraw
- true to redrawpublic void clearPhases()
public void addEvent(GanttEvent event)
event
- GanttEventpublic void addEvent(GanttEvent event, int index)
event
- GanttEventindex
- indexpublic void addEvent(GanttEvent event, boolean redraw)
event
- GanttEventredraw
- true if to redraw chartpublic boolean removeEvent(GanttEvent event)
event
- GanttEvent to removepublic java.util.List getGanttConnections()
GanttConnection
objects.void eventDatesChanged(GanttEvent ge, boolean redraw)
public void clearGanttEvents()
public void clearGanttGroups()
public void clearGanttSections()
public void clearChart()
public boolean hasEvent(GanttEvent event)
event
- GanttEventpublic void nextMonth()
public void prevMonth()
public void nextWeek()
public void prevWeek()
public void nextHour()
public void prevMinute()
public void nextMinute()
public void prevHour()
public void nextDay()
public void prevDay()
void setNoRecalc()
void moveXBounds(boolean positive)
public void refresh()
public boolean isEventVisible(GanttEvent event, org.eclipse.swt.graphics.Rectangle bounds)
event
- GanttEventbounds
- Boundspublic int getStartingXForEventDate(java.util.Calendar date)
date
- Datepublic int getStartingXFor(java.util.Calendar date)
date
- Calendar datepublic int getDayWidth()
public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent me)
mouseDoubleClick
in interface org.eclipse.swt.events.MouseListener
public java.util.List getAllSelectedHeaderDates()
public void clearAllSelectedHeaders()
public void setSelectedHeaderDates(java.util.List dates)
dates
- List of Calendar objects representing selected header dates.public void mouseDown(org.eclipse.swt.events.MouseEvent me)
mouseDown
in interface org.eclipse.swt.events.MouseListener
public void mouseUp(org.eclipse.swt.events.MouseEvent event)
mouseUp
in interface org.eclipse.swt.events.MouseListener
public GanttSection getSectionAt(org.eclipse.swt.events.MouseEvent me)
event
- MouseEvent to checkpublic void keyPressed(org.eclipse.swt.events.KeyEvent e)
keyPressed
in interface org.eclipse.swt.events.KeyListener
public void keyReleased(org.eclipse.swt.events.KeyEvent e)
keyReleased
in interface org.eclipse.swt.events.KeyListener
public void mouseMove(org.eclipse.swt.events.MouseEvent me)
mouseMove
in interface org.eclipse.swt.events.MouseMoveListener
public int getDaysVisible()
boolean isChartReady()
public int getXForDate(java.util.Date date)
date
- Datepublic int getXForDate(java.util.Calendar cal)
cal
- Calendarpublic java.util.Calendar getDateAt(int x)
x
- x locationpublic void drawMarker(java.util.Date date)
date
- Date to draw it atpublic void mouseEnter(org.eclipse.swt.events.MouseEvent event)
mouseEnter
in interface org.eclipse.swt.events.MouseTrackListener
public void mouseExit(org.eclipse.swt.events.MouseEvent event)
mouseExit
in interface org.eclipse.swt.events.MouseTrackListener
public void mouseHover(org.eclipse.swt.events.MouseEvent me)
mouseHover
in interface org.eclipse.swt.events.MouseTrackListener
public org.eclipse.swt.graphics.Rectangle getVisibleBounds()
public int getCurrentView()
public void setView(int view)
view
- Viewpublic java.util.List getEvents()
public org.eclipse.swt.graphics.Image getImage()
public org.eclipse.swt.graphics.Image getVerticallyFullImage()
public org.eclipse.swt.graphics.Image getFullImage()
getImage()
is called from within.
Do note that if the chart is "huge", you may need to increase your heap size. If you're zoomed in that's also taken into account and you may need a massive heap to work with hours views as they are simply huge in a pixel-size sense.
public org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.graphics.Rectangle bounds)
bounds
- Rectangle boundspublic void heavyRedraw()
void forceFullUpdate()
void flagForceFullUpdate()
public IViewPortHandler getViewPortHandler()
public void setViewPortHandler(IViewPortHandler2 vph)
void updateHorizontalScrollbar()
int getLeftMostPixel()
int getRightMostPixel()
public void setZoomLevel(int level)
level
- Level to setpublic void zoomIn()
zoomIn
in interface IZoomHandler
public void zoomIn(boolean fromMouseWheel, org.eclipse.swt.graphics.Point mouseLoc)
zoomIn
in interface IZoomHandler
public void zoomOut()
zoomOut
in interface IZoomHandler
public void zoomOut(boolean fromMouseWheel, org.eclipse.swt.graphics.Point mouseLoc)
zoomOut
in interface IZoomHandler
public void resetZoom()
resetZoom
in interface IZoomHandler
public void redraw()
redraw
in class org.eclipse.swt.widgets.Control
public void addGanttEventListener(IGanttEventListener listener)
listener
- Listenerpublic void removeGanttEventListener(IGanttEventListener listener)
listener
- Listenerpublic void setUseAdvancedTooltips(boolean useAdvancedTooltips)
useAdvancedTooltips
- true whether to use advanced tooltips.public java.util.Calendar getDDayCalendar()
public GanttUndoRedoManager getUndoRedoManager()
GanttUndoRedoManager
public int getTotalVisibileGanttEvents()
public void selectAll()
public void deselectAll()
static org.eclipse.swt.graphics.ImageData rotate(org.eclipse.swt.graphics.ImageData srcData, int direction)
static org.eclipse.swt.graphics.ImageData flip(org.eclipse.swt.graphics.ImageData srcData, boolean vertical)
boolean hasGanttPhases()
boolean hasGanttSections()
boolean hasSpecialDateRanges()
boolean isDDayCalendar()
public ISettings getSettings()
public void setEventFactory(IEventFactory factory)
public void setEventMenuItemFactory(IEventMenuItemFactory factory)
public void setMenuItemFactory(IMenuItemFactory factory)
public void setZoomHandler(IZoomHandler zoomHandler)
public void addSelectionDetailClickListener(ISectionDetailMoreClickListener listener)
public void removeSelectionDetailClickListener(ISectionDetailMoreClickListener listener)
public void setHolidays(Holiday[] holidays)