Class: TaskJuggler::TableColumnDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/taskjuggler/TableColumnDefinition.rb

Overview

This class holds the definition of a column of a report. This is the user specified data that is later used to generate the actual ReportTableColumn. The column is uniquely identified by an ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, title) ⇒ TableColumnDefinition

Returns a new instance of TableColumnDefinition.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 65

def initialize(id, title)
  # The column ID. It must be unique within the report.
  @id = id
  # An alternative title for the column header.
  @title = title
  # An alternative start date for columns with time-variant values.
  @start = nil
  # An alternative end date for columns with time-variant values.
  @end = nil
  # For regular columns (non-calendar and non-chart) the user can override
  # the actual cell content.
  @cellText = CellSettingPatternList.new
  # The content attribute is only used for calendar columns. It specifies
  # what content should be displayed in the calendar columns.
  @content = 'load'
  # Horizontal alignment of the cell content.
  @hAlign = CellSettingPatternList.new
  # An alternative content for the tooltip message. It should be a
  # RichText object.
  @tooltip = CellSettingPatternList.new
  # An alternative background color for the cell. The color setting is
  # stored as "#RGB" or "#RRGGBB" String.
  @cellColor = CellSettingPatternList.new
  # An alternative font color for the cell. The format is equivalent to
  # the @cellColor setting.
  @fontColor = CellSettingPatternList.new
  # Specifies a RichText pattern to be used to generate the text of the
  # individual list items.
  @listItem = nil
  # Specifies whether list items are comma separated, bullet or numbered
  # list.
  @listType = nil
  # The scale attribute is only used for Gantt chart columns. It specifies
  # the minimum resolution of the chart.
  @scale = 'week'
  # The width of columns.
  @width = nil
  # Format of the upper calendar header line
  @timeformat1 = nil
  # Format of the lower calendar header line
  @timeformat2 = nil

  # Reference to the ReportTableColumn object that was created based on this
  # definition.
  @column = nil
end

Instance Attribute Details

#cellColorObject (readonly)

Returns the value of attribute cellColor.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def cellColor
  @cellColor
end

#cellTextObject (readonly)

Returns the value of attribute cellText.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def cellText
  @cellText
end

#columnObject

Returns the value of attribute column.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def column
  @column
end

#contentObject

Returns the value of attribute content.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def content
  @content
end

#endObject

Returns the value of attribute end.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def end
  @end
end

#fontColorObject (readonly)

Returns the value of attribute fontColor.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def fontColor
  @fontColor
end

#hAlignObject (readonly)

Returns the value of attribute hAlign.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def hAlign
  @hAlign
end

#idObject (readonly)

Returns the value of attribute id.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def id
  @id
end

#listItemObject

Returns the value of attribute listItem.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def listItem
  @listItem
end

#listTypeObject

Returns the value of attribute listType.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def listType
  @listType
end

#scaleObject

Returns the value of attribute scale.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def scale
  @scale
end

#startObject

Returns the value of attribute start.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def start
  @start
end

#timeformat1Object

Returns the value of attribute timeformat1.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def timeformat1
  @timeformat1
end

#timeformat2Object

Returns the value of attribute timeformat2.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def timeformat2
  @timeformat2
end

#titleObject

Returns the value of attribute title.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def title
  @title
end

#tooltipObject (readonly)

Returns the value of attribute tooltip.



61
62
63
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 61

def tooltip
  @tooltip
end

#widthObject

Returns the value of attribute width.



62
63
64
# File 'lib/taskjuggler/TableColumnDefinition.rb', line 62

def width
  @width
end