limelight 0.1.0-java → 0.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/bin/limelight +0 -0
  2. data/bin/ll +2 -2
  3. data/bin/ll.bat +2 -2
  4. data/lib/init.rb +5 -3
  5. data/lib/limelight.jar +0 -0
  6. data/lib/limelight/animation.rb +20 -0
  7. data/lib/limelight/build_exception.rb +1 -1
  8. data/lib/limelight/builtin/players.rb +12 -0
  9. data/lib/limelight/builtin/players/button.rb +24 -0
  10. data/lib/limelight/builtin/players/check_box.rb +31 -0
  11. data/lib/limelight/builtin/players/combo_box.rb +55 -0
  12. data/lib/limelight/builtin/players/combo_box_popup_list.rb +19 -0
  13. data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +21 -0
  14. data/lib/limelight/builtin/players/curtains.rb +22 -0
  15. data/lib/limelight/builtin/players/radio_button.rb +41 -0
  16. data/lib/limelight/builtin/players/text_area.rb +25 -0
  17. data/lib/limelight/builtin/players/text_box.rb +25 -0
  18. data/lib/limelight/builtin/styles.rb +35 -0
  19. data/lib/limelight/button_group_cache.rb +2 -2
  20. data/lib/limelight/casting_director.rb +9 -6
  21. data/lib/limelight/commands.rb +3 -3
  22. data/lib/limelight/file_chooser.rb +1 -1
  23. data/lib/limelight/file_filter.rb +1 -1
  24. data/lib/limelight/java_couplings.rb +57 -0
  25. data/lib/limelight/java_util.rb +1 -1
  26. data/lib/limelight/limelight_exception.rb +1 -1
  27. data/lib/limelight/loaders/file_scene_loader.rb +3 -2
  28. data/lib/limelight/menu_bar.rb +1 -1
  29. data/lib/limelight/paint_action.rb +2 -2
  30. data/lib/limelight/pen.rb +2 -2
  31. data/lib/limelight/producer.rb +21 -5
  32. data/lib/limelight/production.rb +1 -1
  33. data/lib/limelight/production_builder.rb +1 -1
  34. data/lib/limelight/prop.rb +49 -39
  35. data/lib/limelight/prop_builder.rb +1 -1
  36. data/lib/limelight/scene.rb +3 -3
  37. data/lib/limelight/stage.rb +5 -5
  38. data/lib/limelight/stage_builder.rb +1 -1
  39. data/lib/limelight/styles.rb +2 -2
  40. data/lib/limelight/styles_builder.rb +7 -7
  41. data/lib/limelight/theater.rb +2 -2
  42. data/lib/limelight/util.rb +1 -1
  43. data/lib/limelight/version.rb +2 -2
  44. data/productions/examples/8thlight.com/about/about.txt +3 -3
  45. data/productions/examples/8thlight.com/about/props.rb +1 -1
  46. data/productions/examples/8thlight.com/about/styles.rb +1 -1
  47. data/productions/examples/8thlight.com/footer.rb +1 -1
  48. data/productions/examples/8thlight.com/home/props.rb +1 -1
  49. data/productions/examples/8thlight.com/home/styles.rb +1 -1
  50. data/productions/examples/8thlight.com/images/bg.jpg +0 -0
  51. data/productions/examples/8thlight.com/images/button_bg.jpg +0 -0
  52. data/productions/examples/8thlight.com/images/canvas_bg.jpg +0 -0
  53. data/productions/examples/8thlight.com/images/thumbnail_book.jpg +0 -0
  54. data/productions/examples/8thlight.com/menu.rb +1 -1
  55. data/productions/examples/8thlight.com/services/props.rb +1 -1
  56. data/productions/examples/8thlight.com/services/services.txt +1 -1
  57. data/productions/examples/8thlight.com/services/styles.rb +1 -1
  58. data/productions/examples/8thlight.com/stages.rb +1 -1
  59. data/productions/examples/8thlight.com/styles.rb +8 -1
  60. data/productions/examples/calculator/players/button.rb +1 -1
  61. data/productions/examples/calculator/players/calculator.rb +1 -1
  62. data/productions/examples/calculator/players/calculator_model.rb +1 -1
  63. data/productions/examples/calculator/props.rb +1 -1
  64. data/productions/examples/calculator/styles.rb +1 -1
  65. data/productions/examples/langstons_ant/players/ant.rb +1 -1
  66. data/productions/examples/langstons_ant/players/log.rb +1 -1
  67. data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
  68. data/productions/examples/langstons_ant/players/world.rb +1 -1
  69. data/productions/examples/langstons_ant/props.rb +1 -1
  70. data/productions/examples/langstons_ant/styles.rb +1 -1
  71. data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
  72. data/productions/examples/sandbox/click_me/props.rb +1 -1
  73. data/productions/examples/sandbox/click_me/styles.rb +1 -1
  74. data/productions/examples/sandbox/floaters/players/floater.rb +21 -11
  75. data/productions/examples/sandbox/floaters/players/surface.rb +5 -1
  76. data/productions/examples/sandbox/floaters/props.rb +1 -1
  77. data/productions/examples/sandbox/floaters/styles.rb +1 -1
  78. data/productions/examples/sandbox/gradients/players/spinner.rb +5 -12
  79. data/productions/examples/sandbox/gradients/players/teaser.rb +7 -14
  80. data/productions/examples/sandbox/gradients/players/wave.rb +7 -14
  81. data/productions/examples/sandbox/gradients/players/waves.rb +7 -14
  82. data/productions/examples/sandbox/gradients/props.rb +1 -1
  83. data/productions/examples/sandbox/gradients/styles.rb +1 -1
  84. data/productions/examples/sandbox/header.rb +2 -1
  85. data/productions/examples/sandbox/homer/players/homer.rb +12 -8
  86. data/productions/examples/sandbox/homer/props.rb +1 -1
  87. data/productions/examples/sandbox/homer/styles.rb +1 -1
  88. data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
  89. data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
  90. data/productions/examples/sandbox/inputs/players/combo_box_input.rb +3 -3
  91. data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
  92. data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
  93. data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
  94. data/productions/examples/sandbox/inputs/props.rb +3 -3
  95. data/productions/examples/sandbox/inputs/styles.rb +2 -1
  96. data/productions/examples/sandbox/players/sandbox.rb +1 -1
  97. data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
  98. data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
  99. data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
  100. data/productions/examples/sandbox/scrolling/players/add_button.rb +19 -0
  101. data/productions/examples/sandbox/scrolling/players/cell.rb +1 -2
  102. data/productions/examples/sandbox/scrolling/props.rb +9 -4
  103. data/productions/examples/sandbox/scrolling/styles.rb +10 -1
  104. data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
  105. data/productions/examples/sandbox/sketching/props.rb +1 -1
  106. data/productions/examples/sandbox/sketching/styles.rb +1 -2
  107. data/productions/examples/sandbox/sounds/bird.au +0 -0
  108. data/productions/examples/sandbox/sounds/cat.au +0 -0
  109. data/productions/examples/sandbox/sounds/cow.au +0 -0
  110. data/productions/examples/sandbox/sounds/dog.au +0 -0
  111. data/productions/examples/sandbox/sounds/donkey.au +0 -0
  112. data/productions/examples/sandbox/sounds/duck.au +0 -0
  113. data/productions/examples/sandbox/sounds/players/clip.rb +10 -0
  114. data/productions/examples/sandbox/sounds/props.rb +10 -0
  115. data/productions/examples/sandbox/sounds/styles.rb +17 -0
  116. data/productions/examples/sandbox/stages.rb +2 -1
  117. data/productions/examples/sandbox/styles.rb +6 -6
  118. data/productions/examples/sandbox/teaser/players/fader.rb +22 -16
  119. data/productions/examples/sandbox/teaser/props.rb +1 -1
  120. data/productions/examples/sandbox/teaser/styles.rb +1 -1
  121. data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
  122. data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
  123. data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
  124. data/productions/stage_composer/init.rb +1 -1
  125. data/productions/stage_composer/inspector/players/inspector.rb +1 -1
  126. data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
  127. data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
  128. data/productions/stage_composer/inspector/players/style_table.rb +1 -1
  129. data/productions/stage_composer/inspector/players/style_value.rb +1 -1
  130. data/productions/stage_composer/inspector/props.rb +2 -2
  131. data/productions/stage_composer/inspector/styles.rb +3 -3
  132. data/productions/stage_composer/lib/init.rb +1 -1
  133. data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
  134. data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
  135. data/productions/stage_composer/production.rb +1 -1
  136. data/productions/stage_composer/stages.rb +1 -1
  137. data/productions/startup/players/browse_button.rb +3 -0
  138. data/productions/startup/players/download_button.rb +4 -1
  139. data/productions/startup/players/sandbox_button.rb +4 -1
  140. data/productions/startup/props.rb +3 -5
  141. data/productions/startup/styles.rb +5 -5
  142. data/spec/builtin/players/button_spec.rb +21 -0
  143. data/spec/builtin/players/check_box_spec.rb +29 -0
  144. data/spec/builtin/players/combo_box_spec.rb +29 -0
  145. data/spec/{players → builtin/players}/radio_button_spec.rb +9 -20
  146. data/spec/builtin/players/text_area_spec.rb +27 -0
  147. data/spec/builtin/players/text_box_spec.rb +27 -0
  148. data/spec/casting_director_spec.rb +3 -3
  149. data/spec/commands_spec.rb +2 -2
  150. data/spec/file_chooser_spec.rb +1 -1
  151. data/spec/file_filter_spec.rb +1 -1
  152. data/spec/java_util_spec.rb +1 -1
  153. data/spec/loaders/file_loader_spec.rb +1 -1
  154. data/spec/paint_action_spec.rb +1 -1
  155. data/spec/pen_spec.rb +1 -1
  156. data/spec/producer_spec.rb +14 -4
  157. data/spec/production_builder_spec.rb +1 -1
  158. data/spec/production_spec.rb +1 -1
  159. data/spec/prop_builder_spec.rb +1 -1
  160. data/spec/prop_spec.rb +66 -5
  161. data/spec/scene_spec.rb +2 -2
  162. data/spec/spec_helper.rb +4 -1
  163. data/spec/stage_builder_spec.rb +1 -1
  164. data/spec/stage_spec.rb +1 -1
  165. data/spec/styles_builder_spec.rb +34 -2
  166. data/spec/theater_spec.rb +1 -1
  167. metadata +130 -106
  168. data/lib/limelight/players.rb +0 -9
  169. data/lib/limelight/players/button.rb +0 -29
  170. data/lib/limelight/players/check_box.rb +0 -38
  171. data/lib/limelight/players/combo_box.rb +0 -44
  172. data/lib/limelight/players/radio_button.rb +0 -47
  173. data/lib/limelight/players/text_area.rb +0 -25
  174. data/lib/limelight/players/text_box.rb +0 -25
  175. data/spec/players/button_spec.rb +0 -31
  176. data/spec/players/check_box_spec.rb +0 -40
  177. data/spec/players/combo_box_spec.rb +0 -39
  178. data/spec/players/text_area_spec.rb +0 -37
  179. data/spec/players/text_box_spec.rb +0 -37
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'limelight/java_util'
@@ -13,7 +13,7 @@ module Limelight
13
13
  attr_accessor :default_scene
14
14
  attr_reader :frame, :current_scene, :name, :theater
15
15
 
16
- include Java::limelight.ui.Stage
16
+ include UI::Api::Stage
17
17
 
18
18
  def public_choose_file
19
19
  choose_file
@@ -65,9 +65,9 @@ module Limelight
65
65
  @frame.setJMenuBar(scene.menu_bar)
66
66
  @frame.load(scene.panel)
67
67
  scene.stage = self
68
- scene.panel.set_size(scene.panel.get_preferred_size)
68
+ scene.panel.snap_to_size
69
69
  if(scene.has_static_size?)
70
- @frame.set_size(scene.panel.get_size)
70
+ @frame.set_size(scene.panel.width, scene.panel.height)
71
71
  end
72
72
  @current_scene = scene
73
73
  end
@@ -85,7 +85,7 @@ module Limelight
85
85
  private ###############################################
86
86
 
87
87
  def build_frame
88
- @frame = Java::limelight.ui.Frame.new(self)
88
+ @frame = UI::Model::Frame.new(self)
89
89
  @frame.set_size(800, 800)
90
90
  @frame.set_location(200, 25)
91
91
  @frame.title = title
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'limelight/stage'
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'yaml'
@@ -24,7 +24,7 @@ module Limelight
24
24
  end
25
25
 
26
26
  def self.create_style(hash)
27
- style = Java::limelight.ui.FlatStyle.new
27
+ style = Styles::FlatStyle.new
28
28
  hash.each_pair do |key, value|
29
29
  value = value.to_s.gsub("pigpen", "#")
30
30
  style.send((key.to_s + "=").to_sym, value)
@@ -1,10 +1,10 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Limelight
5
5
 
6
- def self.build_styles(&block)
7
- builder = StylesBuilder.new
6
+ def self.build_styles(style_hash = nil, &block)
7
+ builder = StylesBuilder.new(style_hash)
8
8
  builder.instance_eval(&block) if block
9
9
  return builder.__styles
10
10
  end
@@ -12,8 +12,8 @@ module Limelight
12
12
  class StylesBuilder
13
13
  attr_reader :__styles
14
14
 
15
- def initialize
16
- @__styles = {}
15
+ def initialize(style_hash = nil)
16
+ @__styles = style_hash || {}
17
17
  end
18
18
 
19
19
  def method_missing(sym, &block)
@@ -30,10 +30,10 @@ module Limelight
30
30
  class StyleBuilder
31
31
  attr_reader :__style
32
32
 
33
- def initialize(name, styles_builder)
34
- @__style = Java::limelight.ui.RichStyle.new
33
+ def initialize(name, styles_builder, options = {})
35
34
  @__name = name
36
35
  @__styles_builder = styles_builder
36
+ @__style = @__styles_builder.__styles[name] || Styles::RichStyle.new
37
37
  end
38
38
 
39
39
  def hover(&block)
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'limelight/limelight_exception'
@@ -7,7 +7,7 @@ module Limelight
7
7
 
8
8
  class Theater
9
9
 
10
- include Java::limelight.ui.Theater
10
+ include UI::Api::Theater
11
11
 
12
12
  attr_reader :active_stage
13
13
 
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Limelight
@@ -1,11 +1,11 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Limelight
5
5
  module VERSION #:nodoc:
6
6
  unless defined? MAJOR
7
7
  MAJOR = 0
8
- MINOR = 1
8
+ MINOR = 2
9
9
  TINY = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -1,20 +1,20 @@
1
1
  You may ask, "Where does the name '8th Light' come from?" To answer that, let's first discuss the foundational principles held by 8th Light.
2
2
 
3
- Craftsmanship
3
+ <sub_title>Craftsmanship</sub_title>
4
4
  The folks at 8th Light consider themselves as software craftsmen rather than software engineers or software scientists. Clearly, engineering skills and scientific understanding are required to write good software. It is the application of these skills in combination with a pragmatic attitude and a sense of quality that define craftsmanship.
5
5
 
6
6
  As craftsmen, our style of software development differs from traditional styles of software development. For one, we maintain close collaboration with the customers or end users of the systems we build. We are continually refining and improving every bit of the code base as the system evolves. Every member of our team works together in an open and synergistic workspace. To ensure a well designed system with almost no defects we drive development though tests. Feedback during development is extremely valuable which is why we work in iterations delivering working functionality regularly.
7
7
 
8
8
  Perhaps the most important aspect of our work is pride. We build software that we are proud to have built and that our clients are proud to have.
9
9
 
10
- Apprenticeship
10
+ <sub_title>Apprenticeship</sub_title>
11
11
  It has been known for decades that the best way to become a good software developer is to learn from a good software developer. This is in line with the craftsmanship model. In any craft, newcomers start out as apprentices. 8th Light hires only apprentices.
12
12
 
13
13
  This serves two purposes. The first is that of maintaining quality. Starting out as an apprentice allows newcomers to focus on nothing but learning as much as possible by working with senior 8th Light developers. When an apprentice concludes his apprenticeship he is able to build quality software.
14
14
 
15
15
  The second reason is uniformity and consistency. Studies have shown that good developers are consistent and uniform in their style of coding. Every good developer has a different style but each one is consistent with themself. Inconsistencies in a software system add complexity and decrease productivity. Therefore, 8th Light strives to build development teams that practice the same style of development. In this way our teams remain productive and our software remains simple.
16
16
 
17
- 8th Light
17
+ <sub_title>8th Light</sub_title>
18
18
  The values described above are not unlike those of martial arts. The name '8th Light' holds special meaning to Micah (the company's founder) who trained in the Eighth Light school of Jujitsu called Hakkoryu. 8th Light was chosen as a name for this company because we share much of the spirit and values of martial arts, particularly Hakkoryu Jujitsu.
19
19
 
20
20
  "The name "Hakkoryu" is based on a philosophical Japanese view of the color spectrum as being divided into nine bands of light. The eighth shade is infrared, which is invisible to the naked eye but extremely powerful, as are Hakkoryu techniques. The number eight in Japan also has associated with it numerous philosophical and religious meanings that are beyond the scope of this brief introduction."
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  footer do
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
File without changes
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  header
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,6 +1,6 @@
1
1
  At 8th Light, we use a unique process of actuating ideas, accepting the best and most efficient practices, and synthesizing those practices into an effectual and coherent method. Communication, quality, and innovation drive the decisions in this process, and the end goal is to produce impressive software for clients according to their specifications.
2
2
 
3
- Values
3
+ <sub_title>Values</sub_title>
4
4
  Communication is a priority. We believe that working closely with the customer is the only way to ensure that a product is created in sync with both the customer’s vision and their desired outcome. Daily interactions with the customer are preferred, as is working on site. We create with the understanding that each finished product is the result of its own specific evolution, and that the software being written should constantly be subject to modifications of concept and conclusion. Each iteration produces more business value, as with each brush stroke the image on a canvas is further disclosed. At 8th Light, we employ a creative process that highlights cooperation and consideration, and we appreciate that this practice is the difference between good software and great software.
5
5
 
6
6
  The quality of code in an application indicates many things; high-quality code makes your product easier to extend and maintain, as changes to the code are embraced by the framework and design. Moving fast becomes easier, and the customer is able to stay ahead of their competitors as well as adapt to changes quickly and efficiently.
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  stage "8th Light" do
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  page {
@@ -6,6 +6,7 @@ page {
6
6
  height "100%"
7
7
  horizontal_alignment "center"
8
8
  background_image "images/bg.jpg"
9
+ vertical_scroll_bar :on
9
10
  }
10
11
 
11
12
  main_column {
@@ -88,6 +89,12 @@ section_title {
88
89
  font_size 20
89
90
  font_style "bold"
90
91
  }
92
+
93
+ sub_title {
94
+ text_color "#0049F4"
95
+ font_size 32
96
+ font_face "Courier"
97
+ }
91
98
 
92
99
  section_body {
93
100
  width 823
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Button
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'calculator_model'
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  class CalculatorModel
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "calculator"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  calculator {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  class Ant
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Log
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module StartStopButton
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  load File.expand_path(File.dirname(__FILE__) + "/ant.rb")
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  description_text = <<END
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  earth {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  puts "Chromaton required"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  chromaton {
@@ -1,15 +1,16 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
- require 'thread'
5
-
6
4
  module Floater
7
5
 
8
6
  FRICTION = 0.1
9
7
  MAX_DISTANCE = 85
10
- MUTEX = Mutex.new
11
8
 
12
9
  attr_reader :sliding
10
+
11
+ def mouse_clicked(e)
12
+ puts "You caught " + text
13
+ end
13
14
 
14
15
  def width
15
16
  @width = style.width.to_i if @width.nil?
@@ -45,7 +46,17 @@ module Floater
45
46
  d = distance(x, y, source_x, source_y)
46
47
  return if d > MAX_DISTANCE
47
48
  calculate_vector(source_x, source_y)
48
- Thread.new { slide }
49
+
50
+ @sliding = true
51
+ @animation = animate(:updates_per_second => 30) do
52
+ begin
53
+ slide
54
+ rescue Exception => e
55
+ puts e
56
+ puts e.backtrace
57
+ @animation.stop
58
+ end
59
+ end
49
60
  end
50
61
 
51
62
  def calculate_vector(sx, sy)
@@ -56,10 +67,9 @@ module Floater
56
67
  @velocity = 20
57
68
  find_bounds if @max_x.nil?
58
69
  end
59
-
70
+
60
71
  def slide
61
- @sliding = true
62
- while @velocity > 1
72
+ if @velocity > 1
63
73
  @x_coefficient *= -1 if(x < @min_x || x > @max_x)
64
74
  @y_coefficient *= -1 if(y < @min_y || y > @max_y)
65
75
  x2 = x + (@x_coefficient * @velocity)
@@ -67,10 +77,10 @@ module Floater
67
77
  self.new_x = x2
68
78
  self.new_y = y2
69
79
  @velocity -= @velocity * FRICTION
70
- MUTEX.synchronize { parent.update_now }
71
- Thread.pass
80
+ else
81
+ @sliding = false
82
+ @animation.stop
72
83
  end
73
- @sliding = false
74
84
  end
75
85
 
76
86
  def find_bounds
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Surface
@@ -13,5 +13,9 @@ module Surface
13
13
  y = e.y
14
14
  floaters.each { |floater| floater.get_away_from(x, y) }
15
15
  end
16
+
17
+ def mouse_clicked(e)
18
+ puts "You missed"
19
+ end
16
20
 
17
21
  end