Class GanttPhase
- java.lang.Object
-
- org.eclipse.nebula.widgets.ganttchart.GanttPhase
-
public final class GanttPhase extends java.lang.ObjectThis class represents one GanttPhase in the chart. A phase is basically a background color and a title that spans over two dates. It's merely a visual aid to help users locate certain "important date ranges" in the chart. Compared to a recurring date range a Phase can be moved / resized by the user and also has a title.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean_allowZeroWidthprivate int_alphaprivate org.eclipse.swt.graphics.Color_bodyBottomColorprivate org.eclipse.swt.graphics.Color_bodyTopColorprivate org.eclipse.swt.graphics.Color_borderColorprivate int_borderWidthprivate org.eclipse.swt.graphics.Rectangle_boundsprivate java.lang.Object_dataprivate int_daysBtwStartEndprivate int_dDayEndprivate int_dDayStartprivate java.util.Calendar_dragEndCalprivate long_dragEndLongprivate java.util.Calendar_dragStartCalprivate long_dragStartLongprivate boolean_drawBordersprivate long_endprivate java.util.Calendar_endDateprivate org.eclipse.swt.graphics.Color_headerBgColorprivate org.eclipse.swt.graphics.Rectangle_headerBoundsprivate org.eclipse.swt.graphics.Color_headerFgColorprivate org.eclipse.swt.graphics.Font_headerFontprivate org.eclipse.swt.graphics.Color_headerTextColorprivate boolean_hiddenprivate boolean_lockedprivate boolean_moveableprivate GanttChart_parentChartprivate GanttComposite_parentCompositeprivate boolean_resizableprivate long_startprivate java.util.Calendar_startDateprivate java.lang.String_title
-
Constructor Summary
Constructors Constructor Description GanttPhase()GanttPhase(GanttChart parent, java.lang.String title)GanttPhase(GanttChart parent, java.util.Calendar start, java.util.Calendar end, java.lang.String title)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAlpha()org.eclipse.swt.graphics.ColorgetBodyBottomColor()org.eclipse.swt.graphics.ColorgetBodyTopColor()org.eclipse.swt.graphics.ColorgetBorderColor()intgetBorderWidth()(package private) org.eclipse.swt.graphics.RectanglegetBounds()java.lang.ObjectgetData()(package private) intgetDaysBetweenStartAndEnd()intgetDDayEnd()intgetDDayRevisedEnd()intgetDDayRevisedStart()intgetDDayStart()Returns the D-day start value.(package private) longgetEnd()java.util.CalendargetEndDate()org.eclipse.swt.graphics.ColorgetHeaderBackgroundColor()(package private) org.eclipse.swt.graphics.RectanglegetHeaderBounds()org.eclipse.swt.graphics.FontgetHeaderFont()org.eclipse.swt.graphics.ColorgetHeaderForegroundColor()org.eclipse.swt.graphics.ColorgetHeaderTextColor()(package private) longgetStart()java.util.CalendargetStartDate()java.lang.StringgetTitle()(package private) booleanisAllowZeroWidth()(package private) booleanisDisplayable()booleanisDrawBorders()booleanisHidden()booleanisLocked()booleanisMoveable()booleanisResizable()(package private) voidmarkDragStart()(package private) voidmove(int calType, int val)(package private) voidmoveEnd(int calType, int val)(package private) voidmoveStart(int calType, int val)(package private) booleanoverlaps(GanttPhase other)(package private) voidsetAllowZeroWidth(boolean allowZeroWidth)voidsetAlpha(int alpha)voidsetBodyBottomColor(org.eclipse.swt.graphics.Color bodyBottomColor)voidsetBodyTopColor(org.eclipse.swt.graphics.Color bodyTopColor)voidsetBorderColor(org.eclipse.swt.graphics.Color borderColor)voidsetBorderWidth(int borderWidth)(package private) voidsetBounds(org.eclipse.swt.graphics.Rectangle bounds)voidsetData(java.lang.Object data)voidsetDDayEnd(int day)voidsetDDayStart(int day)Sets the D-day start value.voidsetDrawBorders(boolean drawBorders)voidsetEnd(long end)voidsetEndDate(java.util.Calendar endDate)voidsetHeaderBackgroundColor(org.eclipse.swt.graphics.Color color)(package private) voidsetHeaderBounds(org.eclipse.swt.graphics.Rectangle headerBounds)voidsetHeaderFont(org.eclipse.swt.graphics.Font headerFont)voidsetHeaderForegroundColor(org.eclipse.swt.graphics.Color color)voidsetHeaderTextColor(org.eclipse.swt.graphics.Color headerTextColor)voidsetHidden(boolean hidden)voidsetLocked(boolean locked)voidsetMoveable(boolean moveable)voidsetResizable(boolean resizable)voidsetStart(long start)voidsetStartDate(java.util.Calendar startDate)voidsetTitle(java.lang.String title)(package private) voidundoLastDragDrop()private voidupdateDaysBetweenStartAndEnd()(package private) booleanwillOverlapResize(GanttPhase other, int calType, int val, boolean start)
-
-
-
Field Detail
-
_startDate
private java.util.Calendar _startDate
-
_endDate
private java.util.Calendar _endDate
-
_title
private java.lang.String _title
-
_locked
private boolean _locked
-
_headerBgColor
private org.eclipse.swt.graphics.Color _headerBgColor
-
_headerFgColor
private org.eclipse.swt.graphics.Color _headerFgColor
-
_headerTextColor
private org.eclipse.swt.graphics.Color _headerTextColor
-
_bodyTopColor
private org.eclipse.swt.graphics.Color _bodyTopColor
-
_bodyBottomColor
private org.eclipse.swt.graphics.Color _bodyBottomColor
-
_alpha
private int _alpha
-
_data
private java.lang.Object _data
-
_hidden
private boolean _hidden
-
_resizable
private boolean _resizable
-
_moveable
private boolean _moveable
-
_drawBorders
private boolean _drawBorders
-
_borderWidth
private int _borderWidth
-
_borderColor
private org.eclipse.swt.graphics.Color _borderColor
-
_start
private long _start
-
_end
private long _end
-
_headerFont
private org.eclipse.swt.graphics.Font _headerFont
-
_allowZeroWidth
private boolean _allowZeroWidth
-
_headerBounds
private org.eclipse.swt.graphics.Rectangle _headerBounds
-
_bounds
private org.eclipse.swt.graphics.Rectangle _bounds
-
_dDayStart
private int _dDayStart
-
_dDayEnd
private int _dDayEnd
-
_parentChart
private GanttChart _parentChart
-
_parentComposite
private GanttComposite _parentComposite
-
_daysBtwStartEnd
private int _daysBtwStartEnd
-
_dragStartCal
private java.util.Calendar _dragStartCal
-
_dragEndCal
private java.util.Calendar _dragEndCal
-
_dragStartLong
private long _dragStartLong
-
_dragEndLong
private long _dragEndLong
-
-
Constructor Detail
-
GanttPhase
GanttPhase()
-
GanttPhase
public GanttPhase(GanttChart parent, java.lang.String title)
-
GanttPhase
public GanttPhase(GanttChart parent, java.util.Calendar start, java.util.Calendar end, java.lang.String title)
-
-
Method Detail
-
getStartDate
public java.util.Calendar getStartDate()
-
setStartDate
public void setStartDate(java.util.Calendar startDate)
-
getEndDate
public java.util.Calendar getEndDate()
-
setEndDate
public void setEndDate(java.util.Calendar endDate)
-
getTitle
public java.lang.String getTitle()
-
setTitle
public void setTitle(java.lang.String title)
-
isLocked
public boolean isLocked()
-
setLocked
public void setLocked(boolean locked)
-
getHeaderBackgroundColor
public org.eclipse.swt.graphics.Color getHeaderBackgroundColor()
-
setHeaderBackgroundColor
public void setHeaderBackgroundColor(org.eclipse.swt.graphics.Color color)
-
getHeaderForegroundColor
public org.eclipse.swt.graphics.Color getHeaderForegroundColor()
-
setHeaderForegroundColor
public void setHeaderForegroundColor(org.eclipse.swt.graphics.Color color)
-
getBodyTopColor
public org.eclipse.swt.graphics.Color getBodyTopColor()
-
setBodyTopColor
public void setBodyTopColor(org.eclipse.swt.graphics.Color bodyTopColor)
-
getBodyBottomColor
public org.eclipse.swt.graphics.Color getBodyBottomColor()
-
setBodyBottomColor
public void setBodyBottomColor(org.eclipse.swt.graphics.Color bodyBottomColor)
-
getAlpha
public int getAlpha()
-
setAlpha
public void setAlpha(int alpha)
-
getData
public java.lang.Object getData()
-
setData
public void setData(java.lang.Object data)
-
isHidden
public boolean isHidden()
-
setHidden
public void setHidden(boolean hidden)
-
isResizable
public boolean isResizable()
-
setResizable
public void setResizable(boolean resizable)
-
isMoveable
public boolean isMoveable()
-
setMoveable
public void setMoveable(boolean moveable)
-
getHeaderFont
public org.eclipse.swt.graphics.Font getHeaderFont()
-
setHeaderFont
public void setHeaderFont(org.eclipse.swt.graphics.Font headerFont)
-
isDrawBorders
public boolean isDrawBorders()
-
setDrawBorders
public void setDrawBorders(boolean drawBorders)
-
getBorderWidth
public int getBorderWidth()
-
setBorderWidth
public void setBorderWidth(int borderWidth)
-
getBorderColor
public org.eclipse.swt.graphics.Color getBorderColor()
-
setBorderColor
public void setBorderColor(org.eclipse.swt.graphics.Color borderColor)
-
setStart
public void setStart(long start)
-
setEnd
public void setEnd(long end)
-
getHeaderTextColor
public org.eclipse.swt.graphics.Color getHeaderTextColor()
-
setHeaderTextColor
public void setHeaderTextColor(org.eclipse.swt.graphics.Color headerTextColor)
-
getDDayStart
public int getDDayStart()
Returns the D-day start value.- Returns:
-
getDDayRevisedStart
public int getDDayRevisedStart()
-
getDDayRevisedEnd
public int getDDayRevisedEnd()
-
setDDayStart
public void setDDayStart(int day)
Sets the D-day start value.- Parameters:
day-
-
getDDayEnd
public int getDDayEnd()
-
setDDayEnd
public void setDDayEnd(int day)
-
updateDaysBetweenStartAndEnd
private void updateDaysBetweenStartAndEnd()
-
isAllowZeroWidth
boolean isAllowZeroWidth()
-
setAllowZeroWidth
void setAllowZeroWidth(boolean allowZeroWidth)
-
getHeaderBounds
org.eclipse.swt.graphics.Rectangle getHeaderBounds()
-
setHeaderBounds
void setHeaderBounds(org.eclipse.swt.graphics.Rectangle headerBounds)
-
getBounds
org.eclipse.swt.graphics.Rectangle getBounds()
-
setBounds
void setBounds(org.eclipse.swt.graphics.Rectangle bounds)
-
getStart
long getStart()
-
getEnd
long getEnd()
-
isDisplayable
boolean isDisplayable()
-
overlaps
boolean overlaps(GanttPhase other)
-
willOverlapResize
boolean willOverlapResize(GanttPhase other, int calType, int val, boolean start)
-
move
void move(int calType, int val)
-
moveStart
void moveStart(int calType, int val)
-
moveEnd
void moveEnd(int calType, int val)
-
getDaysBetweenStartAndEnd
int getDaysBetweenStartAndEnd()
-
markDragStart
void markDragStart()
-
undoLastDragDrop
void undoLastDragDrop()
-
-