Class: Glimmer::SWT::EventListenerProxy
- Inherits:
-
Object
- Object
- Glimmer::SWT::EventListenerProxy
- Defined in:
- lib/glimmer/swt/event_listener_proxy.rb
Instance Attribute Summary collapse
-
#dom_element ⇒ Object
readonly
Returns the value of attribute dom_element.
-
#element_proxy ⇒ Object
readonly
Returns the value of attribute element_proxy.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#listener ⇒ Object
readonly
Returns the value of attribute listener.
-
#original_event_listener ⇒ Object
readonly
Returns the value of attribute original_event_listener.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(element_proxy:, event:, dom_element:, selector:, listener:) ⇒ EventListenerProxy
constructor
A new instance of EventListenerProxy.
- #register ⇒ Object (also: #observe, #reregister)
- #unregister ⇒ Object (also: #unobserve, #deregister)
Constructor Details
#initialize(element_proxy:, event:, dom_element:, selector:, listener:) ⇒ EventListenerProxy
Returns a new instance of EventListenerProxy.
6 7 8 9 10 11 12 13 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 6 def initialize(element_proxy:, event:, dom_element:, selector:, listener:) @element_proxy = element_proxy @event = event @dom_element = dom_element @selector = selector @listener = listener @original_event_listener = original_event_listener end |
Instance Attribute Details
#dom_element ⇒ Object (readonly)
Returns the value of attribute dom_element.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def dom_element @dom_element end |
#element_proxy ⇒ Object (readonly)
Returns the value of attribute element_proxy.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def element_proxy @element_proxy end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def event @event end |
#listener ⇒ Object (readonly)
Returns the value of attribute listener.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def listener @listener end |
#original_event_listener ⇒ Object (readonly)
Returns the value of attribute original_event_listener.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def original_event_listener @original_event_listener end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
4 5 6 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 4 def selector @selector end |
Instance Method Details
#register ⇒ Object Also known as: observe, reregister
15 16 17 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 15 def register @dom_element.on(@event, @delegate) end |
#unregister ⇒ Object Also known as: unobserve, deregister
21 22 23 |
# File 'lib/glimmer/swt/event_listener_proxy.rb', line 21 def unregister @dom_element.off(@event, @delegate) end |