Sha256: e199130ff565833f32747713f8355a8de3e0d970eb0628ea7fc5c4067dbee8cd

Contents?: true

Size: 464 Bytes

Versions: 10

Compression:

Stored size: 464 Bytes

Contents

require 'clevic/swing/delegate'

module Clevic

  class BooleanDelegate < Delegate
    def init_component( cell_editor )
      editor.selected = attribute_value
    end

    def editor
      @editor ||= javax.swing.JCheckBox.new.tap do |e|
        # TODO this is common to all delegates
        e.horizontal_alignment = field.swing_alignment
      end
    end

    def value
      editor.selected
    end

    def native
      java.lang.Boolean
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
clevic-0.14.6 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.5 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.4 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.3 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.2 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.1 lib/clevic/swing/boolean_delegate.rb
clevic-0.14.0 lib/clevic/swing/boolean_delegate.rb
clevic-0.13.0.b12 lib/clevic/swing/boolean_delegate.rb
clevic-0.13.0.b11 lib/clevic/swing/boolean_delegate.rb
clevic-0.13.0.b10 lib/clevic/swing/boolean_delegate.rb