Class: RSwing::Components::Panel
- Includes:
- Container
- Defined in:
- lib/rswing/components/panel.rb
Constant Summary
Constants included from Events::ContainerEvents
Events::ContainerEvents::ContainerListener
Constants included from Events::FocusEvents
Events::FocusEvents::FocusListener
Constants included from Events::PropertyChanged
Events::PropertyChanged::PropertyChangeListener
Constants included from Events::InputMethodEvents
Events::InputMethodEvents::InputMethodListener
Constants included from Events::HierarchyBoundsEvents
Events::HierarchyBoundsEvents::HierarchyBoundsListener
Constants included from Events::KeyEvents
Events::KeyEvents::KeyListener
Constants included from Events::MouseWheelEvents
Events::MouseWheelEvents::MouseWheelListener
Constants included from Events::MouseMotionEvents
Events::MouseMotionEvents::MouseMotionListener
Constants included from Events::MouseEvents
Events::MouseEvents::MouseListener
Constants included from Events::ComponentEvents
Events::ComponentEvents::ComponentListener
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ Panel
constructor
A new instance of Panel.
Methods included from Container
#[], #add, add_if_requested, #add_with_name, #components, #remove
Methods included from Events::ContainerEvents
Methods included from Events::FocusEvents
Methods included from Events::InputMethodEvents
Methods included from Events::HierarchyBoundsEvents
Methods included from Events::KeyEvents
Methods included from Events::MouseMotionEvents
Methods included from Events::MouseEvents
Methods included from Events::ComponentEvents
Constructor Details
#initialize(options = {}, &block) ⇒ Panel
Returns a new instance of Panel.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rswing/components/panel.rb', line 27 def initialize( = {}, &block) super(Options.value_for( => :layout_manager), Options.value_for( => :double_buffer)) if (border_title = Options.value_for( => :title)) border = BorderFactory.createTitledBorder(border_title) border.title_font = Font.new("Arial", Font::BOLD, 14) self.border = border end # call block with current object, if given if block_given? yield self end Container.add_if_requested(self, ) end |