Class: UU::OS::Form::ColorPicker
- Inherits:
-
Input
- Object
- GVC::Component
- Input
- UU::OS::Form::ColorPicker
- Defined in:
- uu_os_gvc-0.28.16/lib/uu/os/form/color_picker.rb
Overview
Component for choosing color.
Defined Under Namespace
Classes: Palette
Constant Summary
- UU_OS_PALETTE =
Constant denoting palette containing standard uuOS colors.
'UU_OS_PALETTE'
Instance Attribute Summary (collapse)
-
- (Object) data
Data containing palette of colors.
-
- (Object) data_uri
URI of a uuCommand to use for loading data.
-
- (Object) value
Selected color in hexadecimal format, such as "#ff0000".
Attributes inherited from Input
#disabled, #read_only, #required, #submit_value_change, #value_change_action_uri, #width
Attributes inherited from GVC::Component
#attributes, #code, #component_type, #form, #height, #id, #name, #width
Method Summary
Methods inherited from GVC::Component
#add_message, #focus, #initialize, #messages
Constructor Details
This class inherits a constructor from UU::OS::GVC::Component
Instance Attribute Details
- (Object) data
Data containing palette of colors. If no data is supplied, default palette is used containing colors from Palette.
26 27 28 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/color_picker.rb', line 26 def data @data end |
- (Object) data_uri
URI of a uuCommand to use for loading data. The data returned from the uuCommand must be in a format supported by data attribute.
30 31 32 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/color_picker.rb', line 30 def data_uri @data_uri end |
- (Object) value
Selected color in hexadecimal format, such as "#ff0000". It is possible to set a pre-defined color from the Palette or a custom color. Note that if a value that is not present in the used palette is set, the palette offered to the user won't contain that color, so if the user chooses yet another color, (s)he won't be able to get back to the original one.
51 52 53 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/color_picker.rb', line 51 def value @value end |