Class TaskJuggler::GanttHeaderScaleItem
In: lib/taskjuggler/reports/GanttHeaderScaleItem.rb
Parent: Object

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

Methods

new   to_html  

Attributes

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

Public Class methods

[Source]

# File lib/taskjuggler/reports/GanttHeaderScaleItem.rb, line 22
    def initialize(label, x, y, width, height)
      @label = label
      @x = x
      @y = y
      @width = width
      @height = height
    end

Public Instance methods

[Source]

# File lib/taskjuggler/reports/GanttHeaderScaleItem.rb, line 30
    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

[Validate]