Sha256: b926dadd64946173865f065a7e8bd1ef0e76a0f6c867693f25c8d90086d4c10c

Contents?: true

Size: 754 Bytes

Versions: 13

Compression:

Stored size: 754 Bytes

Contents

module OperaWatir
  class QuickTreeView < QuickWidget

    # @private
    # Checks the type of the widget is correct
    def correct_type?
      @element.getType == WIDGET_ENUM_MAP[:treeview]
    end

    #Should rather use what's already in browser
    # @private
    def treeitems
      treeitems = driver.getQuickWidgetList(driver.getQuickWindowName(window_id)).map do |java_widget|
        case java_widget.getType
          when QuickWidget::WIDGET_ENUM_MAP[:treeitem]
            QuickTreeItem.new(self,java_widget)
        end
      end.select { |item| item != nil }
      treeitems.select {|item| item.parent_name == name }
    end
    
    def num_treeitems
      treeitems.select { |item| item.position[1] == 0 }.length
    end
    
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
operawatir-0.4.3.pre1-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.2-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre7-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre6-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre5-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre4-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre3-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre2-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4.1.pre1-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.4-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.3.7.pre2-jruby lib/operawatir/quickwidgets/quick_treeview.rb
operawatir-0.3.7.pre1-jruby lib/operawatir/quickwidgets/quick_treeview.rb