Class: Shoes::Swt::Line
- Inherits:
-
Object
- Object
- Shoes::Swt::Line
- Includes:
- Common::PainterUpdatesPosition, Common::Clickable, Common::Fill, Common::Remove, Common::Stroke, Common::Translate, Common::Visibility
- Defined in:
- shoes-swt/lib/shoes/swt/line.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#dsl ⇒ Object
readonly
Returns the value of attribute dsl.
-
#transform ⇒ Object
readonly
Returns the value of attribute transform.
Attributes included from Common::Clickable
Instance Method Summary collapse
- #angle ⇒ Object
-
#initialize(dsl, app) ⇒ Line
constructor
A new instance of Line.
Methods included from Common::Translate
#clear_translate, #translate_left, #translate_top
Methods included from Common::Remove
Methods included from Common::Visibility
#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?
Methods included from Common::Fill
Methods included from Common::Stroke
Methods included from Common::Clickable
#click, #pass_coordinates?, #register_click, #release
Constructor Details
#initialize(dsl, app) ⇒ Line
Returns a new instance of Line.
18 19 20 21 22 23 24 25 26 |
# File 'shoes-swt/lib/shoes/swt/line.rb', line 18 def initialize(dsl, app) @dsl = dsl @app = app @painter = LinePainter.new(self) @app.add_paint_listener(@painter) @transform = nil # Not necessary for this shape end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
15 16 17 |
# File 'shoes-swt/lib/shoes/swt/line.rb', line 15 def app @app end |
#dsl ⇒ Object (readonly)
Returns the value of attribute dsl.
15 16 17 |
# File 'shoes-swt/lib/shoes/swt/line.rb', line 15 def dsl @dsl end |
#transform ⇒ Object (readonly)
Returns the value of attribute transform.
16 17 18 |
# File 'shoes-swt/lib/shoes/swt/line.rb', line 16 def transform @transform end |
Instance Method Details
#angle ⇒ Object
28 29 30 |
# File 'shoes-swt/lib/shoes/swt/line.rb', line 28 def angle @dsl.angle end |