Class: UU::OS::GVC::Link

Inherits:
Component show all
Defined in:
uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb

Overview

Link component.

Instance Attribute Summary (collapse)

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) action_uri

Link uri. Can contain valid UESURI or uri to external web page. Web page uris must have one of supported schemas (http, https). External web pages are always opened into new window (attribute target is ignored).



27
28
29
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 27

def action_uri
  @action_uri
end

- (Object) disabled

Flag if component is disabled.



16
17
18
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 16

def disabled
  @disabled
end

- (Object) style

The style for the component. The value can be semicolon separated String containing style rules or a Hash. The style has bigger priority than styling via style_class. Allowed styles:

  • color, background-color - the color of the link 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)

Examples:

link.style = { :color => '#123456' }
a = link.style                       # returns { :color => '#123456' }

link.style = 'font-style: italic; font-weight: bold; font-size: 15px;'
b = link.style                       # returns 'font-style: italic; font-weight: bold; font-size: 15px;'

Returns:

  • The style for the component. Due to backward compatibility, the return value is the same as the one used for setting the value.



45
46
47
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 45

def style
  @style
end

- (Object) system_icon

Flag if link can show system icons



51
52
53
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 51

def system_icon
  @system_icon
end

- (Object) system_tooltip

Flag if link can show system tooltip



48
49
50
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 48

def system_tooltip
  @system_tooltip
end

- (Object) target

Defines target window where the action URI will be opened - one of "CURRENT_WINDOW" (default), "NEW_WINDOW", "DIALOG_WINDOW". For backward compatibility it's also possible to use older equivalents "SELF", "NEW" and "MODAL".



13
14
15
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 13

def target
  @target
end

- (Object) text

Link text.



19
20
21
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 19

def text
  @text
end

- (Object) tooltip

Link tooltip text.



22
23
24
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/link.rb', line 22

def tooltip
  @tooltip
end