Interface ISettings

All Known Subinterfaces:
ISettings2
All Known Implementing Classes:
AbstractSettings, DefaultSettings, GanttTester.TestSettings

public interface ISettings
This interface lets you define various settings for the GanttChart. It's highly advisable that for implementation, AbstractSettings is extended and methods needed to be changed from their defaults are overridden and changed. It would be quite a hassle to implement a full ISettings interface from scratch. In order to preserve binary compatibility, after the MinuteView implementation, this interface has been extended by ISettings2 Please refer both to ISettings and ISettings2 for any setting change.
 class MySettings extends AbstractSettings {
        // override your methods here
 }
 

Once you've overridden the settings you wish to change, simply pass an instance of your implementation class to the constructor of GanttChart: GanttChart(org.eclipse.swt.widgets.Composite, int, ISettings)

  • Field Details

  • Method Details

    • getDateFormat

      java.lang.String getDateFormat()
      The date format to use when displaying dates in string format.
      Returns:
      Date format. Default is month/day/year.
      See Also:
      DateFormat, DateFormatSymbols
    • getHourDateFormat

      java.lang.String getHourDateFormat()
      The date format to use when displaying dates in string format in the hours view.
      Returns:
      Date format. Default is month/day/year/ hh:mm.
      See Also:
      DateFormat, DateFormatSymbols
    • getDefaultEventColor

      org.eclipse.swt.graphics.Color getDefaultEventColor()
      The default color for an event when there is none set on the event itself.
      Returns:
      Event color. Default is gray.
    • getDefaultGradientEventColor

      org.eclipse.swt.graphics.Color getDefaultGradientEventColor()
      The default gradient color for an event (if gradients are turned on).
      Returns:
      Event gradient color. Default is white-ish.
    • showPropertiesMenuOption

      boolean showPropertiesMenuOption()
      Whether to show the properties menu option in the right click menu. When clicked the event will be reported to IGanttEventListener.
      Returns:
      True if to show the menu item. Default is true.
      See Also:
      IGanttEventListener#eventPropertiesSelected(GanttEvent)
    • showDeleteMenuOption

      boolean showDeleteMenuOption()
      Whether to show the delete menu option in the right click menu. When clicked the event will be reported to IGanttEventListener.
      Returns:
      True if to show the menu item. Default is true.
      See Also:
      IGanttEventListener.eventsDeleteRequest(java.util.List, org.eclipse.swt.events.MouseEvent)
    • getArrowConnectionType

      int getArrowConnectionType()
      What type of arrow connection to draw. There are three types:
      • CONNECTION_ARROW_RIGHT_TO_TOP - Arrow line (and arrow head if turned on) will be drawn into the events top and bottom corners.
      • CONNECTION_ARROW_RIGHT_TO_LEFT - Arrow line (and arrow head if turned on) will be drawn into the events middle left or right side.
      • CONNECTION_MS_PROJECT_STYLE - Arrow line (and arrow head if turned on) will be drawn as logically as possible from above event to below. Lines are rounded in corners and arrows will go to middle to top of below event or to side depending on where event is situated.
      • CONNECTION_BIRDS_FLIGHT_PATH - Straight "as the bird flies" line between events without any bends.
      Returns:
      Arrow head type. Default is CONNECTION_MS_PROJECT_STYLE.
      See Also:
      CONNECTION_MS_PROJECT_STYLE
    • getInitialView

      int getInitialView()
      What view is used when the chart is initially drawn. Options are:
      Returns:
      Initial view. Default is VIEW_WEEK.
    • getInitialZoomLevel

      int getInitialZoomLevel()
      Returns:
      Zoom level. Default is ZOOM_DAY_NORMAL
      See Also:
      ZOOM_DAY_MAX
    • showArrows

      boolean showArrows()
      If to draw arrows on connecting lines or not.
      Returns:
      true if to show arrowheads on connecting lines. Default is true.
    • enableAutoScroll

      boolean enableAutoScroll()
      Whether to enable auto scroll which causes the chart to scroll either left or right when events are dragged or resized beyond the bounds of the chart.
      Returns:
      true if to enable. Default is true.
    • showToolTips

      boolean showToolTips()
      Whether to show tooltips when mouse is lingering over events.
      Returns:
      true if to show tooltips. Default is true.
    • getToolTipContentReplacer

      IToolTipContentReplacer getToolTipContentReplacer()
      Returns the custom tool tip generator which generates the tooltip out of custom data for a GanttEvent.
      Returns:
    • showDateTips

      boolean showDateTips()
      Whether to show date tooltips when events are moved or resized.
      Returns:
      true if to show tooltips. Default is true.
    • showBarsIn3D

      boolean showBarsIn3D()
      Whether to show events in 3D (meaning, a drop shadow is drawn below and to the right of the event)
      Returns:
      true if to show events in 3D. Default is true.
    • showGradientEventBars

      boolean showGradientEventBars()
      Whether to draw the color on the events using gradients. The colors are controlled by setting the following two variables on the GanttEvent. GanttEvent.setGradientStatusColor(Color) and GanttEvent.setStatusColor(Color).
      Returns:
      true if to draw with gradients. Default is true.
      See Also:
      GanttEvent.setGradientStatusColor(Color), GanttEvent.setStatusColor(Color)
    • showOnlyDependenciesForSelectedItems

      boolean showOnlyDependenciesForSelectedItems()
      Whether to only show the dependency connections only when an event is selected, as opposed to always showing the lines.
      Returns:
      true if to show them only on selections. Default is false.
    • showNumberOfDaysOnBars

      boolean showNumberOfDaysOnBars()
      Whether to show a "plaque" on the event bars that displays a number of how many days the event spans over.
      Returns:
      true if to show the plaque. Default is false.
    • showPlannedDates

      boolean showPlannedDates()
      Whether to draw lines that show where the revised dates would have been on the chart (assuming revised dates are set).
      Returns:
      true if to draw lines for the revised dates. Default is false.
    • getHeaderMonthHeight

      int getHeaderMonthHeight()
      Returns the height of the header section that displays the month names.
      Returns:
      Pixel value. Default is 18.
    • getHeaderDayHeight

      int getHeaderDayHeight()
      Returns the height of the header section that displays the days.
      Returns:
      Pixel value. Default is 18.
    • getDayWidth

      int getDayWidth()
      Returns the width for each day that is drawn. Zoom levels use multipliers with these numbers.
      Returns:
      Pixel value. Default is 16.
    • getMonthDayWidth

      int getMonthDayWidth()
      Returns the width for each day that is drawn in the monthly view. Zoom levels use multipliers with these numbers.
      Returns:
      Pixel value. Default is 6.
    • getYearMonthDayWidth

      int getYearMonthDayWidth()
      Returns the width for each day that is drawn in the yearly view. Zoom levels use multipliers with these numbers.

      WARNING: Setting this value below 3 will cause an infinite loop and probable application crash. This happens as internal size calculations end up on 0 width (rounded) values.

      Returns:
      Pixel value. Default is 3.
    • getEventHeight

      int getEventHeight()
      Returns the height for each event, including checkpoints.
      Returns:
      Pixel value. Default is 12.
    • getEventPercentageBarHeight

      int getEventPercentageBarHeight()
      Returns the height of the bar that is drawn inside the events that represents the percentage done.

      Note: If the event height is an even number, this number does best being odd, and vice versa.

      Returns:
      Pixel value. Default is 3.
    • drawFullPercentageBar

      boolean drawFullPercentageBar()
      The percentage bar always draws as a line in the center of the event but normally it only draws the part that displays the % complete. If this returns true it will draw that part, but also the remainder. You can set the color for the remainder different than that from the actual percentage complete as well.
      Returns:
      true if to draw the entire bar. Default is true.
    • getPercentageBarAlpha

      int getPercentageBarAlpha()
      The Alpha level of the percentage complete bar. Only draws if Alpha is turned on.
      Returns:
      Alpha value. Default is 255.
    • getRemainderPercentageBarAlpha

      int getRemainderPercentageBarAlpha()
      The Alpha level of the remaining percentage complete bar. Only draws if Alpha is turned on.
      Returns:
      Alpha value. Default is 70.
    • getResizeBorderSensitivity

      int getResizeBorderSensitivity()
      Returns the number of pixels off each side of an event that is the area for which the resize cursor is shown. If people find it hard to grab events, increase this number.
      Returns:
      Pixel value. Default is 3.
    • getMoveAreaNegativeSensitivity

      int getMoveAreaNegativeSensitivity()
      Returns the number of pixels off each side of an event towards the center of it that is ignored when trying to move an event. This is to help resize distinguish from a move cursor and to help users find the two different areas.
      Returns:
      Pixel value. Default is 6. Remember that this value is handled in a negative calculation, but it should be a positive value.
    • getTextSpacerConnected

      int getTextSpacerConnected()
      Returns the space between the actual event and the text that is written after the event when the event has a connecting line extending from it.
      Returns:
      Pixel value. Default is 9.
    • getTextSpacerNonConnected

      int getTextSpacerNonConnected()
      Returns the space between the actual event and the text that is written after the event when the event has no connecting line extending from it.
      Returns:
      Pixel value. Default is 9.
    • getDayVerticalSpacing

      int getDayVerticalSpacing()
      Returns the space from the left of the border where the day letter is printed.
      Returns:
      Pixel value. Default is 3.
    • getDayHorizontalSpacing

      int getDayHorizontalSpacing()
      Returns the spacing from the top where the day letter is printed.
      Returns:
      Pixel value. Default is 4.
    • getEventSpacer

      int getEventSpacer()
      Returns the vertical space between each event.
      Returns:
      Pixel value. Default is 12.
    • showBoldScopeText

      boolean showBoldScopeText()
      Whether the name of the scope is drawn in bold or plain.
      Returns:
      true if bold. Default is true.
    • adjustForLetters

      boolean adjustForLetters()
      Letters have different width. If turned on, this will try to make all day letters appear centered, whereas if turned off, letter width will be ignored.
      Returns:
      true if to adjust for letter widths. Default is true.
    • enableResizing

      boolean enableResizing()
      Whether event-resizing is turned on or off.
      Returns:
      true if turned on. If turned off, event resizing is not possible. Default is true.
    • moveLinkedEventsWhenEventsAreMoved

      boolean moveLinkedEventsWhenEventsAreMoved()
      Whether users can hold down SHIFT (or whatever the settings say) to move an event, and all dependent events will move with the selected event.
      Returns:
      true if to move all linked events. Default is true.
      See Also:
      getDragAllModifierKey()
    • enableDragAndDrop

      boolean enableDragAndDrop()
      Whether event drag-and-drop is turned on or off.
      Returns:
      true if turned on. If turned off, drag and drop is not possible. Default is true.
    • showZoomLevelBox

      boolean showZoomLevelBox()
      Whether when a user zooms in or out (only via CTRL (or whatever the settings say) + Scroll Wheel) to display a box in the bottom left corner that shows the zoom level.
      Returns:
      true if to show a box when zooming. Default is true.
      See Also:
      getZoomWheelModifierKey()
    • allowInfiniteHorizontalScrollBar

      boolean allowInfiniteHorizontalScrollBar()
      Whether to mimic Microsoft © Project's infinite scrollbar which lets users scroll into the future or past indefinitely. If turned off, the scrollbar will reflect the range of the oldest event's start date, to the latest event end date.
      Returns:
      true if to turn on infinite scrollbar. Default is true.
    • showResizeDateTipOnBorders

      boolean showResizeDateTipOnBorders()
      Whether the date tooltip box (if turned on) when resizing should hug the border of the event on the left or right side or if it should be simply stick somewhat to the event resize location.
      Returns:
      true if to stick to the resize sides. Default is true.
    • allowBlankAreaDragAndDropToMoveDates

      boolean allowBlankAreaDragAndDropToMoveDates()
      If true, it lets the move forwards or backwards in time by clicking in a "blank" area and dragging the mouse. Similar to the hand tool in Photoshop or Acrobat.
      Returns:
      true if to allow clear-area drag. Default is true.
    • allowBlankAreaVerticalDragAndDropToMoveChart

      boolean allowBlankAreaVerticalDragAndDropToMoveChart()
      Relies on allowBlankAreaDragAndDropToMoveDates() being true. If so, this will additionally determine if the user can blank-area drag the chart in a vertical manner to move the chart in that direction as well.

      Holding down the shift key will double the speed of the vertical drag

      Returns:
      true to allow clear-area vertical drag. Default is false (as it can be confusing at first try).
    • flipBlankAreaDragDirection

      boolean flipBlankAreaDragDirection()
      If for some reason the drag left vs. drag right directions feel reversed, simply flip this to switch them around. Only active if allowBlankAreaDragAndDropToMoveDates() is active.
      Returns:
      true if to flip them around. Default is false.
      See Also:
      allowBlankAreaDragAndDropToMoveDates()
    • drawSelectionMarkerAroundSelectedEvent

      boolean drawSelectionMarkerAroundSelectedEvent()
      If true, draws a dotted selection marker around the currently selected event to visualize the selection.
      Returns:
      true if to show a selection marker. Default is true.
    • allowCheckpointResizing

      boolean allowCheckpointResizing()
      Whether checkpoints can be resized (assuming resizing is on enableResizing()).
      Returns:
      true if checkpoints can be resized. Default is false.
      See Also:
      enableResizing()
    • showMenuItemsOnRightClick

      boolean showMenuItemsOnRightClick()
      Whether to show any menu items at all when right clicking an event or a chart.
      Returns:
      true if to show menu items on right click. Default is true.
    • getArrowHeadEventSpacer

      int getArrowHeadEventSpacer()
      Returns the space between the head of the dependency arrowhead and the event.
      Returns:
      pixel space. Default is 1.
    • getArrowHeadVerticalAdjuster

      int getArrowHeadVerticalAdjuster()
      If you for some reason wish to move the arrow head up or down vertically, setting a number here will modify the vertical "extra".
      Returns:
      pixel length. Default is 0.
    • getStartupCalendarDate

      java.util.Calendar getStartupCalendarDate()
      Returns the position that the calendar should start on when first created. If null, the current date will be used. Please remember to use a Locale when you create your Calendar object, ideally the same as used in the settings getDefaultLocale().
      Returns:
      Calendar, or null.
    • getCalendarStartupDateOffset

      int getCalendarStartupDateOffset()
      Date offset of the startup date that the calendar should start at. By default, you probably do not want this to be 0 as that will hug the leftmost side of the widget. It's suggested to set a negative value.
      Returns:
      date offset in number of days. Default is -4.
    • startCalendarOnFirstDayOfWeek

      boolean startCalendarOnFirstDayOfWeek()
      Moves the calendar to start on the first day of the week of the either current date or the date set in getStartupCalendarDate()

      Please note, if the getCalendarStartupDateOffset() is set to other than zero, these two methods will most likely clash.

      This setting has no effect on D-Day charts.

      Returns:
      true whether calendar should start on the first day of the week. Default is false.
      See Also:
      getCalendarStartupDateOffset(), getStartupCalendarDate()
    • enableZooming

      boolean enableZooming()
      If zooming in/out should be enabled or disabled.
      Returns:
      true if enabled. Default is true.
    • getLockImage

      org.eclipse.swt.graphics.Image getLockImage()
      Returns the image used for displaying something as locked in the GANTT chart.
      Returns:
      Image or null. Default is the lock_tiny.gif image in the package.
    • getTextDisplayFormat

      java.lang.String getTextDisplayFormat()
      Decides how the string behind the event is displayed. You may override this individually by setting the GanttEvent parameter by the same name.
      • #name# = Name of event
      • #pc# = Percentage complete
      • #sd# = Start date
      • #ed# = End date
      • #rs# = Revised start date
      • #re# = Revised end date
      • #days# = Number of days event spans over
      • #reviseddays# = Number of revised days event spans over
      Returns:
      String format. Default is "#name# (#pc#%)"
      See Also:
      GanttEvent.setTextDisplayFormat(String)
    • getRevisedLineSpacer

      int getRevisedLineSpacer()
      The distance from the event top (and event bottom) that is used to draw the line portraying revised start and end dates.
      Returns:
      Pixel spacing. Default is 3.
    • roundHourlyEventsOffToNearestHour

      boolean roundHourlyEventsOffToNearestHour()
      Whether to round off minutes on events to nearest hour.
      Returns:
      true if yes. Default is false.
    • getDefaultAdvandedTooltipHelpImage

      org.eclipse.swt.graphics.Image getDefaultAdvandedTooltipHelpImage()
      The default help image used in the advanced tooltip. Null if none.
      Returns:
      Image or null. Default is null.
    • getDefaultAdvandedTooltipImage

      org.eclipse.swt.graphics.Image getDefaultAdvandedTooltipImage()
      The default image used in the advanced tooltip. Null if none.
      Returns:
      Image or null. Default is null.
    • getDefaultAdvancedTooltipHelpText

      java.lang.String getDefaultAdvancedTooltipHelpText()
      The default help text shown in the advanced tooltip.
      Returns:
      String or null. Default is null.
    • getDefaultAdvancedTooltipTitle

      java.lang.String getDefaultAdvancedTooltipTitle()
      The default title text shown in the advanced tooltip.
      Returns:
      String or null. Default is null.
    • getDefaultAdvancedTooltipTextExtended

      java.lang.String getDefaultAdvancedTooltipTextExtended()
      The default extended tooltip shown in the advanced tooltip. Extended tooltips are used when the GanttEvent has revised dates.
      Returns:
      String or null. Default is a text showing the dates, revised dates and percentage complete.
    • getDefaultAdvancedTooltipText

      java.lang.String getDefaultAdvancedTooltipText()
      The default tooltip shown in the advanced tooltip. Normal tooltips are used when the GanttEvent has no revised dates and also for scopes, images and checkpoints.
      Returns:
      String or null. Default is a text showing the dates and percentage complete.
    • getTodayLineWidth

      int getTodayLineWidth()
      The width of the line showing where today's date is.
      Returns:
      line width. Default is 2.
    • getTodayLineStyle

      int getTodayLineStyle()
      The default line style of the line showing where today's date is.
      Returns:
      SWT.LINE_ style. Default is SWT.LINE_SOLID.
    • getTodayLineVerticalOffset

      int getTodayLineVerticalOffset()
      The vertical offset from the top for the today line calculated from the bottom part of the header.
      Returns:
      Vertical offset. Default is the height of the bottom header.
    • getVerticalTickMarkOffset

      int getVerticalTickMarkOffset()
      The vertical offset from top for the tick marks in the top header.
      Returns:
      Default is the height of the top header minus 5.
    • getDayHeaderTextDisplayFormatTop

      java.lang.String getDayHeaderTextDisplayFormatTop()
      The SimpleDateFormat of the text shown in the top header for the day view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getWeekHeaderTextDisplayFormatTop

      java.lang.String getWeekHeaderTextDisplayFormatTop()
      The SimpleDateFormat of the text shown in the top header for the week view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getMonthHeaderTextDisplayFormatTop

      java.lang.String getMonthHeaderTextDisplayFormatTop()
      The SimpleDateFormat of the text shown in the top header for the month view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getYearHeaderTextDisplayFormatTop

      java.lang.String getYearHeaderTextDisplayFormatTop()
      The SimpleDateFormat of the text shown in the top header for the year view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getDayHeaderTextDisplayFormatBottom

      java.lang.String getDayHeaderTextDisplayFormatBottom()
      The SimpleDateFormat of the text shown in the bottom header for the day view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getWeekHeaderTextDisplayFormatBottom

      java.lang.String getWeekHeaderTextDisplayFormatBottom()
      The SimpleDateFormat of the text shown in the bottom header for the week view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getMonthHeaderTextDisplayFormatBottom

      java.lang.String getMonthHeaderTextDisplayFormatBottom()
      The SimpleDateFormat of the text shown in the bottom header for the month view.
      Returns:
      SimpleDateFormat string. May not be null.
    • getYearHeaderTextDisplayFormatBottom

      java.lang.String getYearHeaderTextDisplayFormatBottom()
      The SimpleDateFormat of the text shown in the bottom header for the year view.
      Returns:
      SimpleDateFormat string. May not be null.
    • drawHeader

      boolean drawHeader()
      Whether to draw the header or not. If this returns false, all header-related settings will be ignored.
      Returns:
      true if to draw header. Default is true.
    • getEventsTopSpacer

      int getEventsTopSpacer()
      Top spacer between the top pixel and the beginning of the first event. The top pixel will be either the height of the header (if drawn) or 0 if the header is not drawn.
      Returns:
      top spacer value. Default is 12.
    • getEventsBottomSpacer

      int getEventsBottomSpacer()
      Bottom spacer between the bottom event and the section divider when using GanttSections. For non GanttSection usage, this setting is ignored.
      Returns:
      bottom spacer value. Default is 12.
    • getSectionBarDividerHeight

      int getSectionBarDividerHeight()
      The height of the bar drawn between sections.
      Returns:
      height. Default is 5.
    • getSectionBarWidth

      int getSectionBarWidth()
      Width of the section bar.
      Returns:
      width. Default is 20.
    • getMinimumSectionHeight

      int getMinimumSectionHeight()
      Minimum height of sections. Normally the minimum height is calculated by:

      1. Space the section name takes up vertically
      2. Space all contained events take up including various event spacers.

      If the two calculations above are smaller than the value returned by this method, the height returned from this method will be used.

      Returns:
      minimum section height (larger or equals to zero). Default is 80.
    • getAdvancedTooltipXOffset

      int getAdvancedTooltipXOffset()
      Advanced tooltips are shells and by default they pop up where the mouse pointer is. To not block the pointer, an offset is used.
      Returns:
      horizontal offset. Default is 15.
    • getUseAdvancedTooltips

      boolean getUseAdvancedTooltips()
      Whether to use Advanced Tooltips by default.
      Returns:
      True whether to use advanced tooltips. Default is true.
    • getDragAllModifierKey

      int getDragAllModifierKey()
      The keyboard modifier key (also known as a hint) used to determine when it's a drag-all-linked-events moveLinkedEventsWhenEventsAreMoved() event or just a normal drag.
      Returns:
      Keyboard modifier. Default is SWT.SHIFT (the shift key)
      See Also:
      moveLinkedEventsWhenEventsAreMoved()
    • getZoomWheelModifierKey

      int getZoomWheelModifierKey()
      The keyboard modifier key combined with the scroll wheel to make the chart zoom.
      Returns:
      Keyboard modifier. Default is SWT.MOD1 (usually the CTRL key)
    • getDefaultLocale

      java.util.Locale getDefaultLocale()
      Locale used for calendars and wherever needed.
      Returns:
      Locale. Default is Locale.getDefault().
    • enableLastDraw

      boolean enableLastDraw()
      See IGanttEventListener's lastDraw(GC gc) method method info.
      Returns:
      true whether to enable the last draw functionality. Default is false.
      See Also:
      IGanttEventListener.lastDraw(org.eclipse.swt.graphics.GC)
    • useSplitArrowConnections

      boolean useSplitArrowConnections()
      If you plan on using reverse dependencies, you may want to flag this to true. This makes normal connections draw the arrow to the top left corner of the target event, and if it's a reverse dependency, it draw the arrow to the bottom left of target events. That way any overlapping event don't have arrows drawing in the exact same spot which makes it much easier to view the chart.
      Returns:
      true to split arrows. Default is false.
    • getReverseDependencyLineHorizontalSpacer

      int getReverseDependencyLineHorizontalSpacer()
      If you plan on using reverse dependencies, this value will be interesting. If this value returns 0 and you have both a normal-direction dependency and a reverse one, their vertical lines will overlap. By setting this value to greater than zero that vertical line will be spaced out for reverse dependencies. The value is how much extra it will be spaced.
      Returns:
      spacer value. Default is 2.
    • drawVerticalLines

      boolean drawVerticalLines()
      The vertical lines are the lines that divide days and weeks etc.
      Returns:
      true if to draw vertical lines. Default is true.
      See Also:
      GanttComposite#setDrawVerticalLinesOverride(Boolean)
    • drawHorizontalLines

      boolean drawHorizontalLines()
      Whether to draw horizontal lines between the events. Useful for where you have a tree/table on the left and wish events to be easier to see when they are lined up with the tree items.
      Returns:
      true to show horizontal lines. Default is false;
      See Also:
      GanttComposite#setDrawHorizontalLinesOverride(Boolean)
    • getSectionSide

      int getSectionSide()
      Which side the section bar should be drawn on.

      You may use one of SWT.LEFT or SWT.RIGHT.
      Returns:
      section bar side. Default is SWT.LEFT.
    • drawLockedDateMarks

      boolean drawLockedDateMarks()
      When dates are locked down to a certain day, the chart will draw a special marker on the lock start and end dates to point out that it's locked between certain constraints.
      Returns:
      Whether to draw markers for date-range-locked events. Default is true.
    • showDateTipsOnScrolling

      boolean showDateTipsOnScrolling()
      Whether to show a date tooltip when scrolling horizontally (changing dates) and vertically. The tooltip will show just above the bottom horizontal toolbar. Note that if showDateTips() returns false, this tip will not show.
      Returns:
      true whether to show date tooltips when scrolling through dates. Default is true.
      See Also:
      showDateTips()
    • drawGanttSectionBarToBottom

      boolean drawGanttSectionBarToBottom()
      Whether the GanttSection bar should draw all the way down or not.
      Returns:
      true to draw all the way down. Default is false.
    • drawFillsToBottomWhenUsingGanttSections

      boolean drawFillsToBottomWhenUsingGanttSections()
      Whether to draw fills and vertical lines etc to the bottom when GanttSections are used.
      Returns:
      true to draw everything all the way down. Default is false.
    • lockHeaderOnVerticalScroll

      boolean lockHeaderOnVerticalScroll()
      Whether the header should always be visible regardless of vertical scroll position. Basically a "fixed header" feature.
      Returns:
      true whether to lock the header. Default is false.
    • showDefaultMenuItemsOnEventRightClick

      boolean showDefaultMenuItemsOnEventRightClick()
      Whether to show the default set of menu items on the right click menus of events. If false, the menu will be blank allowing you to set all items from scratch.
      Returns:
      true to show default menu items along with custom ones on right click. Default is true.
      See Also:
      showMenuItemsOnRightClick(), showPropertiesMenuOption(), showDeleteMenuOption(), GanttEvent.getMenu()
    • allowScopeMenu

      boolean allowScopeMenu()
      Whether scopes can show a right click menu or not. By default scopes are non-active objects that simply draw according to their children. By allowing a menu to be shown on the scope you can still perform custom events if you so wish (such as show/hide all children).
      Returns:
      true to allow menus on scopes. Default is false.
      See Also:
      GanttEvent.getMenu(), GanttEvent.showAllChildren(), GanttEvent.hideAllChildren()
    • allowHeaderSelection

      boolean allowHeaderSelection()
      Whether selecting dates in the header is allowed by clicking the date. Events will be fired on selection events. Note that not all views have this feature, only those that actually show full dates, as that's where it makes most sense.
      Returns:
      true to allow header selection. Default is true.
    • zoomToMousePointerDateOnWheelZooming

      boolean zoomToMousePointerDateOnWheelZooming()
      When you zoom in with the mouse, it can either act as a normal zoom (uses leftmost date as start date) or it can zoom in where the mouse pointer is at the time of the zoom in. For some the first make more sense than the other and vice versa. Default is that the zoom in is where the mouse pointer is (true).
    • getDDayRootCalendar

      java.util.Calendar getDDayRootCalendar()
      It's highly suggested you use the default implementation of this method. Basically, this method needs to return a zeroed-down calendar (hours, minutes etc) that will be used as the D-day root calendar. As D-days aren't dates (except internally), this Calendar simply needs to be any "stable" date. By default it uses January 1st, [current year], 0h 0m 0s 0ms. (it uses the current year as days-between calculations otherwise get very large).
      Returns:
      Calendar
    • getDDaySplitCount

      int getDDaySplitCount()
      The value where D-days have their "weeks" so to speak, this is used to calculate the numbers shown in both headers, where the top header is displaying each "set" whereas the bottom one shows numbers from 0 to the number returned by this method.
      Returns:
      Split count number. Default is 10 which shows sets from 0 to 9.
    • drawEventsDownToTheHourAndMinute

      boolean drawEventsDownToTheHourAndMinute()
      If this returns true, events are never rounded up to their nearest hour/minute when shown in the chart, but will always show down to the minute even in any mid-zoomed and fully-zoomed out view (this does not do anything to the normal minute view). Default is false.
      Returns:
      true to draw event location down to the hour and minute
    • moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEvent

      boolean moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEvent()
      If this returns true, only linked events that come after the source drag event (time/date-wise) will be moved/resized (normally all linked events are moved/resized regardless of time/date).
      Returns:
      true to only move/resize "later" events on dependent linked event moves/resizes. Default is false.
    • forceMouseWheelVerticalScroll

      @Deprecated boolean forceMouseWheelVerticalScroll()
      Deprecated.
      By default mousewheel now scrolls chart vertically on all platforms. To turn off, flag scrollChartVerticallyOnMouseWheel()
      In SWT 3.5 it seems the mousewheel is not interpreted the same as in previous versions. If you notice that when scrolling the mousewheel the chart does not actually scroll vertically, flag this to true to force it to scroll the chart. This is forced to true on *NIX machines (not Mac).
      Returns:
      true to force the mousewheel to scroll the chart. Default is false.
      See Also:
      scrollChartVerticallyOnMouseWheel()
    • getSectionTextSpacer

      int getSectionTextSpacer()
      If the name of any section is so large that it basically defines the size of the section, this value is used to space out the text slightly so that the section borders don't hug the text. If you want to save on some real-estate set this value to 0.
      Returns:
      Default is 30.
    • getPhasesHeaderHeight

      int getPhasesHeaderHeight()
      When drawing GanttPhases this is the header height used for displaying the names of these phases.
      Returns:
      Default is 18
    • allowPhaseOverlap

      boolean allowPhaseOverlap()
      When phases are resized or moved, whether an overlap resize/move should be accepted or not. If false (default), a resize will simply stop at the next phase border, whereas a move that is dropped on top of a different phase will be undone (no event is fired for this).
      Returns:
      Default is false
    • getVerticalEventDragging

      int getVerticalEventDragging()
      What style of vertical event dragging that is enabled. For the "resistance" before a vertical drag takes place you can change this with getVerticalDragResistance().
      Returns:
      One of the options in VerticalDragModes. Default is VerticalDragModes.NO_VERTICAL_DRAG
    • getVerticalDragResistance

      int getVerticalDragResistance()
      For events that can be dragged vertically, this is the "resistance" in pixels before the event "lets go" of it's horizontal location. Once it's let go it will stick to the mouse cursor.
      Returns:
      A pixel range of resistance. Default is 15px.
    • onVerticalDragDropShowInsertMarker

      boolean onVerticalDragDropShowInsertMarker()
      Whether an insert marker should be shown for where the dragged event will end up when a vertical drag/drop is in progress.
      Returns:
      true to show a marker. Default is true.
    • scaleImageToDayWidth

      boolean scaleImageToDayWidth()
      Whether to allow an image to exceed the width of one day when zooming in / out.
      Returns:
      true to keep within day width. Default is true.
    • allowArrowKeysToScrollChart

      boolean allowArrowKeysToScrollChart()
      Whether arrow keys are enabled to scroll chart left/right/up/down.
      Returns:
      true to allow arrow keys to move the chart. Default is false.
    • getNumberOfDaysToAppendForEndOfDay

      int getNumberOfDaysToAppendForEndOfDay()
      Normally a day is calculated as day_starts->day_ends, which means that to make an event that starts and ends on the same day count as "anything", +1 is added by default to make the event actually show up on the chart. Should you for some reason need to override this, change this number to 0 or whatever you may need.
      Returns:
      Number of days to count for a start and end date that is the same date. Default is 1.
    • scrollChartVerticallyOnMouseWheel

      boolean scrollChartVerticallyOnMouseWheel()
      Whether the chart should scroll vertically when the mouse wheel is used. If you notice excessive scrolling on SWT versions earlier than 3.5, you may want to turn this off
      Returns:
      true to scroll chart vertically. Default is true.
    • getMinZoomLevel

      int getMinZoomLevel()
      Returns the minimum zoom level. Default should return MIN_ZOOM_LEVEL
      Returns:
    • getPeriodStart

      java.util.Calendar getPeriodStart()
      Specify a period start. Returning another value than null will result in rendering an additional line to the chart indicating a period start in the gantt itself.
      Returns:
    • getPeriodEnd

      java.util.Calendar getPeriodEnd()
      Specify a period end. Returning another value than null will result in rendering an additional line to the chart indicating a period end in the gantt itself.
      Returns:
    • shiftHorizontalCenteredEventString

      boolean shiftHorizontalCenteredEventString()
      If you want to show the event String within the event rectangle by setting the horizontalTextLocation of the GanttEvent to SWT.CENTER, there are cases that break the visualization. If your event String is longer than the event in the Gantt, it will look quite strange.

      If this method returns true, the AbstractPaintManager will shift the rendering of the event String to the right if the String length is greater than the event rectangle.

      Returns:
      true if the event String should be shifted, false if not
    • enableAddEvent

      boolean enableAddEvent()
      Returns:
      true to enable the menu action for adding an event to the GanttChart, false if this action should not be available to the user.
    • drawEventString

      boolean drawEventString()
      Global configuration to specify if the text of GanttEvents should be rendered or not. It is also possible to configure this per GanttEvent via _showText property.
      Returns:
      true if the event text should be rendered, false if not.
    • alwaysDragAllEvents

      boolean alwaysDragAllEvents()
      The default behaviour in GanttChart on moving an event is that only the current dragged event is moved unless you press the SHIFT key. If there are more events selected, still only the dragged one is moved if the SHIFT key is not pressed. With this configuration it is possible to specify if the old default behavior should be used or if all currently selected events should be moved even if the SHIFT key is not pressed.
      Returns:
      true if all selected events should be moved by dragging on of them false if only the current dragged event should be moved.
    • printSelectedVerticallyComplete

      boolean printSelectedVerticallyComplete()
      On printing a GanttChart it is possible to select to print only the selected area. For GanttChart this means to print the currently visible area. By default currently visible means vertically AND horizontally visible. This configuration allows to specify whether the vertical part should extend to the whole chart and only the horizontal area should be limited for the visible part.
      Returns:
      true if the printed chart should contain the whole chart vertically but only the horizontal visible part of the chart, false if only the visible part of the chart should be printed, horizontally AND vertically
    • printFooter

      boolean printFooter()
      Configure whether a footer should be added to the print pages or not. The footer contains the page number and the date when the print was requested.
      Returns:
      true if a footer should be added to the print pages, false if not
    • drawSectionBar

      boolean drawSectionBar()
      Configure whether the section bar should be rendered. It only makes sense to not render the section bar if the section details are enabled.
      Returns:
      true if the section bar should be rendered, false if not
    • drawSectionDetails

      boolean drawSectionDetails()
      Configure whether there should be an additional area to the section bar that shows additional section detail information.
      Returns:
      true if additional section detail information should be rendered, false if not
    • getSectionDetailWidth

      int getSectionDetailWidth()
      Returns:
      The width of the section detail area.
    • getSectionDetailTitle

      java.lang.String getSectionDetailTitle()
      The section detail area title that should be rendered in the section detail area.
      Returns:
      String or null. Default is a bold black text showing the section name.
    • getSectionDetailText

      java.lang.String getSectionDetailText()
      The detail information that should be rendered in the section detail area.
      Returns:
      String or null. Default is to show the number of events in that section.
    • getSectionDetailContentReplacer

      ISectionDetailContentReplacer getSectionDetailContentReplacer()
      Returns the custom section detail generator which generates the section detail out of custom data for a GanttSection.
      Returns:
    • showSectionDetailMore

      boolean showSectionDetailMore()
      Returns:
      true if there should be a "more [+]" shown in the section detail area which allows to register a listener against to show more informations by e.g. opening a dialog.
    • showHolidayToolTips

      boolean showHolidayToolTips()
      Configure whether a tooltip pops up when hovering the mouse over a holiday
      Returns:
      true to show a "holiday" popup with the configured name of the holiday, false if not (default)
    • fireEmptyEventSelection

      boolean fireEmptyEventSelection()
      Returns:
      true to have the event fired. Default is false