Class: Java::JavaxSwing::JPanel
- Inherits:
-
Object
- Object
- Java::JavaxSwing::JPanel
- Defined in:
- lib/swing_paradise/java_classes/jpanel/jpanel.rb
Instance Method Summary collapse
-
#add_all(*i) ⇒ Object
(also: #batch_add)
# === add_all ========================================================================= #.
-
#dimensions(hash = { x_axis: 10, y_axis: 20, width: 300, height: 50 }) ⇒ Object
# === dimensions.
-
#no_layout ⇒ Object
# === no_layout ========================================================================= #.
Instance Method Details
#add_all(*i) ⇒ Object Also known as: batch_add
#
add_all
#
23 24 25 26 27 |
# File 'lib/swing_paradise/java_classes/jpanel/jpanel.rb', line 23 def add_all(*i) i.flatten.each {|| add() } end |
#dimensions(hash = { x_axis: 10, y_axis: 20, width: 300, height: 50 }) ⇒ Object
#
dimensions
This is just a wrapper over setBounds() to allow us to work with a Hash instead.
#
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/swing_paradise/java_classes/jpanel/jpanel.rb', line 42 def dimensions( hash = { x_axis: 10, y_axis: 20, width: 300, height: 50 } ) # is: x-coordinate, y-coordinate, width, height) setBounds( hash[:x_axis], hash[:y_axis], hash[:width], hash[:height] ) end |
#no_layout ⇒ Object
#
no_layout
#
32 33 34 |
# File 'lib/swing_paradise/java_classes/jpanel/jpanel.rb', line 32 def no_layout setLayout(nil) end |