Class: RPV::Swing::SwingSet::FormattedTextField

Inherits:
Object
  • Object
show all
Includes:
DefaultFont
Defined in:
lib/rpv/swing/swingset.rb

Overview

TODO wtf? irb(main):001:0> a = RPV::Swing::SwingSet::FormattedTextField.new(TimeFormatter.new)

> #<RPV::Swing::SwingSet::FormattedTextField:0x565902ca>

irb(main):002:0> a.formatter

> #<TimeFormatter:0x6c533246 @document_filter=#<TimeDocumentFilter:0x15e193f2>, @navigation_filter=#<TimeNavigationFilter:0xcb80017>>

irb(main):003:0> a.set_value(20)

> nil

irb(main):004:0> a.formatter

> #<Java::JavaxSwingText::NumberFormatter:0xf4f7a86>

Instance Method Summary collapse

Methods included from DefaultFont

included

Constructor Details

#initialize(formatter) {|_self| ... } ⇒ FormattedTextField

Returns a new instance of FormattedTextField.

Yields:

  • (_self)

Yield Parameters:



175
176
177
178
179
180
# File 'lib/rpv/swing/swingset.rb', line 175

def initialize(formatter)
  super()
  self.formatter = formatter
  self.font = FormattedTextField.default_font
  yield self if block_given?
end