Class GanttTester.TestSettings
java.lang.Object
org.eclipse.nebula.widgets.ganttchart.AbstractSettings
org.eclipse.nebula.widgets.ganttchart.GanttTester.TestSettings
- All Implemented Interfaces:
ISettings,ISettings2
- Enclosing class:
- GanttTester
class GanttTester.TestSettings extends AbstractSettings
-
Field Summary
Fields inherited from interface org.eclipse.nebula.widgets.ganttchart.ISettings
CONNECTION_ARROW_RIGHT_TO_LEFT, CONNECTION_ARROW_RIGHT_TO_TOP, CONNECTION_BIRDS_FLIGHT_PATH, CONNECTION_MS_PROJECT_STYLE, DEFAULT_CONNECTION_ARROW, MAX_ZOOM_LEVEL, MIN_ZOOM_LEVEL, VIEW_D_DAY, VIEW_DAY, VIEW_MINUTE, VIEW_MONTH, VIEW_WEEK, VIEW_YEAR, ZOOM_DAY_MAX, ZOOM_DAY_MEDIUM, ZOOM_DAY_NORMAL, ZOOM_HOURS_MAX, ZOOM_HOURS_MEDIUM, ZOOM_HOURS_NORMAL, ZOOM_MINUTES_MAX, ZOOM_MINUTES_MEDIUM, ZOOM_MINUTES_NORMAL, ZOOM_MONTH_MAX, ZOOM_MONTH_MEDIUM, ZOOM_MONTH_NORMAL, ZOOM_SECONDS_MAX, ZOOM_SECONDS_MEDIUM, ZOOM_SECONDS_NORMAL, ZOOM_YEAR_MAX, ZOOM_YEAR_MEDIUM, ZOOM_YEAR_NORMAL, ZOOM_YEAR_SMALL, ZOOM_YEAR_VERY_SMALL -
Constructor Summary
Constructors Constructor Description TestSettings() -
Method Summary
Modifier and Type Method Description booleanadjustForLetters()Letters have different width.booleanallowArrowKeysToScrollChart()Whether arrow keys are enabled to scroll chart left/right/up/down.booleanallowBlankAreaDragAndDropToMoveDates()If true, it lets the move forwards or backwards in time by clicking in a "blank" area and dragging the mouse.booleanallowBlankAreaVerticalDragAndDropToMoveChart()Relies onISettings.allowBlankAreaDragAndDropToMoveDates()being true.booleanallowCheckpointResizing()Whether checkpoints can be resized (assuming resizing is onISettings.enableResizing()).booleandrawFullPercentageBar()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.booleandrawHeader()Whether to draw the header or not.booleandrawHorizontalLines()Whether to draw horizontal lines between the events.booleandrawLockedDateMarks()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.booleandrawSelectionMarkerAroundSelectedEvent()If true, draws a dotted selection marker around the currently selected event to visualize the selection.booleanenableAutoScroll()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.booleanenableDragAndDrop()Whether event drag-and-drop is turned on or off.booleanenableResizing()Whether event-resizing is turned on or off.booleanenableZooming()If zooming in/out should be enabled or disabled.booleanflipBlankAreaDragDirection()If for some reason the drag left vs. drag right directions feel reversed, simply flip this to switch them around.intgetArrowConnectionType()What type of arrow connection to draw.java.util.LocalegetDefaultLocale()Locale used for calendars and wherever needed.intgetInitialView()What view is used when the chart is initially drawn.intgetSectionSide()Which side the section bar should be drawn on.booleangetUseAdvancedTooltips()Whether to use Advanced Tooltips by default.intgetVerticalEventDragging()What style of vertical event dragging that is enabled.booleanlockHeaderOnVerticalScroll()Whether the header should always be visible regardless of vertical scroll position.booleanmoveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEvent()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).booleanmoveLinkedEventsWhenEventsAreMoved()Whether users can hold downSHIFT(or whatever the settings say) to move an event, and all dependent events will move with the selected event.booleanscaleImageToDayWidth()Whether to allow an image to exceed the width of one day when zooming in / out.booleanshowArrows()If to draw arrows on connecting lines or not.booleanshowBoldScopeText()Whether the name of the scope is drawn in bold or plain.booleanshowDateTipsOnScrolling()Whether to show a date tooltip when scrolling horizontally (changing dates) and vertically.booleanshowGradientEventBars()Whether to draw the color on the events using gradients.booleanshowHolidayToolTips()Configure whether a tooltip pops up when hovering the mouse over a holidaybooleanshowOnlyDependenciesForSelectedItems()Whether to only show the dependency connections only when an event is selected, as opposed to always showing the lines.booleanshowToolTips()Whether to show tooltips when mouse is lingering over events.booleanshowZoomLevelBox()Whether when a user zooms in or out (only viaCTRL(or whatever the settings say) +Scroll Wheel) to display a box in the bottom left corner that shows the zoom level.booleanstartCalendarOnFirstDayOfWeek()Moves the calendar to start on the first day of the week of the either current date or the date set inISettings.getStartupCalendarDate()booleanzoomToMousePointerDateOnWheelZooming()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.Methods inherited from class org.eclipse.nebula.widgets.ganttchart.AbstractSettings
allowHeaderSelection, allowInfiniteHorizontalScrollBar, allowPhaseOverlap, allowScopeMenu, alwaysDragAllEvents, drawEventsDownToTheHourAndMinute, drawEventString, drawFillsToBottomWhenUsingGanttSections, drawGanttSectionBarToBottom, drawSectionBar, drawSectionDetails, drawVerticalLines, enableAddEvent, enableLastDraw, enableTodayLineUpdater, fireEmptyEventSelection, forceMouseWheelVerticalScroll, getAdvancedTooltipXOffset, getArrowHeadEventSpacer, getArrowHeadVerticalAdjuster, getCalendarStartupDateOffset, getDateFormat, getDayHeaderTextDisplayFormatBottom, getDayHeaderTextDisplayFormatTop, getDayHorizontalSpacing, getDayVerticalSpacing, getDayWidth, getDDayRootCalendar, getDDaySplitCount, getDefaultAdvancedTooltipHelpText, getDefaultAdvancedTooltipText, getDefaultAdvancedTooltipTextExtended, getDefaultAdvancedTooltipTitle, getDefaultAdvandedTooltipHelpImage, getDefaultAdvandedTooltipImage, getDefaultEventColor, getDefaultGradientEventColor, getDragAllModifierKey, getEventHeight, getEventPercentageBarHeight, getEventsBottomSpacer, getEventSpacer, getEventsTopSpacer, getHeaderDayHeight, getHeaderMonthHeight, getHourDateFormat, getInitialZoomLevel, getLockImage, getMinimumSectionHeight, getMinuteDateFormat, getMinuteHeaderTextDisplayFormatBottom, getMinuteHeaderTextDisplayFormatTop, getMinZoomLevel, getMonthDayWidth, getMonthHeaderTextDisplayFormatBottom, getMonthHeaderTextDisplayFormatTop, getMoveAreaNegativeSensitivity, getNumberOfDaysToAppendForEndOfDay, getPercentageBarAlpha, getPeriodEnd, getPeriodStart, getPhasesHeaderHeight, getRemainderPercentageBarAlpha, getResizeBorderSensitivity, getReverseDependencyLineHorizontalSpacer, getRevisedLineSpacer, getSectionBarDividerHeight, getSectionBarWidth, getSectionDetailContentReplacer, getSectionDetailText, getSectionDetailTitle, getSectionDetailWidth, getSectionTextSpacer, getStartupCalendarDate, getTextDisplayFormat, getTextSpacerConnected, getTextSpacerNonConnected, getTodayLineStyle, getTodayLineVerticalOffset, getTodayLineWidth, getToolTipContentReplacer, getVerticalDragResistance, getVerticalTickMarkOffset, getWeekHeaderTextDisplayFormatBottom, getWeekHeaderTextDisplayFormatTop, getYearHeaderTextDisplayFormatBottom, getYearHeaderTextDisplayFormatTop, getYearMonthDayWidth, getZoomWheelModifierKey, onVerticalDragDropShowInsertMarker, printFooter, printSelectedVerticallyComplete, roundHourlyEventsOffToNearestHour, scrollChartVerticallyOnMouseWheel, shiftHorizontalCenteredEventString, showBarsIn3D, showDateTips, showDefaultMenuItemsOnEventRightClick, showDeleteMenuOption, showMenuItemsOnRightClick, showNumberOfDaysOnBars, showPlannedDates, showPropertiesMenuOption, showResizeDateTipOnBorders, showSectionDetailMore, useSplitArrowConnections
-
Constructor Details
-
TestSettings
TestSettings()
-
-
Method Details
-
lockHeaderOnVerticalScroll
public boolean lockHeaderOnVerticalScroll()Description copied from interface:ISettingsWhether the header should always be visible regardless of vertical scroll position. Basically a "fixed header" feature.- Specified by:
lockHeaderOnVerticalScrollin interfaceISettings- Overrides:
lockHeaderOnVerticalScrollin classAbstractSettings- Returns:
- true whether to lock the header. Default is false.
-
drawHeader
public boolean drawHeader()Description copied from interface:ISettingsWhether to draw the header or not. If this returns false, all header-related settings will be ignored.- Specified by:
drawHeaderin interfaceISettings- Overrides:
drawHeaderin classAbstractSettings- Returns:
- true if to draw header. Default is true.
-
getSectionSide
public int getSectionSide()Description copied from interface:ISettingsWhich side the section bar should be drawn on.
You may use one ofSWT.LEFTorSWT.RIGHT.- Specified by:
getSectionSidein interfaceISettings- Overrides:
getSectionSidein classAbstractSettings- Returns:
- section bar side. Default is
SWT.LEFT.
-
drawHorizontalLines
public boolean drawHorizontalLines()Description copied from interface:ISettingsWhether 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.- Specified by:
drawHorizontalLinesin interfaceISettings- Overrides:
drawHorizontalLinesin classAbstractSettings- Returns:
- true to show horizontal lines. Default is false;
- See Also:
GanttComposite#setDrawHorizontalLinesOverride(Boolean)
-
getVerticalEventDragging
public int getVerticalEventDragging()Description copied from interface:ISettingsWhat style of vertical event dragging that is enabled. For the "resistance" before a vertical drag takes place you can change this withISettings.getVerticalDragResistance().- Specified by:
getVerticalEventDraggingin interfaceISettings- Overrides:
getVerticalEventDraggingin classAbstractSettings- Returns:
- One of the options in
VerticalDragModes. Default isVerticalDragModes.NO_VERTICAL_DRAG
-
getInitialView
public int getInitialView()Description copied from interface:ISettingsWhat view is used when the chart is initially drawn. Options are:- Specified by:
getInitialViewin interfaceISettings- Overrides:
getInitialViewin classAbstractSettings- Returns:
- Initial view. Default is VIEW_WEEK.
-
moveLinkedEventsWhenEventsAreMoved
public boolean moveLinkedEventsWhenEventsAreMoved()Description copied from interface:ISettingsWhether users can hold downSHIFT(or whatever the settings say) to move an event, and all dependent events will move with the selected event.- Specified by:
moveLinkedEventsWhenEventsAreMovedin interfaceISettings- Overrides:
moveLinkedEventsWhenEventsAreMovedin classAbstractSettings- Returns:
- true if to move all linked events. Default is true.
- See Also:
ISettings.getDragAllModifierKey()
-
moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEvent
public boolean moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEvent()Description copied from interface:ISettingsIf 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).- Specified by:
moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEventin interfaceISettings- Overrides:
moveAndResizeOnlyDependentEventsThatAreLaterThanLinkedMoveEventin classAbstractSettings- Returns:
- true to only move/resize "later" events on dependent linked event moves/resizes. Default is false.
-
getDefaultLocale
public java.util.Locale getDefaultLocale()Description copied from interface:ISettingsLocale used for calendars and wherever needed.- Specified by:
getDefaultLocalein interfaceISettings- Overrides:
getDefaultLocalein classAbstractSettings- Returns:
- Locale. Default is Locale.getDefault().
-
enableAutoScroll
public boolean enableAutoScroll()Description copied from interface:ISettingsWhether 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.- Specified by:
enableAutoScrollin interfaceISettings- Overrides:
enableAutoScrollin classAbstractSettings- Returns:
- true if to enable. Default is true.
-
enableResizing
public boolean enableResizing()Description copied from interface:ISettingsWhether event-resizing is turned on or off.- Specified by:
enableResizingin interfaceISettings- Overrides:
enableResizingin classAbstractSettings- Returns:
- true if turned on. If turned off, event resizing is not possible. Default is true.
-
enableDragAndDrop
public boolean enableDragAndDrop()Description copied from interface:ISettingsWhether event drag-and-drop is turned on or off.- Specified by:
enableDragAndDropin interfaceISettings- Overrides:
enableDragAndDropin classAbstractSettings- Returns:
- true if turned on. If turned off, drag and drop is not possible. Default is true.
-
adjustForLetters
public boolean adjustForLetters()Description copied from interface:ISettingsLetters 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.- Specified by:
adjustForLettersin interfaceISettings- Overrides:
adjustForLettersin classAbstractSettings- Returns:
- true if to adjust for letter widths. Default is true.
-
getArrowConnectionType
public int getArrowConnectionType()Description copied from interface:ISettingsWhat type of arrow connection to draw. There are three types:ISettings.CONNECTION_ARROW_RIGHT_TO_TOP- Arrow line (and arrow head if turned on) will be drawn into the events top and bottom corners.ISettings.CONNECTION_ARROW_RIGHT_TO_LEFT- Arrow line (and arrow head if turned on) will be drawn into the events middle left or right side.ISettings.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.ISettings.CONNECTION_BIRDS_FLIGHT_PATH- Straight "as the bird flies" line between events without any bends.
- Specified by:
getArrowConnectionTypein interfaceISettings- Overrides:
getArrowConnectionTypein classAbstractSettings- Returns:
- Arrow head type. Default is
CONNECTION_MS_PROJECT_STYLE. - See Also:
ISettings.CONNECTION_MS_PROJECT_STYLE
-
showArrows
public boolean showArrows()Description copied from interface:ISettingsIf to draw arrows on connecting lines or not.- Specified by:
showArrowsin interfaceISettings- Overrides:
showArrowsin classAbstractSettings- Returns:
- true if to show arrowheads on connecting lines. Default is true.
-
showBoldScopeText
public boolean showBoldScopeText()Description copied from interface:ISettingsWhether the name of the scope is drawn in bold or plain.- Specified by:
showBoldScopeTextin interfaceISettings- Overrides:
showBoldScopeTextin classAbstractSettings- Returns:
- true if bold. Default is true.
-
showToolTips
public boolean showToolTips()Description copied from interface:ISettingsWhether to show tooltips when mouse is lingering over events.- Specified by:
showToolTipsin interfaceISettings- Overrides:
showToolTipsin classAbstractSettings- Returns:
- true if to show tooltips. Default is true.
-
showGradientEventBars
public boolean showGradientEventBars()Description copied from interface:ISettingsWhether 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)andGanttEvent.setStatusColor(Color).- Specified by:
showGradientEventBarsin interfaceISettings- Overrides:
showGradientEventBarsin classAbstractSettings- Returns:
- true if to draw with gradients. Default is true.
- See Also:
GanttEvent.setGradientStatusColor(Color),GanttEvent.setStatusColor(Color)
-
showOnlyDependenciesForSelectedItems
public boolean showOnlyDependenciesForSelectedItems()Description copied from interface:ISettingsWhether to only show the dependency connections only when an event is selected, as opposed to always showing the lines.- Specified by:
showOnlyDependenciesForSelectedItemsin interfaceISettings- Overrides:
showOnlyDependenciesForSelectedItemsin classAbstractSettings- Returns:
- true if to show them only on selections. Default is false.
-
showZoomLevelBox
public boolean showZoomLevelBox()Description copied from interface:ISettingsWhether when a user zooms in or out (only viaCTRL(or whatever the settings say) +Scroll Wheel) to display a box in the bottom left corner that shows the zoom level.- Specified by:
showZoomLevelBoxin interfaceISettings- Overrides:
showZoomLevelBoxin classAbstractSettings- Returns:
- true if to show a box when zooming. Default is true.
- See Also:
ISettings.getZoomWheelModifierKey()
-
allowBlankAreaDragAndDropToMoveDates
public boolean allowBlankAreaDragAndDropToMoveDates()Description copied from interface:ISettingsIf 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.- Specified by:
allowBlankAreaDragAndDropToMoveDatesin interfaceISettings- Overrides:
allowBlankAreaDragAndDropToMoveDatesin classAbstractSettings- Returns:
- true if to allow clear-area drag. Default is true.
-
flipBlankAreaDragDirection
public boolean flipBlankAreaDragDirection()Description copied from interface:ISettingsIf for some reason the drag left vs. drag right directions feel reversed, simply flip this to switch them around. Only active ifISettings.allowBlankAreaDragAndDropToMoveDates()is active.- Specified by:
flipBlankAreaDragDirectionin interfaceISettings- Overrides:
flipBlankAreaDragDirectionin classAbstractSettings- Returns:
- true if to flip them around. Default is false.
- See Also:
ISettings.allowBlankAreaDragAndDropToMoveDates()
-
drawSelectionMarkerAroundSelectedEvent
public boolean drawSelectionMarkerAroundSelectedEvent()Description copied from interface:ISettingsIf true, draws a dotted selection marker around the currently selected event to visualize the selection.- Specified by:
drawSelectionMarkerAroundSelectedEventin interfaceISettings- Overrides:
drawSelectionMarkerAroundSelectedEventin classAbstractSettings- Returns:
- true if to show a selection marker. Default is true.
-
allowCheckpointResizing
public boolean allowCheckpointResizing()Description copied from interface:ISettingsWhether checkpoints can be resized (assuming resizing is onISettings.enableResizing()).- Specified by:
allowCheckpointResizingin interfaceISettings- Overrides:
allowCheckpointResizingin classAbstractSettings- Returns:
- true if checkpoints can be resized. Default is false.
- See Also:
ISettings.enableResizing()
-
startCalendarOnFirstDayOfWeek
public boolean startCalendarOnFirstDayOfWeek()Description copied from interface:ISettingsMoves the calendar to start on the first day of the week of the either current date or the date set inISettings.getStartupCalendarDate()Please note, if theISettings.getCalendarStartupDateOffset()is set to other than zero, these two methods will most likely clash. This setting has no effect on D-Day charts.- Specified by:
startCalendarOnFirstDayOfWeekin interfaceISettings- Overrides:
startCalendarOnFirstDayOfWeekin classAbstractSettings- Returns:
- true whether calendar should start on the first day of the week. Default is false.
- See Also:
ISettings.getCalendarStartupDateOffset(),ISettings.getStartupCalendarDate()
-
enableZooming
public boolean enableZooming()Description copied from interface:ISettingsIf zooming in/out should be enabled or disabled.- Specified by:
enableZoomingin interfaceISettings- Overrides:
enableZoomingin classAbstractSettings- Returns:
- true if enabled. Default is true.
-
drawFullPercentageBar
public boolean drawFullPercentageBar()Description copied from interface:ISettingsThe 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.- Specified by:
drawFullPercentageBarin interfaceISettings- Overrides:
drawFullPercentageBarin classAbstractSettings- Returns:
- true if to draw the entire bar. Default is true.
-
getUseAdvancedTooltips
public boolean getUseAdvancedTooltips()Description copied from interface:ISettingsWhether to use Advanced Tooltips by default.- Specified by:
getUseAdvancedTooltipsin interfaceISettings- Overrides:
getUseAdvancedTooltipsin classAbstractSettings- Returns:
- True whether to use advanced tooltips. Default is true.
-
drawLockedDateMarks
public boolean drawLockedDateMarks()Description copied from interface:ISettingsWhen 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.- Specified by:
drawLockedDateMarksin interfaceISettings- Overrides:
drawLockedDateMarksin classAbstractSettings- Returns:
- Whether to draw markers for date-range-locked events. Default is true.
-
showDateTipsOnScrolling
public boolean showDateTipsOnScrolling()Description copied from interface:ISettingsWhether 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.- Specified by:
showDateTipsOnScrollingin interfaceISettings- Overrides:
showDateTipsOnScrollingin classAbstractSettings- Returns:
- true whether to show date tooltips when scrolling through dates. Default is true.
- See Also:
ISettings.showDateTips()
-
zoomToMousePointerDateOnWheelZooming
public boolean zoomToMousePointerDateOnWheelZooming()Description copied from interface:ISettingsWhen 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).- Specified by:
zoomToMousePointerDateOnWheelZoomingin interfaceISettings- Overrides:
zoomToMousePointerDateOnWheelZoomingin classAbstractSettings
-
allowBlankAreaVerticalDragAndDropToMoveChart
public boolean allowBlankAreaVerticalDragAndDropToMoveChart()Description copied from interface:ISettingsRelies onISettings.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- Specified by:
allowBlankAreaVerticalDragAndDropToMoveChartin interfaceISettings- Overrides:
allowBlankAreaVerticalDragAndDropToMoveChartin classAbstractSettings- Returns:
- true to allow clear-area vertical drag. Default is false (as it can be confusing at first try).
-
scaleImageToDayWidth
public boolean scaleImageToDayWidth()Description copied from interface:ISettingsWhether to allow an image to exceed the width of one day when zooming in / out.- Specified by:
scaleImageToDayWidthin interfaceISettings- Overrides:
scaleImageToDayWidthin classAbstractSettings- Returns:
- true to keep within day width. Default is true.
-
allowArrowKeysToScrollChart
public boolean allowArrowKeysToScrollChart()Description copied from interface:ISettingsWhether arrow keys are enabled to scroll chart left/right/up/down.- Specified by:
allowArrowKeysToScrollChartin interfaceISettings- Overrides:
allowArrowKeysToScrollChartin classAbstractSettings- Returns:
- true to allow arrow keys to move the chart. Default is false.
-
showHolidayToolTips
public boolean showHolidayToolTips()Description copied from interface:ISettingsConfigure whether a tooltip pops up when hovering the mouse over a holiday- Specified by:
showHolidayToolTipsin interfaceISettings- Overrides:
showHolidayToolTipsin classAbstractSettings- Returns:
trueto show a "holiday" popup with the configured name of the holiday,falseif not (default)
-