class TaskJuggler::GanttHeaderScaleItem

This class is a storate container for all data related to a scale step of a GanttChart header.

Attributes

label[R]
pos[R]
width[R]

Public Class Methods

new(label, x, y, width, height) click to toggle source
# File lib/taskjuggler/reports/GanttHeaderScaleItem.rb, line 21
def initialize(label, x, y, width, height)
  @label = label
  @x = x
  @y = y
  @width = width
  @height = height
end

Public Instance Methods

to_html() click to toggle source
# File lib/taskjuggler/reports/GanttHeaderScaleItem.rb, line 29
def to_html
  div = XMLElement.new('div', 'class' => 'tabhead',
    'style' => "font-weight:bold; position:absolute; " +
    "left:#{@x}px; top:#{@y}px; width:#{@width}px; height:#{@height}px; ")
  div << (div1 = XMLElement.new('div', 'style' => 'padding:3px; '))
  div1 << XMLText.new("#{label}")

  div
end