Class Index

Quicksearch

Ziya::Gauges::Thermo

Public Class Methods

new( license, design_id="thermo" ) click to toggle source

creates a thermometer gauge. license the xml/swf gauge license key design_id the name of the design file containing components to override default design.

    # File lib/ziya/gauges/thermo.rb, line 15
15:     def initialize( license, design_id="thermo" )
16:       super( license, design_id )
17:     end

Public Instance Methods

set_preferences( opts={} ) click to toggle source


provides for overiding basic functionality

title:String representing gauge title or null for none.
gauge_color:Legend color
legend_color:Gauge color
due_point:Set temperature level

    # File lib/ziya/gauges/thermo.rb, line 26
26:     def set_preferences( opts={} )
27:       super( opts )
28:       options[:end_scale] = normalize_and_scale( options[:due_point] )
29:     end

Protected Instance Methods

default_options() click to toggle source


setup thermometer default options

    # File lib/ziya/gauges/thermo.rb, line 36
36:       def default_options
37:         { 
38:           :x            => 20,
39:           :y            => 20,
40:           :due_point    => 40,
41:           :gauge_color  => "ff0000",
42:           :legend_color => "cc0000",
43:           :title        => "weather"
44:         }
45:       end

secsequence

--- SEC00186

seccomment

--- ""

method_list

--- 
- methods: 
  - visibility: public
    aref: M000074
    name: new
    sourcecode: "    <span class=\"ruby-comment cmt\"># File lib/ziya/gauges/thermo.rb, line 15</span>\n\
      15:     <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-identifier\">initialize</span>( <span class=\"ruby-identifier\">license</span>, <span class=\"ruby-identifier\">design_id</span>=<span class=\"ruby-value str\">&quot;thermo&quot;</span> )\n\
      16:       <span class=\"ruby-keyword kw\">super</span>( <span class=\"ruby-identifier\">license</span>, <span class=\"ruby-identifier\">design_id</span> )\n\
      17:     <span class=\"ruby-keyword kw\">end</span>"
    m_desc: |-
      <p>
      creates a thermometer gauge. <tt>license</tt> the xml/swf gauge license key
      <tt>design_id</tt> the name of the design file containing components to
      override default design.
      </p>
    params: ( license, design_id=&quot;thermo&quot; )
  category: Class
  type: Public
- methods: 
  - visibility: public
    aref: M000075
    name: set_preferences
    sourcecode: "    <span class=\"ruby-comment cmt\"># File lib/ziya/gauges/thermo.rb, line 26</span>\n\
      26:     <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-identifier\">set_preferences</span>( <span class=\"ruby-identifier\">opts</span>={} )\n\
      27:       <span class=\"ruby-keyword kw\">super</span>( <span class=\"ruby-identifier\">opts</span> )\n\
      28:       <span class=\"ruby-identifier\">options</span>[<span class=\"ruby-identifier\">:end_scale</span>] = <span class=\"ruby-identifier\">normalize_and_scale</span>( <span class=\"ruby-identifier\">options</span>[<span class=\"ruby-identifier\">:due_point</span>] )\n\
      29:     <span class=\"ruby-keyword kw\">end</span>"
    m_desc: |-
      <hr size="10"></hr><p>
      provides for overiding basic functionality
      </p>
      <table>
      <tr><td valign="top"><tt>title</tt>:</td><td><a href="../../String.html">String</a> representing gauge title or null for
      none.
      
      </td></tr>
      <tr><td valign="top"><tt>gauge_color</tt>:</td><td>Legend color
      
      </td></tr>
      <tr><td valign="top"><tt>legend_color</tt>:</td><td>Gauge color
      
      </td></tr>
      <tr><td valign="top"><tt>due_point</tt>:</td><td>Set temperature level
      
      </td></tr>
      </table>
    params: ( opts={} )
  category: Instance
  type: Public
- methods: 
  - visibility: protected
    aref: M000076
    name: default_options
    sourcecode: "    <span class=\"ruby-comment cmt\"># File lib/ziya/gauges/thermo.rb, line 36</span>\n\
      36:       <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-identifier\">default_options</span>\n\
      37:         { \n\
      38:           <span class=\"ruby-identifier\">:x</span>            =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value\">20</span>,\n\
      39:           <span class=\"ruby-identifier\">:y</span>            =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value\">20</span>,\n\
      40:           <span class=\"ruby-identifier\">:due_point</span>    =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value\">40</span>,\n\
      41:           <span class=\"ruby-identifier\">:gauge_color</span>  =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value str\">&quot;ff0000&quot;</span>,\n\
      42:           <span class=\"ruby-identifier\">:legend_color</span> =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value str\">&quot;cc0000&quot;</span>,\n\
      43:           <span class=\"ruby-identifier\">:title</span>        =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-value str\">&quot;weather&quot;</span>\n\
      44:         }\n\
      45:       <span class=\"ruby-keyword kw\">end</span>"
    m_desc: |-
      <hr size="10"></hr><p>
      setup thermometer default options
      </p>
    params: ()
  category: Instance
  type: Protected

sectitle

--- 

[Validate]

Generated with the Darkfish Rdoc Generator.