Monkeybars::View::Positioning

Public Instance Methods

height() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 52
def height
  @main_view_component.height
end
move_to(x, y) click to toggle source
# File lib/monkeybars/view_positioning.rb, line 12
def move_to(x, y)
  @main_view_component.set_location(x,y)
end
move_to_bottom_left() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 31
def move_to_bottom_left
  move_to(0, bottom_edge_y_coordinate)
end
move_to_bottom_right() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 35
def move_to_bottom_right
  screen_size = Toolkit.default_toolkit.screen_size
  move_to(right_edge_x_coordinate, bottom_edge_y_coordinate)
end
move_to_center() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 16
def move_to_center
  x = (screen_size.width - @main_view_component.width)/2
  y = (screen_size.height - @main_view_component.height)/2 
  move_to(x, y)
end
move_to_top_left() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 27
def move_to_top_left
  move_to(0, 0)
end
move_to_top_right() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 22
def move_to_top_right
  move_to(right_edge_x_coordinate, 0)
end
screen_size() click to toggle source

Returns a java.awt.Dimension

# File lib/monkeybars/view_positioning.rb, line 8
def screen_size 
  Toolkit.default_toolkit.screen_size
end
width() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 48
def width
  @main_view_component.width
end
x() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 40
def x
  @main_view_component.location.x
end
y() click to toggle source
# File lib/monkeybars/view_positioning.rb, line 44
def y
  @main_view_component.location.y
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.