Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
mbe-tools
TTool
Commits
68197215
Commit
68197215
authored
9 years ago
by
Ludovic Apvrille
Browse files
Options
Downloads
Patches
Plain Diff
Better handling of avatar transition info
parent
179c27eb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ui/TDiagramPanel.java
+7
-0
7 additions, 0 deletions
src/ui/TDiagramPanel.java
src/ui/avatarsmd/AvatarSMDTransitionInfo.java
+11
-7
11 additions, 7 deletions
src/ui/avatarsmd/AvatarSMDTransitionInfo.java
with
18 additions
and
7 deletions
src/ui/TDiagramPanel.java
+
7
−
0
View file @
68197215
...
...
@@ -193,6 +193,8 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
private
boolean
isScaled
;
private
boolean
overcomeShowing
=
false
;
private
boolean
drawingMain
=
true
;
//protected Image offScreenBuffer;
...
...
@@ -291,6 +293,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
}
}
public
boolean
isDrawingMain
()
{
return
drawingMain
;
}
public
void
updateComponentsAfterZoom
()
{
//TraceManager.addDev("Zoom factor=" + zoom);
TGComponent
tgc
;
...
...
@@ -401,6 +407,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
public
void
paintMycomponents
(
Graphics
g
,
boolean
b
,
double
w
,
double
h
)
{
lastGraphics
=
g
;
drawingMain
=
b
;
//TraceManager.addDev("Nb of components: " + componentList.size());
...
...
This diff is collapsed.
Click to expand it.
src/ui/avatarsmd/AvatarSMDTransitionInfo.java
+
11
−
7
View file @
68197215
...
...
@@ -127,11 +127,15 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
g
.
setColor
(
ColorManager
.
AVATAR_GUARD
);
if
(
tdp
.
isDrawingMain
())
{
width
=
minWidth
;
}
if
(
guard
.
length
()
>
0
)
{
if
(
guard
.
compareTo
(
"[ ]"
)
!=
0
)
{
g
.
drawString
(
guard
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
guard
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -146,7 +150,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
s
=
"after ("
+
afterMin
+
","
+
afterMax
+
")"
;
g
.
drawString
(
s
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
s
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -155,7 +159,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
s
=
"after ("
+
afterMin
+
")"
;
g
.
drawString
(
s
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
s
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -168,7 +172,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
s
=
"computeFor ("
+
computeMin
+
","
+
computeMax
+
")"
;
g
.
drawString
(
s
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
s
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -177,7 +181,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
s
=
"computeFor ("
+
computeMin
+
")"
;
g
.
drawString
(
s
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
s
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -192,7 +196,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
if
(
s
.
length
()
>
0
)
{
g
.
drawString
(
s
,
x
,
y
+
step
);
atLeastOneThing
=
true
;
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
width
=
Math
.
max
(
g
.
getFontMetrics
().
stringWidth
(
s
),
width
);
width
=
Math
.
max
(
minWidth
,
width
);
}
...
...
@@ -225,7 +229,7 @@ public class AvatarSMDTransitionInfo extends TGCWithoutInternalComponent {
if
(
!
tdp
.
is
Scaled
())
{
if
(
tdp
.
is
DrawingMain
())
{
height
=
Math
.
max
(
step
,
minHeight
);
}
...
...
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