Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
ad5a4afe
Commit
ad5a4afe
authored
13 years ago
by
Daniel Ratiu
Browse files
Options
Downloads
Patches
Plain Diff
small fix
parent
568d11bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/LayoutDataUtils.java
+25
-3
25 additions, 3 deletions
...rc/org/fortiss/tooling/base/ui/utils/LayoutDataUtils.java
with
25 additions
and
3 deletions
org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/LayoutDataUtils.java
+
25
−
3
View file @
ad5a4afe
...
...
@@ -33,6 +33,7 @@ import static org.fortiss.tooling.base.utils.AngleUtils.setAngle;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
DimensionUtils
.
getDimension
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
DimensionUtils
.
setDimension
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
LayoutModelElementFactory
.
createAngle
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
LayoutModelElementFactory
.
createDimension
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
LayoutModelElementFactory
.
createOffsetOrientation
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
LayoutModelElementFactory
.
createPoint
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
LayoutModelElementFactory
.
createPoints
;
...
...
@@ -77,7 +78,7 @@ import org.fortiss.tooling.base.utils.LayoutModelElementFactory;
* @author hummel
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
GREEN
Hash:
8E566392E23F3AC734D13D27DD3D1057
* @ConQAT.Rating
YELLOW
Hash:
B28D9B7FDEEEEF8D1C65392D75AC362B
*/
public
class
LayoutDataUtils
{
...
...
@@ -195,7 +196,7 @@ public class LayoutDataUtils {
setPoint
(
layouted
,
CONNECTOR_POSITION
,
x
,
y
);
}
/** Returns the layouted connector's orientation. */
/** Returns the layouted connector's
offset-
orientation. */
public
static
OffsetOrientation
getConnectorOffsetOrientation
(
ILayoutedModelElement
layouted
)
{
OffsetOrientation
oo
=
getOffsetOrientation
(
layouted
,
...
...
@@ -207,6 +208,13 @@ public class LayoutDataUtils {
return
oo
;
}
/** Returns the layouted connector's orientation. */
public
static
EOrientation
getConnectorOrientation
(
ILayoutedModelElement
layouted
)
{
return
getOffsetOrientation
(
layouted
,
CONNECTOR_OFFSET_ORIENTATION
)
.
getOrientation
();
}
/** Sets the layouted connector's offset and orientation. */
public
static
void
setConnectorOffsetOrientation
(
ILayoutedModelElement
layouted
,
OffsetOrientation
orientation
)
{
...
...
@@ -244,7 +252,21 @@ public class LayoutDataUtils {
return
getConnectorAngle
(
lobject
).
getAngle
();
}
/** Return the absolute position for a given offset, orientation and insets. */
/**
* Return the absolute position for a given offset, orientation, size of the
* parent and insets.
*/
public
static
Point
getAbsolute
(
OffsetOrientation
oo
,
Rectangle
parentBounds
,
int
parentInsets
)
{
Dimension
d
=
createDimension
(
parentBounds
.
width
,
parentBounds
.
height
,
""
);
return
getAbsolute
(
oo
,
d
,
parentInsets
);
}
/**
* Return the absolute position for a given offset, orientation, size of the
* parent and insets.
*/
public
static
Point
getAbsolute
(
OffsetOrientation
oo
,
Dimension
parentSize
,
int
parentInsets
)
{
Point
pos
=
createPoint
(
0
,
0
,
null
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment