Class: Glimmer::SWT::LayoutDataProxy
- Inherits:
-
Object
- Object
- Glimmer::SWT::LayoutDataProxy
- Includes:
- PropertyOwner
- Defined in:
- lib/glimmer/swt/layout_data_proxy.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#grab_excess_horizontal_space ⇒ Object
Returns the value of attribute grab_excess_horizontal_space.
-
#grab_excess_vertical_space ⇒ Object
Returns the value of attribute grab_excess_vertical_space.
-
#height_hint ⇒ Object
(also: #height)
Returns the value of attribute height_hint.
-
#horizontal_alignment ⇒ Object
Returns the value of attribute horizontal_alignment.
-
#horizontal_indent ⇒ Object
Returns the value of attribute horizontal_indent.
-
#horizontal_span ⇒ Object
Returns the value of attribute horizontal_span.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#vertical_alignment ⇒ Object
Returns the value of attribute vertical_alignment.
-
#vertical_indent ⇒ Object
Returns the value of attribute vertical_indent.
-
#vertical_span ⇒ Object
Returns the value of attribute vertical_span.
-
#width_hint ⇒ Object
(also: #width)
Returns the value of attribute width_hint.
Instance Method Summary collapse
-
#initialize(parent, args) ⇒ LayoutDataProxy
constructor
A new instance of LayoutDataProxy.
- #reapply ⇒ Object
Methods included from PropertyOwner
#attribute_getter, #attribute_setter, #get_attribute, #set_attribute
Constructor Details
#initialize(parent, args) ⇒ LayoutDataProxy
Returns a new instance of LayoutDataProxy.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 23 def initialize(parent, args) @parent = parent @args = args self.horizontal_alignment = @args[0] if @args[0] self.vertical_alignment = @args[1] if @args[1] self.grab_excess_horizontal_space = @args[2] if @args[2] self.grab_excess_vertical_space = @args[3] if @args[3] # TODO spread args correctly as per SWT LayoutData API # TODO avoid using reapply # reapply end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def args @args end |
#grab_excess_horizontal_space ⇒ Object
Returns the value of attribute grab_excess_horizontal_space.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def grab_excess_horizontal_space @grab_excess_horizontal_space end |
#grab_excess_vertical_space ⇒ Object
Returns the value of attribute grab_excess_vertical_space.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def grab_excess_vertical_space @grab_excess_vertical_space end |
#height_hint ⇒ Object Also known as: height
Returns the value of attribute height_hint.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def height_hint @height_hint end |
#horizontal_alignment ⇒ Object
Returns the value of attribute horizontal_alignment.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def horizontal_alignment @horizontal_alignment end |
#horizontal_indent ⇒ Object
Returns the value of attribute horizontal_indent.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def horizontal_indent @horizontal_indent end |
#horizontal_span ⇒ Object
Returns the value of attribute horizontal_span.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def horizontal_span @horizontal_span end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def parent @parent end |
#vertical_alignment ⇒ Object
Returns the value of attribute vertical_alignment.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def vertical_alignment @vertical_alignment end |
#vertical_indent ⇒ Object
Returns the value of attribute vertical_indent.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def vertical_indent @vertical_indent end |
#vertical_span ⇒ Object
Returns the value of attribute vertical_span.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def vertical_span @vertical_span end |
#width_hint ⇒ Object Also known as: width
Returns the value of attribute width_hint.
8 9 10 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 8 def width_hint @width_hint end |
Instance Method Details
#reapply ⇒ Object
105 106 107 108 109 |
# File 'lib/glimmer/swt/layout_data_proxy.rb', line 105 def reapply # TODO remove reapply method # @parent.css = <<~CSS # CSS end |