Class: RSwing::Components::TextField
- Inherits:
-
JTextField
- Object
- RSwing::Components::TextField
- Includes:
- Component
- Defined in:
- lib/rswing/components/text_field.rb
Constant Summary
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 = {}) ⇒ TextField
constructor
Valid options are: 1.
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 = {}) ⇒ TextField
Valid options are:
-
:text => "text"(default: “”) -
:columns => 5(default: 10) -
:doc => nil(default: nil) -
:font => nil(default nil) -
:visible => false(default: true) -
:editable => false(default: true) -
:belongs_to => container(default: nil) -
:name => :text_field(default: nil)
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rswing/components/text_field.rb', line 36 def initialize( = {}) if(.empty?) super() else if(doc = Options.value_for( => :doc)) super(doc, Options.value_for( => :text), Options.value_for( => :columns)) else super(Options.value_for( => :text), Options.value_for( => :columns)) end end Container.add_if_requested(self, ) end |