Module: Shoes::Swt

Extended by:
Common::Registration
Defined in:
shoes-swt/lib/shoes/swt.rb,
shoes-swt/lib/shoes/swt/app.rb,
shoes-swt/lib/shoes/swt/arc.rb,
shoes-swt/lib/shoes/swt/font.rb,
shoes-swt/lib/shoes/swt/line.rb,
shoes-swt/lib/shoes/swt/link.rb,
shoes-swt/lib/shoes/swt/oval.rb,
shoes-swt/lib/shoes/swt/rect.rb,
shoes-swt/lib/shoes/swt/slot.rb,
shoes-swt/lib/shoes/swt/star.rb,
shoes-swt/lib/shoes/swt/arrow.rb,
shoes-swt/lib/shoes/swt/check.rb,
shoes-swt/lib/shoes/swt/color.rb,
shoes-swt/lib/shoes/swt/image.rb,
shoes-swt/lib/shoes/swt/radio.rb,
shoes-swt/lib/shoes/swt/shape.rb,
shoes-swt/lib/shoes/swt/sound.rb,
shoes-swt/lib/shoes/swt/timer.rb,
shoes-swt/lib/shoes/swt/border.rb,
shoes-swt/lib/shoes/swt/button.rb,
shoes-swt/lib/shoes/swt/dialog.rb,
shoes-swt/lib/shoes/swt/version.rb,
shoes-swt/lib/shoes/swt/download.rb,
shoes-swt/lib/shoes/swt/gradient.rb,
shoes-swt/lib/shoes/swt/list_box.rb,
shoes-swt/lib/shoes/swt/packager.rb,
shoes-swt/lib/shoes/swt/progress.rb,
shoes-swt/lib/shoes/swt/animation.rb,
shoes-swt/lib/shoes/swt/input_box.rb,
shoes-swt/lib/shoes/swt/background.rb,
shoes-swt/lib/shoes/swt/swt_button.rb,
shoes-swt/lib/shoes/swt/text_block.rb,
shoes-swt/lib/shoes/swt/arc_painter.rb,
shoes-swt/lib/shoes/swt/common/fill.rb,
shoes-swt/lib/shoes/swt/radio_group.rb,
shoes-swt/lib/shoes/swt/check_button.rb,
shoes-swt/lib/shoes/swt/common/focus.rb,
shoes-swt/lib/shoes/swt/key_listener.rb,
shoes-swt/lib/shoes/swt/line_painter.rb,
shoes-swt/lib/shoes/swt/link_segment.rb,
shoes-swt/lib/shoes/swt/oval_painter.rb,
shoes-swt/lib/shoes/swt/rect_painter.rb,
shoes-swt/lib/shoes/swt/shoes_layout.rb,
shoes-swt/lib/shoes/swt/star_painter.rb,
shoes-swt/lib/shoes/swt/arrow_painter.rb,
shoes-swt/lib/shoes/swt/color_factory.rb,
shoes-swt/lib/shoes/swt/common/remove.rb,
shoes-swt/lib/shoes/swt/common/stroke.rb,
shoes-swt/lib/shoes/swt/image_painter.rb,
shoes-swt/lib/shoes/swt/image_pattern.rb,
shoes-swt/lib/shoes/swt/shape_painter.rb,
shoes-swt/lib/shoes/swt/click_listener.rb,
shoes-swt/lib/shoes/swt/common/painter.rb,
shoes-swt/lib/shoes/swt/common/resource.rb,
shoes-swt/lib/shoes/swt/common/clickable.rb,
shoes-swt/lib/shoes/swt/common/container.rb,
shoes-swt/lib/shoes/swt/common/translate.rb,
shoes-swt/lib/shoes/swt/redrawing_aspect.rb,
shoes-swt/lib/shoes/swt/common/visibility.rb,
shoes-swt/lib/shoes/swt/text_block/fitter.rb,
shoes-swt/lib/shoes/swt/text_block/painter.rb,
shoes-swt/lib/shoes/swt/disposed_protection.rb,
shoes-swt/lib/shoes/swt/mouse_move_listener.rb,
shoes-swt/lib/shoes/swt/common/image_handling.rb,
shoes-swt/lib/shoes/swt/common/update_position.rb,
shoes-swt/lib/shoes/swt/text_block/text_segment.rb,
shoes-swt/lib/shoes/swt/common/selection_listener.rb,
shoes-swt/lib/shoes/swt/text_block/cursor_painter.rb,
shoes-swt/lib/shoes/swt/text_block/text_font_factory.rb,
shoes-swt/lib/shoes/swt/text_block/text_style_factory.rb,
shoes-swt/lib/shoes/swt/common/painter_updates_position.rb,
shoes-swt/lib/shoes/swt/text_block/centered_text_segment.rb,
shoes-swt/lib/shoes/swt/text_block/text_segment_collection.rb

Defined Under Namespace

Modules: Common, DisposedProtection, Font, Shoes Classes: Animation, App, Arc, ArcPainter, Arrow, ArrowPainter, Background, Banner, Border, Button, Caption, Check, CheckButton, ClickListener, Color, ColorFactory, Dialog, Download, EditBox, EditLine, Flow, Gradient, Image, ImagePainter, ImagePattern, InputBox, Inscription, KeyListener, Keypress, Keyrelease, Line, LinePainter, Link, LinkSegment, ListBox, MouseListener, MouseMoveListener, NullColor, Oval, OvalPainter, Packager, Para, Progress, Radio, RadioGroup, Rect, RectPainter, RedrawingAspect, SelectionListener, Shape, ShapePainter, ShellControlListener, ShoesLayout, Slot, Sound, Stack, Star, StarPainter, Subtitle, SwtButton, Tagline, TextBlock, TextFontFactory, TextStyleFactory, Timer, Title, Widget

Constant Summary collapse

ICON =
shoes_icon
VERSION =
"4.0.0.rc1"

Instance Attribute Summary

Attributes included from Common::Registration

#main_app

Class Method Summary collapse

Methods included from Common::Registration

apps, register, register_main_app, unregister, unregister_all

Class Method Details

.initialize_backendObject


49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'shoes-swt/lib/shoes/swt.rb', line 49

def self.initialize_backend
  return if defined?(@initialized) && @initialized
  @initialized = true

  ::Shoes.configuration.backend = :swt

  require 'shoes/swt/disposed_protection'
  require 'shoes/swt/click_listener'
  require 'shoes/swt/color'
  require 'shoes/swt/color_factory'
  require 'shoes/swt/common/remove'
  require 'shoes/swt/common/clickable'
  require 'shoes/swt/common/container'
  require 'shoes/swt/common/fill'
  require 'shoes/swt/common/focus'
  require 'shoes/swt/common/image_handling'
  require 'shoes/swt/common/resource'
  require 'shoes/swt/common/painter'
  require 'shoes/swt/common/painter_updates_position'
  require 'shoes/swt/common/visibility'
  require 'shoes/swt/common/selection_listener'
  require 'shoes/swt/common/stroke'
  require 'shoes/swt/common/translate'
  require 'shoes/swt/common/update_position'

  require 'shoes/swt/input_box'
  require 'shoes/swt/arc_painter.rb'
  require 'shoes/swt/arrow_painter.rb'
  require 'shoes/swt/line_painter.rb'
  require 'shoes/swt/oval_painter.rb'
  require 'shoes/swt/rect_painter.rb'
  require 'shoes/swt/shape_painter.rb'
  require 'shoes/swt/star_painter.rb'
  require 'shoes/swt/swt_button'
  require 'shoes/swt/check_button'
  require 'shoes/swt/radio_group'
  require 'shoes/swt/text_block/painter'

  require 'shoes/swt/app'
  require 'shoes/swt/animation'
  require 'shoes/swt/arc'
  require 'shoes/swt/arrow'
  require 'shoes/swt/background'
  require 'shoes/swt/border'
  require 'shoes/swt/button'
  require 'shoes/swt/check'
  require 'shoes/swt/dialog'
  require 'shoes/swt/download'
  require 'shoes/swt/font'
  require 'shoes/swt/gradient'
  require 'shoes/swt/image'
  require 'shoes/swt/image_painter'
  require 'shoes/swt/image_pattern'
  require 'shoes/swt/key_listener'
  require 'shoes/swt/line'
  require 'shoes/swt/link'
  require 'shoes/swt/link_segment'
  require 'shoes/swt/list_box'
  require 'shoes/swt/mouse_move_listener'
  require 'shoes/swt/oval'
  require 'shoes/swt/progress'
  require 'shoes/swt/radio'
  require 'shoes/swt/rect'
  require 'shoes/swt/shape'
  require 'shoes/swt/shoes_layout'
  require 'shoes/swt/slot'
  require 'shoes/swt/star'
  require 'shoes/swt/sound'
  require 'shoes/swt/text_block'
  require 'shoes/swt/timer'

  require 'shoes/swt/text_block/text_segment'
  require 'shoes/swt/text_block/centered_text_segment'
  require 'shoes/swt/text_block/text_segment_collection'
  require 'shoes/swt/text_block/cursor_painter'
  require 'shoes/swt/text_block/fitter'
  require 'shoes/swt/text_block/text_font_factory'
  require 'shoes/swt/text_block/text_style_factory'

  require 'shoes/swt/packager'

  require 'shoes/swt/tooling/leak_hunter' if ENV["LEAK_HUNTER"]

  # redrawing aspect needs to know all the classes
  require 'shoes/swt/redrawing_aspect'

  @initialized = true
rescue Java::OrgEclipseSwt::SWTException => e
  if e.message == "Invalid thread access"
    puts "Ooops, we couldn't start properly. We'll try again."
    puts ""
    puts "To avoid this restarting behavior, try one of the following:"
    puts "  * Use the shoes executable to start your app"
    puts "  * Add JRUBY_OPTS='-J-XstartOnFirstThread' to your environment before starting."

    `JRUBY_OPTS=-J-XstartOnFirstThread #{$PROGRAM_NAME} #{ARGV.join(" ")}`
    exit $CHILD_STATUS.exitstatus
  end
end