Class: Lebowski::Foundation::Views::ListItemView
- Inherits:
-
View
- Object
- ProxyObject
- SCObject
- View
- Lebowski::Foundation::Views::ListItemView
- Includes:
- Lebowski::Foundation, Mixins::InlineTextFieldSupport, Mixins::ListItemViewSupport
- Defined in:
- lib/lebowski/foundation/views/list_item.rb
Overview
Represents a proxy to a SproutCore button view (SC.ListItemView)
Constant Summary
Constant Summary
Constants included from Lebowski::Foundation
SC_BRANCH_CLOSED, SC_BRANCH_OPEN, SC_BUTTON1_STATUS, SC_BUTTON2_STATUS, SC_BUTTON3_STATUS, SC_LEAF_NODE, SC_MIXED_STATE, SC_PICKER_FIXED, SC_PICKER_MENU, SC_PICKER_POINTER, SC_T_ARRAY, SC_T_BOOL, SC_T_CLASS, SC_T_ERROR, SC_T_FUNCTION, SC_T_HASH, SC_T_NULL, SC_T_NUMBER, SC_T_OBJECT, SC_T_STRING, SC_T_UNDEFINED
Constants included from Mixins::StallSupport
Mixins::StallSupport::DEFAULT_KEY_STALLS, Mixins::StallSupport::DEFAULT_STALL
Constants included from Mixins::WaitActions
Mixins::WaitActions::DEFAULT_TIMEOUT
Instance Attribute Summary
Attributes inherited from ProxyObject
#driver, #name, #parent, #rel_path
Instance Method Summary (collapse)
- - (Object) checkbox
- - (Object) collapse
- - (Object) content_checkbox_key
- - (Object) content_icon_key
- - (Object) content_right_icon_key
- - (Object) content_value_key
- - (Object) disclosure
- - (Object) edit_label(text)
- - (Object) expand
- - (Boolean) has_checkbox?
- - (Boolean) has_disclosure?
- - (Boolean) has_icon?
- - (Boolean) has_right_icon?
- - (Object) icon
- - (Object) right_icon
Methods included from Mixins::ListItemViewSupport
#apply_drag_after, #apply_drag_before, #can_drag_after?, #can_drag_before?, #row_height
Methods included from Mixins::CollectionItemViewSupport
#apply_drag_after, #apply_drag_before, #can_drag_after?, #can_drag_before?, #click, #deselect, #has_collection_item_view_support, #index, #next_item_view, #previous_item_view, #select, #select_add, #selected?
Methods included from Mixins::InlineTextFieldSupport
Methods inherited from View
#abs_path, #action_locator_args, #action_target, #assigned_layer_id?, #child_views, #core_query, #frame, #height, #layer, #layer_id, #position, #scroll_to_visible, #scrollable_parent_view, #width
Methods included from Mixins::DelegateSupport
Methods included from Mixins::UserActions
#basic_click, #click, #click_at, #double_click, #double_click_at, #drag, #drag_after, #drag_before, #drag_on_to, #drag_to, #drag_to_end_of, #drag_to_start_of, #focus, #key_down, #key_up, #mouse_down, #mouse_down_at, #mouse_move, #mouse_move_at, #mouse_up, #mouse_up_at, #mouse_wheel_delta_x, #mouse_wheel_delta_y, #right_click, #right_click_at, #right_mouse_down, #right_mouse_down_at, #right_mouse_up, #right_mouse_up_at, #type, #type_key
Methods included from Mixins::StallSupport
adjust_all_stalls, adjust_default_key_stall, adjust_default_stall, reset, #stall
Methods included from Mixins::KeyCheck
Methods included from Mixins::PositionedElement
#height, #position, #position_relative_to, #scroll_to_visible, #width
Methods inherited from SCObject
#has_represented_sc_class?, #kind_of_represented_sc_class?, represented_sc_class, #represented_sc_class, representing_sc_class
Methods inherited from ProxyObject
#==, #[], #abs_path, #abs_path_with, #define, #define_proxy, #init_ext, #initialize, #method_missing, #none?, #object?, #proxy, #represent_as, #sc_all_classes, #sc_class, #sc_guid, #sc_kind_of?, #sc_path_defined?, #sc_type_of, #unravel_relative_path
Methods included from Mixins::DefinePathsSupport
#define_path, #define_paths_for, #defined_path, #defined_paths, #path_defined?, #root_defined_path_part, #root_defined_path_part=
Methods included from Mixins::WaitActions
Constructor Details
This class inherits a constructor from Lebowski::Foundation::ProxyObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lebowski::Foundation::ProxyObject
Instance Method Details
- (Object) checkbox
58 59 60 61 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 58 def checkbox() @checkbox = create_checkbox(checkbox_selector) if @checkbox.nil? return has_checkbox? ? @checkbox : nil end |
- (Object) collapse
77 78 79 80 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 77 def collapse() dis = disclosure dis.toggle_off if (not dis.nil?) end |
- (Object) content_checkbox_key
20 21 22 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 20 def content_checkbox_key() return get_delegate_property('contentCheckboxKey', 'displayDelegate') end |
- (Object) content_icon_key
28 29 30 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 28 def content_icon_key() return get_delegate_property('contentIconKey', 'displayDelegate') end |
- (Object) content_right_icon_key
32 33 34 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 32 def content_right_icon_key() return get_delegate_property('contentRightIconKey', 'displayDelegate') end |
- (Object) content_value_key
24 25 26 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 24 def content_value_key() return get_delegate_property('contentValueKey', 'displayDelegate') end |
- (Object) disclosure
67 68 69 70 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 67 def disclosure() @disclosure = create_disclosure(disclosure_selector) if @disclosure.nil? return has_disclosure? ? @disclosure : nil end |
- (Object) edit_label(text)
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 82 def edit_label(text) return if (not self['contentIsEditable'] or content_value_key.nil?) scroll_to_visible click select cq = core_query(label_selector) if cq.size > 0 cq[0].click edit_inline_text_field text click end cq.done end |
- (Object) expand
72 73 74 75 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 72 def () dis = disclosure dis.toggle_on if (not dis.nil?) end |
- (Boolean) has_checkbox?
54 55 56 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 54 def has_checkbox?() return (not content_checkbox_key.nil?) end |
- (Boolean) has_disclosure?
63 64 65 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 63 def has_disclosure?() return (self['disclosureState'] != SC_LEAF_NODE) end |
- (Boolean) has_icon?
36 37 38 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 36 def has_icon?() return (self['hasContentIcon'] == true) end |
- (Boolean) has_right_icon?
45 46 47 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 45 def has_right_icon?() return (self['hasContentRightIcon'] == true) end |
- (Object) icon
40 41 42 43 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 40 def icon() @icon = create_icon(icon_selector) if @icon.nil? return has_icon? ? @icon : nil end |
- (Object) right_icon
49 50 51 52 |
# File 'lib/lebowski/foundation/views/list_item.rb', line 49 def right_icon() @right_icon = create_right_icon(right_icon_selector) if @right_icon.nil? return has_right_icon? ? @right_icon : nil end |