Class: Java::JavaxSwing::JLabel
- Inherits:
-
Object
- Object
- Java::JavaxSwing::JLabel
- Defined in:
- lib/swing_paradise/java_classes/jlabel/jlabel.rb
Overview
#
require ‘swing_paradise/java_classes/jlabel/jlabel.rb’
#
Instance Method Summary collapse
-
#center ⇒ Object
# === center ========================================================================= #.
-
#dimensions(hash = { x_axis: 10, y_axis: 20, width: 300, height: 50 }) ⇒ Object
# === dimensions.
-
#do_markify ⇒ Object
# === do_markify ========================================================================= #.
-
#make_selectable ⇒ Object
# === make_selectable ========================================================================= #.
-
#set_text(i) ⇒ Object
# === set_text ========================================================================= #.
Instance Method Details
#center ⇒ Object
#
center
#
14 15 16 |
# File 'lib/swing_paradise/java_classes/jlabel/jlabel.rb', line 14 def center setAlignmentX(Component::CENTER_ALIGNMENT) 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.
#
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/swing_paradise/java_classes/jlabel/jlabel.rb', line 24 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 |
#do_markify ⇒ Object
#
do_markify
#
58 59 |
# File 'lib/swing_paradise/java_classes/jlabel/jlabel.rb', line 58 def do_markify end |
#make_selectable ⇒ Object
#
make_selectable
#
64 65 |
# File 'lib/swing_paradise/java_classes/jlabel/jlabel.rb', line 64 def make_selectable end |
#set_text(i) ⇒ Object
#
set_text
#
46 47 48 49 |
# File 'lib/swing_paradise/java_classes/jlabel/jlabel.rb', line 46 def set_text(i) i = PdfParadise.remove_html(i) original_set_text(i) end |