class Lebowski::Foundation::Views::Support::ListItemViewCheckbox
Public Class Methods
new(parent, selector)
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 179 def initialize(parent, selector) @parent = parent @selector = selector end
Public Instance Methods
deselect()
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 211 def deselect() val = value return if val.nil? cq = @parent.core_query(@selector) if val == true @parent.scroll_to_visible cq[0].click elsif value == SC_MIXED_STATE @parent.scroll_to_visible cq[0].click cq[0].click end cq.done end
in_mixed_state?()
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 196 def in_mixed_state?() return (value == SC_MIXED_STATE) end
select()
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 200 def select() val = value return if val.nil? if val != true @parent.scroll_to_visible cq = @parent.core_query(@selector) cq[0].click cq.done end end
selected?()
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 191 def selected?() val = value return (val == true or val == SC_MIXED_STATE) end
value()
click to toggle source
# File lib/lebowski/foundation/views/list_item.rb, line 184 def value() key = @parent.content_checkbox_key return nil if key.nil? val = @parent["content.#{key}"] return val end