Sha256: a0cbf2fb1367f2f928e786ac4026e70412fc16a729c4d3a123df2182d2ad0648
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
#!/usr/bin/env ruby -w # encoding: UTF-8 # # = GanttHeaderScaleItem.rb -- The TaskJuggler III Project Management Software # # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 # by Chris Schlaeger <cs@taskjuggler.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # class TaskJuggler # This class is a storate container for all data related to a scale step of a # GanttChart header. class GanttHeaderScaleItem attr_reader :label, :pos, :width def initialize(label, x, y, width, height) @label = label @x = x @y = y @width = width @height = height end 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems