class Lebowski::SCUI::Views::ColorWellView

Represents a proxy to a SCUI color well view (SCUI.ColorWell)

Constants

COLORS

Public Instance Methods

color?(value) click to toggle source
# File lib/lebowski/scui/views/color_well.rb, line 23
def color?(value)
  value = COLORS[value] if value.kind_of? Symbol
  return (text_box.value == value)
end
color_selected?() click to toggle source
# File lib/lebowski/scui/views/color_well.rb, line 19
def color_selected?
  return (not (text_box.value.nil? || text_box.value =='#eee'))
end
select_color(value) click to toggle source
# File lib/lebowski/scui/views/color_well.rb, line 28
def select_color(value)
  value = COLORS[value] if value.kind_of? Symbol
  raise ArgumentError.new "The color value must be either a symbol or a string." if not value.kind_of? String
  text_box.type value
end

Private Instance Methods

picker_pane() click to toggle source
# File lib/lebowski/scui/views/color_well.rb, line 40
def picker_pane
  @picker_pane = self['_pickerPane'] if @picker_pane.nil?
  return @picker_pane
end
text_box() click to toggle source
# File lib/lebowski/scui/views/color_well.rb, line 35
def text_box
  @text_box = picker_pane['contentView.textBox'] if @text_box.nil?
  return @text_box
end