Class: Layout::Label
Relationships | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Entity
|
|
Instance Chain:
self,
Entity
|
|
Inherits: |
Layout::Entity
|
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
-
CONNECTION_TYPE_AUTO =
Constants
nil
-
CONNECTION_TYPE_BOTTOM_LEFT =
Stub value.
nil
-
CONNECTION_TYPE_BOTTOM_RIGHT =
Stub value.
nil
-
CONNECTION_TYPE_CENTER_LEFT =
Stub value.
nil
-
CONNECTION_TYPE_CENTER_RIGHT =
Stub value.
nil
-
CONNECTION_TYPE_NONE =
Stub value.
nil
-
CONNECTION_TYPE_REVERSE_AUTO =
Stub value.
nil
-
CONNECTION_TYPE_TOP_LEFT =
Stub value.
nil
-
CONNECTION_TYPE_TOP_RIGHT =
Stub value.
nil
-
LEADER_LINE_TYPE_BEZIER =
Stub value.
nil
-
LEADER_LINE_TYPE_SINGLE_SEGMENT =
Stub value.
nil
-
LEADER_LINE_TYPE_TWO_SEGMENT =
Stub value.
nil
-
LEADER_LINE_TYPE_UNKNOWN =
Stub value.
nil
Class Method Summary
-
.new(text, leader_type, target_point, bounds) ⇒ Layout::Label
constructor
The
#initialize
method creates a new disconnectedLabel
.
Instance Attribute Summary
-
#connection_type ⇒ Integer
rw
The #connection_type method returns the type of the text connection for the
Label
. -
#connection_type=(connection_type)
rw
The #connection_type= method sets the type of the text connection for the
Label
. -
#leader_line ⇒ Layout::Path
rw
The #leader_line method returns a copy of the leader line.
-
#leader_line=(leader_path)
rw
The #leader_line= method sets the leader line.
-
#leader_line_type ⇒ Integer
rw
The #leader_line_type method returns the type of the leader line for the
Label
. -
#leader_line_type=(leader_type)
rw
The #leader_line_type= method sets the type of the leader line for the
Label
. -
#text ⇒ Layout::FormattedText
rw
The #text method returns a copy of the
FormattedText
of theLabel
. -
#text=(new_text)
rw
The #text= method sets the
FormattedText
of theLabel
.
Entity
- Inherited
#locked= | The |
#locked? | The |
#on_shared_layer? | |
#style | |
#style= | |
#untransformed_bounds | The |
#untransformed_bounds= | The |
Instance Method Summary
-
#connect(connection_point)
The #connect method connects the
Label
to the givenConnectionPoint
. -
#disconnect
The #disconnect method disconnects the
Label
from itsConnectionPoint
. - #entities ⇒ Layout::Entities
Entity
- Inherited
#== | The |
#bounds | The |
#document | |
#drawing_bounds | The |
#group | |
#layer_instance | The |
#move_to_group | |
#move_to_layer | |
#page | |
#transform! | The |
#transformation | The |
Constructor Details
.new(text, leader_type, target_point, bounds) ⇒ Label
.new(text, leader_type, target_point, anchor_point, anchor_type) ⇒ Label
Label
.new(text, leader_type, target_point, anchor_point, anchor_type) ⇒ Label
The #initialize
method creates a new disconnected Label
.
Instance Attribute Details
#connection_type ⇒ Integer
(rw)
The #connection_type
method returns the type of the text connection for the 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) (rw)
The #connection_type=
method sets the type of the text connection for the 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
#leader_line ⇒ Layout::Path (rw)
The #leader_line
method returns a copy of the leader line.
#leader_line=(leader_path) (rw)
The #leader_line=
method sets the leader line.
#leader_line_type ⇒ Integer
(rw)
The #leader_line_type
method returns the type of the leader line for the 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) (rw)
The #leader_line_type=
method sets the type of the leader line for the 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 (rw)
The #text
method returns a copy of the FormattedText
of the Label
.
#text=(new_text) (rw)
The #text=
method sets the FormattedText
of the Label
.
Instance Method Details
#connect(connection_point)
The #connect
method connects the Label
to the given ConnectionPoint
. The leader line will be adjusted to point at the ConnectionPoint
. The Label
must be in the same Document
as the ConnectionPoint
. If both the Label
and the ConnectionPoint
‘s Entity
are on non-shared Layer
s, they must be on the same Page
.
#disconnect
The #disconnect
method disconnects the 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 Label
in its exploded form.