Class: Glimmer::SWT::LayoutDataProxy

Inherits:
Object
  • Object
show all
Includes:
PropertyOwner
Defined in:
lib/glimmer/swt/layout_data_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argsObject (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_spaceObject

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_spaceObject

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_hintObject 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_alignmentObject

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_indentObject

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_spanObject

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

#parentObject (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_alignmentObject

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_indentObject

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_spanObject

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_hintObject 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

#reapplyObject



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