Class: UU::OS::GVC::Text
- Inherits:
-
Component
- Object
- Component
- UU::OS::GVC::Text
- Defined in:
- uu_os_gvc-0.28.16/lib/uu/os/gvc/text.rb
Overview
Component for displaying text. Use this component when it's necessary to dynamically change text. Don't use this component for static texts that don't change during the life-time of VUC (put such text directly into VUC view).
Instance Attribute Summary (collapse)
-
- (Object) max_width
readonly
Maximal width of the component.
-
- (Object) min_width
readonly
Minimal width of the component.
-
- (Object) style
The style for the component.
-
- (Object) text
Text content of the component.
Attributes inherited from Component
#attributes, #code, #component_type, #form, #height, #id, #name, #width
Method Summary
Methods inherited from Component
#add_message, #focus, #initialize, #messages
Constructor Details
This class inherits a constructor from UU::OS::GVC::Component
Instance Attribute Details
- (Object) max_width (readonly)
Maximal width of the component.
37 38 39 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/text.rb', line 37 def max_width @max_width end |
- (Object) min_width (readonly)
Minimal width of the component.
34 35 36 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/text.rb', line 34 def min_width @min_width end |
- (Object) style
The style for the component. The value can be semicolon separated String containing style rules or a Hash. Allowed styles:
-
color, background-color - the color of the text / background as a hexa value, e.g. '#123456'.
-
font-family, font-size, font-style, font-weight - font styling (see CSS for possible values)
-
text-decoration - underline / strike-through decorations (see CSS for possible values)
31 32 33 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/text.rb', line 31 def style @style end |
- (Object) text
Text content of the component. The value is truncated to 2000 characters. Newlines and other whitespaces are preserved when text is displayed to user.
14 15 16 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/text.rb', line 14 def text @text end |