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.
- data/bin/limelight +0 -0
- data/bin/ll +2 -2
- data/bin/ll.bat +2 -2
- data/lib/init.rb +5 -3
- data/lib/limelight.jar +0 -0
- data/lib/limelight/animation.rb +20 -0
- data/lib/limelight/build_exception.rb +1 -1
- data/lib/limelight/builtin/players.rb +12 -0
- data/lib/limelight/builtin/players/button.rb +24 -0
- data/lib/limelight/builtin/players/check_box.rb +31 -0
- data/lib/limelight/builtin/players/combo_box.rb +55 -0
- data/lib/limelight/builtin/players/combo_box_popup_list.rb +19 -0
- data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +21 -0
- data/lib/limelight/builtin/players/curtains.rb +22 -0
- data/lib/limelight/builtin/players/radio_button.rb +41 -0
- data/lib/limelight/builtin/players/text_area.rb +25 -0
- data/lib/limelight/builtin/players/text_box.rb +25 -0
- data/lib/limelight/builtin/styles.rb +35 -0
- data/lib/limelight/button_group_cache.rb +2 -2
- data/lib/limelight/casting_director.rb +9 -6
- data/lib/limelight/commands.rb +3 -3
- data/lib/limelight/file_chooser.rb +1 -1
- data/lib/limelight/file_filter.rb +1 -1
- data/lib/limelight/java_couplings.rb +57 -0
- data/lib/limelight/java_util.rb +1 -1
- data/lib/limelight/limelight_exception.rb +1 -1
- data/lib/limelight/loaders/file_scene_loader.rb +3 -2
- data/lib/limelight/menu_bar.rb +1 -1
- data/lib/limelight/paint_action.rb +2 -2
- data/lib/limelight/pen.rb +2 -2
- data/lib/limelight/producer.rb +21 -5
- data/lib/limelight/production.rb +1 -1
- data/lib/limelight/production_builder.rb +1 -1
- data/lib/limelight/prop.rb +49 -39
- data/lib/limelight/prop_builder.rb +1 -1
- data/lib/limelight/scene.rb +3 -3
- data/lib/limelight/stage.rb +5 -5
- data/lib/limelight/stage_builder.rb +1 -1
- data/lib/limelight/styles.rb +2 -2
- data/lib/limelight/styles_builder.rb +7 -7
- data/lib/limelight/theater.rb +2 -2
- data/lib/limelight/util.rb +1 -1
- data/lib/limelight/version.rb +2 -2
- data/productions/examples/8thlight.com/about/about.txt +3 -3
- data/productions/examples/8thlight.com/about/props.rb +1 -1
- data/productions/examples/8thlight.com/about/styles.rb +1 -1
- data/productions/examples/8thlight.com/footer.rb +1 -1
- data/productions/examples/8thlight.com/home/props.rb +1 -1
- data/productions/examples/8thlight.com/home/styles.rb +1 -1
- data/productions/examples/8thlight.com/images/bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/button_bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/canvas_bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/thumbnail_book.jpg +0 -0
- data/productions/examples/8thlight.com/menu.rb +1 -1
- data/productions/examples/8thlight.com/services/props.rb +1 -1
- data/productions/examples/8thlight.com/services/services.txt +1 -1
- data/productions/examples/8thlight.com/services/styles.rb +1 -1
- data/productions/examples/8thlight.com/stages.rb +1 -1
- data/productions/examples/8thlight.com/styles.rb +8 -1
- data/productions/examples/calculator/players/button.rb +1 -1
- data/productions/examples/calculator/players/calculator.rb +1 -1
- data/productions/examples/calculator/players/calculator_model.rb +1 -1
- data/productions/examples/calculator/props.rb +1 -1
- data/productions/examples/calculator/styles.rb +1 -1
- data/productions/examples/langstons_ant/players/ant.rb +1 -1
- data/productions/examples/langstons_ant/players/log.rb +1 -1
- data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
- data/productions/examples/langstons_ant/players/world.rb +1 -1
- data/productions/examples/langstons_ant/props.rb +1 -1
- data/productions/examples/langstons_ant/styles.rb +1 -1
- data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
- data/productions/examples/sandbox/click_me/props.rb +1 -1
- data/productions/examples/sandbox/click_me/styles.rb +1 -1
- data/productions/examples/sandbox/floaters/players/floater.rb +21 -11
- data/productions/examples/sandbox/floaters/players/surface.rb +5 -1
- data/productions/examples/sandbox/floaters/props.rb +1 -1
- data/productions/examples/sandbox/floaters/styles.rb +1 -1
- data/productions/examples/sandbox/gradients/players/spinner.rb +5 -12
- data/productions/examples/sandbox/gradients/players/teaser.rb +7 -14
- data/productions/examples/sandbox/gradients/players/wave.rb +7 -14
- data/productions/examples/sandbox/gradients/players/waves.rb +7 -14
- data/productions/examples/sandbox/gradients/props.rb +1 -1
- data/productions/examples/sandbox/gradients/styles.rb +1 -1
- data/productions/examples/sandbox/header.rb +2 -1
- data/productions/examples/sandbox/homer/players/homer.rb +12 -8
- data/productions/examples/sandbox/homer/props.rb +1 -1
- data/productions/examples/sandbox/homer/styles.rb +1 -1
- data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/combo_box_input.rb +3 -3
- data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/props.rb +3 -3
- data/productions/examples/sandbox/inputs/styles.rb +2 -1
- data/productions/examples/sandbox/players/sandbox.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
- data/productions/examples/sandbox/scrolling/players/add_button.rb +19 -0
- data/productions/examples/sandbox/scrolling/players/cell.rb +1 -2
- data/productions/examples/sandbox/scrolling/props.rb +9 -4
- data/productions/examples/sandbox/scrolling/styles.rb +10 -1
- data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
- data/productions/examples/sandbox/sketching/props.rb +1 -1
- data/productions/examples/sandbox/sketching/styles.rb +1 -2
- data/productions/examples/sandbox/sounds/bird.au +0 -0
- data/productions/examples/sandbox/sounds/cat.au +0 -0
- data/productions/examples/sandbox/sounds/cow.au +0 -0
- data/productions/examples/sandbox/sounds/dog.au +0 -0
- data/productions/examples/sandbox/sounds/donkey.au +0 -0
- data/productions/examples/sandbox/sounds/duck.au +0 -0
- data/productions/examples/sandbox/sounds/players/clip.rb +10 -0
- data/productions/examples/sandbox/sounds/props.rb +10 -0
- data/productions/examples/sandbox/sounds/styles.rb +17 -0
- data/productions/examples/sandbox/stages.rb +2 -1
- data/productions/examples/sandbox/styles.rb +6 -6
- data/productions/examples/sandbox/teaser/players/fader.rb +22 -16
- data/productions/examples/sandbox/teaser/props.rb +1 -1
- data/productions/examples/sandbox/teaser/styles.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
- data/productions/stage_composer/init.rb +1 -1
- data/productions/stage_composer/inspector/players/inspector.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
- data/productions/stage_composer/inspector/players/style_table.rb +1 -1
- data/productions/stage_composer/inspector/players/style_value.rb +1 -1
- data/productions/stage_composer/inspector/props.rb +2 -2
- data/productions/stage_composer/inspector/styles.rb +3 -3
- data/productions/stage_composer/lib/init.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
- data/productions/stage_composer/production.rb +1 -1
- data/productions/stage_composer/stages.rb +1 -1
- data/productions/startup/players/browse_button.rb +3 -0
- data/productions/startup/players/download_button.rb +4 -1
- data/productions/startup/players/sandbox_button.rb +4 -1
- data/productions/startup/props.rb +3 -5
- data/productions/startup/styles.rb +5 -5
- data/spec/builtin/players/button_spec.rb +21 -0
- data/spec/builtin/players/check_box_spec.rb +29 -0
- data/spec/builtin/players/combo_box_spec.rb +29 -0
- data/spec/{players → builtin/players}/radio_button_spec.rb +9 -20
- data/spec/builtin/players/text_area_spec.rb +27 -0
- data/spec/builtin/players/text_box_spec.rb +27 -0
- data/spec/casting_director_spec.rb +3 -3
- data/spec/commands_spec.rb +2 -2
- data/spec/file_chooser_spec.rb +1 -1
- data/spec/file_filter_spec.rb +1 -1
- data/spec/java_util_spec.rb +1 -1
- data/spec/loaders/file_loader_spec.rb +1 -1
- data/spec/paint_action_spec.rb +1 -1
- data/spec/pen_spec.rb +1 -1
- data/spec/producer_spec.rb +14 -4
- data/spec/production_builder_spec.rb +1 -1
- data/spec/production_spec.rb +1 -1
- data/spec/prop_builder_spec.rb +1 -1
- data/spec/prop_spec.rb +66 -5
- data/spec/scene_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -1
- data/spec/stage_builder_spec.rb +1 -1
- data/spec/stage_spec.rb +1 -1
- data/spec/styles_builder_spec.rb +34 -2
- data/spec/theater_spec.rb +1 -1
- metadata +130 -106
- data/lib/limelight/players.rb +0 -9
- data/lib/limelight/players/button.rb +0 -29
- data/lib/limelight/players/check_box.rb +0 -38
- data/lib/limelight/players/combo_box.rb +0 -44
- data/lib/limelight/players/radio_button.rb +0 -47
- data/lib/limelight/players/text_area.rb +0 -25
- data/lib/limelight/players/text_box.rb +0 -25
- data/spec/players/button_spec.rb +0 -31
- data/spec/players/check_box_spec.rb +0 -40
- data/spec/players/combo_box_spec.rb +0 -39
- data/spec/players/text_area_spec.rb +0 -37
- data/spec/players/text_box_spec.rb +0 -37
@@ -1,10 +1,9 @@
|
|
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
|
toolbar {
|
5
5
|
width "100%"
|
6
6
|
height :auto
|
7
|
-
margin 25
|
8
7
|
horizontal_alignment :center
|
9
8
|
}
|
10
9
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
4
|
+
__ :name => "sandbox"
|
5
|
+
__install "header.rb"
|
6
|
+
arena do
|
7
|
+
%w{ bird cat cow dog donkey duck }.each do |animal|
|
8
|
+
clip :text => animal
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
4
|
+
clip {
|
5
|
+
width "100%"
|
6
|
+
font_size 20
|
7
|
+
text_color :black
|
8
|
+
horizontal_alignment :center
|
9
|
+
padding 20
|
10
|
+
margin 20
|
11
|
+
border_width 2
|
12
|
+
border_color :gray
|
13
|
+
rounded_corner_radius 10
|
14
|
+
hover {
|
15
|
+
background_color "#ddddff"
|
16
|
+
}
|
17
|
+
}
|
@@ -1,21 +1,21 @@
|
|
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
|
sandbox {
|
5
|
-
width
|
6
|
-
height
|
7
|
-
vertical_alignment :top
|
5
|
+
width "100%"
|
6
|
+
height "100%"
|
7
|
+
vertical_alignment :top
|
8
8
|
}
|
9
9
|
|
10
10
|
arena {
|
11
|
-
width
|
11
|
+
width "100%"
|
12
12
|
height 800
|
13
13
|
horizontal_alignment :center
|
14
14
|
vertical_alignment :center
|
15
15
|
}
|
16
16
|
|
17
17
|
header {
|
18
|
-
width
|
18
|
+
width "100%"
|
19
19
|
height 100
|
20
20
|
background_color "#888"
|
21
21
|
border_color :blue
|
@@ -1,34 +1,41 @@
|
|
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 Fader
|
5
5
|
|
6
6
|
def self.extended(extended_block)
|
7
|
+
puts "#{self}.extended by #{extended_block}"
|
7
8
|
end
|
8
9
|
|
9
10
|
def mouse_entered(e)
|
10
11
|
@color = style.background_color
|
11
12
|
@base_alpha = (style.background_color[4..-1] + style.background_color[4..-1]).hex
|
12
|
-
|
13
|
+
|
14
|
+
@step = (255 - @base_alpha) / 50
|
13
15
|
@step = 1 if @step == 0
|
14
|
-
@
|
15
|
-
@
|
16
|
+
@current_alpha = @base_alpha
|
17
|
+
@lastUpdate = Time.now
|
18
|
+
@animation = animate(:updates_per_second => 25) do
|
19
|
+
puts "last update delay: #{Time.now - @lastUpdate}"
|
20
|
+
@lastUpdate = Time.now
|
21
|
+
@current_alpha += @step
|
22
|
+
if @current_alpha < @base_alpha
|
23
|
+
@current_alpha = @base_alpha
|
24
|
+
@step *= -1
|
25
|
+
end
|
26
|
+
if @current_alpha > 255
|
27
|
+
@current_alpha = 255
|
28
|
+
@step *= -1
|
29
|
+
end
|
30
|
+
update_with_alpha(@current_alpha)
|
31
|
+
end
|
16
32
|
end
|
17
33
|
|
18
34
|
def mouse_exited(e)
|
19
|
-
@
|
20
|
-
@thread.join
|
35
|
+
@animation.stop
|
21
36
|
style.background_color = @color
|
22
|
-
update
|
23
37
|
end
|
24
|
-
|
25
|
-
def do_shading
|
26
|
-
while @should_loop
|
27
|
-
shade_up
|
28
|
-
shade_down
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
38
|
+
|
32
39
|
def shade_up
|
33
40
|
current_alpha = @base_alpha
|
34
41
|
while @should_loop and current_alpha < 255
|
@@ -52,7 +59,6 @@ module Fader
|
|
52
59
|
alpha_string = "0" + alpha_string if alpha < 16
|
53
60
|
end
|
54
61
|
style.background_color = "#000000#{alpha_string}"
|
55
|
-
update_now
|
56
62
|
end
|
57
63
|
|
58
64
|
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
|
__ :name => "inspector"
|
@@ -10,7 +10,7 @@ prop_tree :id => "prop_tree" do
|
|
10
10
|
|
11
11
|
end
|
12
12
|
style_table :id => 'style_table' do
|
13
|
-
|
13
|
+
Limelight::Styles::Style::STYLE_LIST.each do |style|
|
14
14
|
style_row do
|
15
15
|
style_name :text => style.name
|
16
16
|
style_value :players => "text_box", :descriptor => style
|
@@ -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
|
inspector {
|
@@ -60,8 +60,8 @@ style_name {
|
|
60
60
|
height "100%"
|
61
61
|
vertical_alignment :center
|
62
62
|
horizontal_alignment :right
|
63
|
-
|
64
|
-
|
63
|
+
getHorizontalScrollBar :off
|
64
|
+
getVerticalScrollBar :off
|
65
65
|
}
|
66
66
|
|
67
67
|
style_value {
|
@@ -1,8 +1,11 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
1
4
|
module DownloadButton
|
2
5
|
|
3
6
|
def mouse_clicked(e)
|
4
7
|
url = scene.find("url_field").text
|
5
|
-
downloader =
|
8
|
+
downloader = Limelight::Context.instance.downloader
|
6
9
|
begin
|
7
10
|
file = downloader.download(url)
|
8
11
|
scene.open_production(file.absolute_path)
|
@@ -1,7 +1,10 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
1
4
|
module SandboxButton
|
2
5
|
|
3
6
|
def mouse_clicked(e)
|
4
|
-
sandbox_path = File.join(
|
7
|
+
sandbox_path = File.join($LIMELIGHT_HOME, "productions", "examples", "sandbox")
|
5
8
|
scene.open_production(sandbox_path)
|
6
9
|
end
|
7
10
|
|
@@ -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 => "root"
|
@@ -11,10 +11,8 @@ section do
|
|
11
11
|
end
|
12
12
|
section do
|
13
13
|
section_title :text => "2. Download and Open a Production From the Internet"
|
14
|
-
section_label :text => "URL
|
15
|
-
|
16
|
-
url_field :players => "text_box", :width => "500", :id => "url_field"
|
17
|
-
end
|
14
|
+
section_label :text => "URL:"
|
15
|
+
url_field :players => "text_box", :id => "url_field"
|
18
16
|
download_button :text => "Download"
|
19
17
|
end
|
20
18
|
section do
|
@@ -1,3 +1,6 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
1
4
|
root {
|
2
5
|
width "900"
|
3
6
|
height "800"
|
@@ -77,13 +80,10 @@ browse_button {
|
|
77
80
|
}
|
78
81
|
}
|
79
82
|
|
80
|
-
field_wrapper {
|
81
|
-
top_padding 4
|
82
|
-
}
|
83
|
-
|
84
83
|
url_field {
|
85
|
-
top_padding
|
84
|
+
top_padding 5
|
86
85
|
width 500
|
86
|
+
height 30
|
87
87
|
}
|
88
88
|
|
89
89
|
download_button {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
4
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
5
|
+
require 'limelight/scene'
|
6
|
+
require 'limelight/prop'
|
7
|
+
require 'limelight/builtin/players/button'
|
8
|
+
|
9
|
+
describe Limelight::Builtin::Players::Button do
|
10
|
+
|
11
|
+
before(:each) do
|
12
|
+
@scene = Limelight::Scene.new(:casting_director => make_mock("caster", :fill_cast => nil))
|
13
|
+
@prop = Limelight::Prop.new
|
14
|
+
@prop.include_player(Limelight::Builtin::Players::Button)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should have a Button" do
|
18
|
+
@prop.panel.children[0].class.should == Limelight::UI::Model::Inputs::ButtonPanel
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
|
+
|
4
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
5
|
+
require 'limelight/prop'
|
6
|
+
require 'limelight/builtin/players/check_box'
|
7
|
+
|
8
|
+
describe Limelight::Builtin::Players::CheckBox do
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@prop = Limelight::Prop.new
|
12
|
+
@prop.add_controller(Limelight::Builtin::Players::CheckBox)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should have a TextField" do
|
16
|
+
@prop.panel.children[0].class.should == Limelight::UI::Model::Inputs::CheckBoxPanel
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should handled checked state" do
|
20
|
+
@prop.checked?.should == false
|
21
|
+
@prop.checked.should == false
|
22
|
+
|
23
|
+
@prop.checked = true
|
24
|
+
|
25
|
+
@prop.checked?.should == true
|
26
|
+
@prop.checked.should == true
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|