limelight 0.1.0-java → 0.2.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/lib/limelight/players.rb
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
require 'limelight/players/button'
|
|
5
|
-
require 'limelight/players/check_box'
|
|
6
|
-
require 'limelight/players/combo_box'
|
|
7
|
-
require 'limelight/players/radio_button'
|
|
8
|
-
require 'limelight/players/text_area'
|
|
9
|
-
require 'limelight/players/text_box'
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module Button
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
painter = Java.limelight.ui.painting.ButtonPainter.new(prop.panel)
|
|
12
|
-
prop.button = painter.button
|
|
13
|
-
prop.panel.painters << painter
|
|
14
|
-
prop.panel.clear_event_listeners
|
|
15
|
-
set_default_styles(prop)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def set_default_styles(prop)
|
|
19
|
-
prop.style.width = "100"
|
|
20
|
-
prop.style.height = "25"
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
attr_accessor :button
|
|
25
|
-
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module CheckBox
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
painter = Java.limelight.ui.painting.CheckBoxPainter.new(prop.panel)
|
|
12
|
-
prop.check_box = painter.check_box
|
|
13
|
-
prop.panel.painters << painter
|
|
14
|
-
prop.panel.clear_event_listeners
|
|
15
|
-
set_default_styles(prop)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def set_default_styles(prop)
|
|
19
|
-
prop.style.width = "22"
|
|
20
|
-
prop.style.height = "22"
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
attr_accessor :check_box
|
|
25
|
-
|
|
26
|
-
def checked=(value)
|
|
27
|
-
check_box.selected = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def checked
|
|
31
|
-
return check_box.is_selected
|
|
32
|
-
end
|
|
33
|
-
alias :checked? :checked
|
|
34
|
-
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
end
|
|
38
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module ComboBox
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
painter = Java.limelight.ui.painting.ComboBoxPainter.new(prop.panel)
|
|
12
|
-
prop.combo_box = painter.combo_box
|
|
13
|
-
prop.panel.painters << painter
|
|
14
|
-
prop.panel.clear_event_listeners
|
|
15
|
-
set_default_styles(prop)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def set_default_styles(prop)
|
|
19
|
-
prop.style.width = "120"
|
|
20
|
-
prop.style.height = "22"
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
attr_accessor :combo_box
|
|
25
|
-
|
|
26
|
-
def choices=(value)
|
|
27
|
-
value = eval(value) if value.is_a? String
|
|
28
|
-
raise "Invalid choices type: #{value.class}. Choices have to be an array." if !value.is_a?(Array)
|
|
29
|
-
combo_box.remove_all_items
|
|
30
|
-
value.each { |choice| combo_box.add_item(choice) }
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def value=(text)
|
|
34
|
-
self.text = text
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def value
|
|
38
|
-
return self.text
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
end
|
|
44
|
-
end
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module RadioButton
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
painter = Java.limelight.ui.painting.RadioButtonPainter.new(prop.panel)
|
|
12
|
-
prop.radio_button = painter.radio_button
|
|
13
|
-
prop.panel.painters << painter
|
|
14
|
-
prop.panel.clear_event_listeners
|
|
15
|
-
set_default_styles(prop)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def set_default_styles(prop)
|
|
19
|
-
prop.style.width = "22"
|
|
20
|
-
prop.style.height = "22"
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
attr_accessor :radio_button
|
|
25
|
-
attr_reader :button_group
|
|
26
|
-
|
|
27
|
-
def group=(group_name)
|
|
28
|
-
@button_group = scene.button_groups[group_name]
|
|
29
|
-
@button_group.add(@radio_button)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def checked=(value)
|
|
33
|
-
@radio_button.selected = value
|
|
34
|
-
end
|
|
35
|
-
alias :selected= :checked=
|
|
36
|
-
|
|
37
|
-
def checked
|
|
38
|
-
return @radio_button.is_selected
|
|
39
|
-
end
|
|
40
|
-
alias :checked? :checked
|
|
41
|
-
alias :selected? :checked
|
|
42
|
-
alias :selected :checked
|
|
43
|
-
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
end
|
|
47
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module TextArea
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
prop.panel.painters << Java.limelight.ui.painting.TextAreaPainter.new(prop.panel)
|
|
12
|
-
prop.panel.clear_event_listeners
|
|
13
|
-
set_default_styles(prop)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def set_default_styles(prop)
|
|
17
|
-
prop.style.width ||= "240"
|
|
18
|
-
prop.style.height ||= "88"
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
2
|
-
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
-
|
|
4
|
-
module Limelight
|
|
5
|
-
module Players
|
|
6
|
-
|
|
7
|
-
module TextBox
|
|
8
|
-
class << self
|
|
9
|
-
def extended(prop)
|
|
10
|
-
prop.panel.painters.clear
|
|
11
|
-
prop.panel.painters << Java.limelight.ui.painting.TextBoxPainter.new(prop.panel)
|
|
12
|
-
prop.panel.clear_event_listeners
|
|
13
|
-
set_default_styles(prop)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def set_default_styles(prop)
|
|
17
|
-
prop.style.width = "120"
|
|
18
|
-
prop.style.height = "22"
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
end
|
data/spec/players/button_spec.rb
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
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/players/button'
|
|
8
|
-
|
|
9
|
-
describe Limelight::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::Players::Button)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it "should get rid of the all painters and add a ButtonPainter" do
|
|
18
|
-
@prop.panel.painters.size.should == 1
|
|
19
|
-
@prop.panel.painters.last.class.should == Java::limelight.ui.painting.ButtonPainter
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
it "should clear event listeners on the panel" do
|
|
23
|
-
@prop.panel.mouse_listeners.length.should == 0
|
|
24
|
-
@prop.panel.key_listeners.length.should == 0
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
it "should have a Button" do
|
|
28
|
-
@prop.panel.components[0].class.should == javax.swing.JButton
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
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/players/check_box'
|
|
7
|
-
|
|
8
|
-
describe Limelight::Players::CheckBox do
|
|
9
|
-
|
|
10
|
-
before(:each) do
|
|
11
|
-
@prop = Limelight::Prop.new
|
|
12
|
-
@prop.add_controller(Limelight::Players::CheckBox)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it "should get rid of the all painters and add a CheckBoxPainter" do
|
|
16
|
-
@prop.panel.painters.size.should == 1
|
|
17
|
-
@prop.panel.painters.last.class.should == Java::limelight.ui.painting.CheckBoxPainter
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it "should clear event listeners on the panel" do
|
|
21
|
-
@prop.panel.mouse_listeners.length.should == 0
|
|
22
|
-
@prop.panel.key_listeners.length.should == 0
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "should have a TextField" do
|
|
26
|
-
@prop.panel.components[0].class.should == javax.swing.JCheckBox
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it "should handled checked state" do
|
|
30
|
-
@prop.checked?.should == false
|
|
31
|
-
@prop.checked.should == false
|
|
32
|
-
|
|
33
|
-
@prop.checked = true
|
|
34
|
-
|
|
35
|
-
@prop.checked?.should == true
|
|
36
|
-
@prop.checked.should == true
|
|
37
|
-
@prop.panel.components[0].is_selected.should == true
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
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/players/combo_box'
|
|
8
|
-
|
|
9
|
-
describe Limelight::Players::ComboBox do
|
|
10
|
-
|
|
11
|
-
before(:each) do
|
|
12
|
-
@scene = Limelight::Scene.new(:casting_director => make_mock("caster", :fill_cast => nil))
|
|
13
|
-
@prop = Limelight::Prop.new(:scene => @scene)
|
|
14
|
-
@prop.include_player(Limelight::Players::ComboBox)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it "should get rid of the all painters and add a ComboBoxPainter" do
|
|
18
|
-
@prop.panel.painters.size.should == 1
|
|
19
|
-
@prop.panel.painters.last.class.should == Java::limelight.ui.painting.ComboBoxPainter
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
it "should clear event listeners on the panel" do
|
|
23
|
-
@prop.panel.mouse_listeners.length.should == 0
|
|
24
|
-
@prop.panel.key_listeners.length.should == 0
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
it "should have a ComboBox" do
|
|
28
|
-
@prop.panel.components[0].class.should == javax.swing.JComboBox
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
it "should have settable value" do
|
|
32
|
-
@prop.choices = ["1", "2", "3"]
|
|
33
|
-
@prop.value.should == "1"
|
|
34
|
-
|
|
35
|
-
@prop.value = "3"
|
|
36
|
-
@prop.value.should == "3"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
end
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
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/players/text_area'
|
|
7
|
-
|
|
8
|
-
describe Limelight::Players::TextArea do
|
|
9
|
-
|
|
10
|
-
before(:each) do
|
|
11
|
-
@prop = Limelight::Prop.new
|
|
12
|
-
@prop.add_controller(Limelight::Players::TextArea)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it "should get rid of the all painters and add a TextAreaPainter" do
|
|
16
|
-
@prop.panel.painters.size.should == 1
|
|
17
|
-
@prop.panel.painters.last.class.should == Java::limelight.ui.painting.TextAreaPainter
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it "should clear event listeners on the panel" do
|
|
21
|
-
@prop.panel.mouse_listeners.length.should == 0
|
|
22
|
-
@prop.panel.key_listeners.length.should == 0
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "should have a JTextArea" do
|
|
26
|
-
@prop.panel.components[0].class.should == javax.swing.JTextArea
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it "should use the TextArea for the text accessor" do
|
|
30
|
-
@prop.text = "blah"
|
|
31
|
-
@prop.panel.components[0].text.should == "blah"
|
|
32
|
-
|
|
33
|
-
@prop.panel.components[0].text = "harumph"
|
|
34
|
-
@prop.text.should == "harumph"
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
end
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc.
|
|
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/players/text_box'
|
|
7
|
-
|
|
8
|
-
describe Limelight::Players::TextBox do
|
|
9
|
-
|
|
10
|
-
before(:each) do
|
|
11
|
-
@prop = Limelight::Prop.new
|
|
12
|
-
@prop.add_controller(Limelight::Players::TextBox)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it "should get rid of the all painters and add a TextboxPainter" do
|
|
16
|
-
@prop.panel.painters.size.should == 1
|
|
17
|
-
@prop.panel.painters.last.class.should == Java::limelight.ui.painting.TextBoxPainter
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it "should clear event listeners on the panel" do
|
|
21
|
-
@prop.panel.mouse_listeners.length.should == 0
|
|
22
|
-
@prop.panel.key_listeners.length.should == 0
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "should have a TextField" do
|
|
26
|
-
@prop.panel.components[0].class.should == javax.swing.JTextField
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it "should use the TextField for the text accessor" do
|
|
30
|
-
@prop.text = "blah"
|
|
31
|
-
@prop.panel.components[0].text.should == "blah"
|
|
32
|
-
|
|
33
|
-
@prop.panel.components[0].text = "harumph"
|
|
34
|
-
@prop.text.should == "harumph"
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
end
|