Class: Layout::Label
Overview
This is an interface to a label entity. A Label consists of a FormattedText and the label leader Path. A Label may be connected to another Entity via a ConnectionPoint.
Constant Summary #
- Layout::Label::CONNECTION_TYPE_NONE
- Layout::Label::CONNECTION_TYPE_AUTO
- Layout::Label::CONNECTION_TYPE_REVERSE_AUTO
- Layout::Label::CONNECTION_TYPE_TOP_LEFT
- Layout::Label::CONNECTION_TYPE_CENTER_LEFT
- Layout::Label::CONNECTION_TYPE_BOTTOM_LEFT
- Layout::Label::CONNECTION_TYPE_TOP_RIGHT
- Layout::Label::CONNECTION_TYPE_CENTER_RIGHT
- Layout::Label::CONNECTION_TYPE_BOTTOM_RIGHT
- Layout::Label::LEADER_LINE_TYPE_SINGLE_SEGMENT
- Layout::Label::LEADER_LINE_TYPE_TWO_SEGMENT
- Layout::Label::LEADER_LINE_TYPE_BEZIER
- Layout::Label::LEADER_LINE_TYPE_UNKNOWN
Instance Method Summary # collapse
-
#connect(connection_point) ⇒ Object
The #connect method connects the Label to the given ConnectionPoint.
-
#connection_type ⇒ Integer
The #connection_type method returns the type of the text connection for the Label.
-
#connection_type=(connection_type) ⇒ Object
The #connection_type= method sets the type of the text connection for the Label.
-
#disconnect ⇒ Object
The #disconnect method disconnects the Label from its ConnectionPoint.
- #entities(*args) ⇒ Object
-
#initialize(*args) ⇒ Object
constructor
The #initialize method creates a new disconnected Label.
-
#leader_line ⇒ Layout::Path
The #leader_line method returns a copy of the leader line.
-
#leader_line=(leader_path) ⇒ Object
The #leader_line= method sets the leader line.
-
#leader_line_type ⇒ Integer
The #leader_line_type method returns the type of the leader line for the Label.
-
#leader_line_type=(leader_type) ⇒ Object
The #leader_line_type= method sets the type of the leader line for the Label.
-
#text ⇒ Layout::FormattedText
The #text method returns a copy of the FormattedText of the Label.
-
#text=(new_text) ⇒ Object
The #text= method sets the FormattedText of the Label.
Methods inherited from Entity
#==, #bounds, #document, #drawing_bounds, #group, #layer_instance, #locked=, #locked?, #move_to_group, #move_to_layer, #on_shared_layer?, #page, #style, #style=, #transform!, #transformation, #untransformed_bounds, #untransformed_bounds=
Constructor Details
↑ #initialize(text, leader_type, target_point, bounds) ⇒ Layout::Label #initialize(text, leader_type, target_point, anchor_point, anchor_type) ⇒ Layout::Label
The #initialize method creates a new disconnected Layout::Label.
Instance Method Details
↑ #connect(connection_point) ⇒ Object
The #connect method connects the Layout::Label to the given ConnectionPoint. The leader line will be adjusted to point at the ConnectionPoint. The Layout::Label must be in the same Document as the ConnectionPoint. If both the Layout::Label and the ConnectionPoint's Entity are on non-shared Layout::Layers, they must be on the same Page.
↑ #connection_type ⇒ Integer
The #connection_type method returns the type of the text connection for the Layout::Label.
The leader line type can be one of the following values:
Layout::Label::CONNECTION_TYPE_NONE
Layout::Label::CONNECTION_TYPE_AUTO
Layout::Label::CONNECTION_TYPE_REVERSE_AUTO
Layout::Label::CONNECTION_TYPE_TOP_LEFT
Layout::Label::CONNECTION_TYPE_CENTER_LEFT
Layout::Label::CONNECTION_TYPE_BOTTOM_LEFT
Layout::Label::CONNECTION_TYPE_TOP_RIGHT
Layout::Label::CONNECTION_TYPE_CENTER_RIGHT
Layout::Label::CONNECTION_TYPE_BOTTOM_RIGHT
↑ #connection_type=(connection_type) ⇒ Object
The #connection_type= method sets the type of the text connection for the Layout::Label.
The leader line type can be one of the following values:
Layout::Label::CONNECTION_TYPE_NONE
Layout::Label::CONNECTION_TYPE_AUTO
Layout::Label::CONNECTION_TYPE_REVERSE_AUTO
Layout::Label::CONNECTION_TYPE_TOP_LEFT
Layout::Label::CONNECTION_TYPE_CENTER_LEFT
Layout::Label::CONNECTION_TYPE_BOTTOM_LEFT
Layout::Label::CONNECTION_TYPE_TOP_RIGHT
Layout::Label::CONNECTION_TYPE_CENTER_RIGHT
Layout::Label::CONNECTION_TYPE_BOTTOM_RIGHT
↑ #disconnect ⇒ Object
The #disconnect method disconnects the Layout::Label from its ConnectionPoint. The leader line will not be adjusted by disconnecting from a ConnectionPoint.
↑ #entities ⇒ Layout::Entities #entities(page) ⇒ Layout::Entities
The #entities method returns the Entities that represent the Layout::Label in its exploded form.
↑ #leader_line ⇒ Layout::Path
The #leader_line method returns a copy of the leader line.
↑ #leader_line=(leader_path) ⇒ Object
The #leader_line= method sets the leader line.
↑ #leader_line_type ⇒ Integer
The #leader_line_type method returns the type of the leader line for the Layout::Label.
The leader line type can be one of the following values:
Layout::Label::LEADER_LINE_TYPE_SINGLE_SEGMENT
Layout::Label::LEADER_LINE_TYPE_TWO_SEGMENT
Layout::Label::LEADER_LINE_TYPE_BEZIER
Layout::Label::LEADER_LINE_TYPE_UNKNOWN
↑ #leader_line_type=(leader_type) ⇒ Object
The #leader_line_type= method sets the type of the leader line for the Layout::Label.
The leader line type can be one of the following values:
Layout::Label::LEADER_LINE_TYPE_SINGLE_SEGMENT
Layout::Label::LEADER_LINE_TYPE_TWO_SEGMENT
Layout::Label::LEADER_LINE_TYPE_BEZIER
Layout::Label::LEADER_LINE_TYPE_UNKNOWN
↑ #text ⇒ Layout::FormattedText
The #text method returns a copy of the FormattedText of the Layout::Label.
↑ #text=(new_text) ⇒ Object
The #text= method sets the FormattedText of the Layout::Label.