Parent

Included Modules

Class Index [+]

Quicksearch

TaskJuggler::GanttMilestone

The GanttMilestone represents a milestone task.

Public Class Methods

new(lineHeight, x, y) click to toggle source

Create a GanttMilestone object based on the following information: task is a reference to the Task to be displayed. lineHeight is the height of the line this milestone is shown in. x and y are the coordinates of the center of the milestone in the GanttChart.

    # File lib/reports/GanttMilestone.rb, line 30
30:     def initialize(lineHeight, x, y)
31:       @lineHeight = lineHeight
32:       @x = x
33:       @y = y
34:     end

Public Instance Methods

addBlockedZones(router) click to toggle source
    # File lib/reports/GanttMilestone.rb, line 58
58:     def addBlockedZones(router)
59:       router.addZone(@x - @@size - 2, @y + (@lineHeight / 2) - @@size - 2,
60:                      2 * @@size + 5, 2 * @@size + 5, true, true)
61:       # Block for arrowhead.
62:       router.addZone(@x - @@size - 9, @y + (@lineHeight / 2) - 7, 10, 15,
63:                      true, true)
64:     end
endDepLineEnd() click to toggle source

Return the point [ x, y ] where task end dependency lines should end at.

    # File lib/reports/GanttMilestone.rb, line 54
54:     def endDepLineEnd
55:       [ @x + @@size, @y + @lineHeight / 2 ]
56:     end
endDepLineStart() click to toggle source

Return the point [ x, y ] where task end dependency lines should start from.

    # File lib/reports/GanttMilestone.rb, line 49
49:     def endDepLineStart
50:       [ @x + @@size , @y + @lineHeight / 2 ]
51:     end
startDepLineEnd() click to toggle source

Return the point [ x, y ] where task start dependency lines should end at.

    # File lib/reports/GanttMilestone.rb, line 43
43:     def startDepLineEnd
44:       [ @x - @@size, @y + @lineHeight / 2 ]
45:     end
startDepLineStart() click to toggle source

Return the point [ x, y ] where task start dependency lines should start from.

    # File lib/reports/GanttMilestone.rb, line 38
38:     def startDepLineStart
39:       [ @x + @@size, @y + @lineHeight / 2 ]
40:     end
to_html() click to toggle source

Convert the abstact representation of the GanttMilestone into HTML elements.

    # File lib/reports/GanttMilestone.rb, line 68
68:     def to_html
69:       html = []
70: 
71:       # Invisible trigger frame for tooltips.
72:       html << rectToHTML(@x - (@lineHeight / 2), 0, @lineHeight, @lineHeight,
73:                          'tj_gantt_frame')
74: 
75:       # Draw a diamond shape.
76:       html += diamondToHTML(@x, @lineHeight / 2)
77:       html
78:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.