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
27c3a596
Commit
27c3a596
authored
6 years ago
by
Irina LEE
Browse files
Options
Downloads
Patches
Plain Diff
update cluster / module for swallowed components (eln*)
parent
e98c64bb
No related branches found
No related tags found
1 merge request
!72
Syscams
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/ui/eln/ELNCluster.java
+32
-15
32 additions, 15 deletions
src/main/java/ui/eln/ELNCluster.java
src/main/java/ui/eln/ELNModule.java
+14
-15
14 additions, 15 deletions
src/main/java/ui/eln/ELNModule.java
with
46 additions
and
30 deletions
src/main/java/ui/eln/ELNCluster.java
+
32
−
15
View file @
27c3a596
...
...
@@ -40,7 +40,6 @@ package ui.eln;
import
myutil.GraphicLib
;
import
ui.*
;
import
ui.syscams.*
;
import
ui.util.IconManager
;
import
java.awt.*
;
import
java.util.*
;
...
...
@@ -200,9 +199,11 @@ public class ELNCluster extends TGCScalableWithInternalComponent implements Swal
public
boolean
acceptSwallowedTGComponent
(
TGComponent
tgc
)
{
if
(
tgc
instanceof
ELNModule
)
{
return
true
;
}
else
if
(
tgc
instanceof
SysCAMSPortDE
)
{
}
else
if
(
tgc
instanceof
ELNClusterTerminal
)
{
return
true
;
}
else
if
(
tgc
instanceof
SysCAMSPortTDF
)
{
}
else
if
(
tgc
instanceof
ELNClusterPortDE
)
{
return
true
;
}
else
if
(
tgc
instanceof
ELNClusterPortTDF
)
{
return
true
;
}
return
false
;
...
...
@@ -234,10 +235,13 @@ public class ELNCluster extends TGCScalableWithInternalComponent implements Swal
if
(
tgc
instanceof
ELNModule
)
{
tgc
.
resizeWithFather
();
}
if
(
tgc
instanceof
SysCAMSPortDE
)
{
if
(
tgc
instanceof
ELNClusterTerminal
)
{
tgc
.
resizeWithFather
();
}
if
(
tgc
instanceof
ELNClusterPortDE
)
{
tgc
.
resizeWithFather
();
}
if
(
tgc
instanceof
SysCAMS
PortTDF
)
{
if
(
tgc
instanceof
ELNCluster
PortTDF
)
{
tgc
.
resizeWithFather
();
}
addInternalComponent
(
tgc
,
0
);
...
...
@@ -273,10 +277,13 @@ public class ELNCluster extends TGCScalableWithInternalComponent implements Swal
if
(
tgcomponent
[
i
]
instanceof
ELNModule
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
if
(
tgcomponent
[
i
]
instanceof
SysCAMSPortDE
)
{
if
(
tgcomponent
[
i
]
instanceof
ELNClusterTerminal
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
if
(
tgcomponent
[
i
]
instanceof
ELNClusterPortDE
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortTDF
)
{
if
(
tgcomponent
[
i
]
instanceof
ELNCluster
PortTDF
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
}
...
...
@@ -296,21 +303,31 @@ public class ELNCluster extends TGCScalableWithInternalComponent implements Swal
return
list
;
}
public
java
.
util
.
List
<
SysCAMSPortDE
>
getAllPortDE
()
{
java
.
util
.
List
<
SysCAMSPortDE
>
list
=
new
ArrayList
<
SysCAMSPortDE
>();
public
java
.
util
.
List
<
ELNClusterTerminal
>
getAllClusterTerminal
()
{
java
.
util
.
List
<
ELNClusterTerminal
>
list
=
new
ArrayList
<
ELNClusterTerminal
>();
for
(
int
i
=
0
;
i
<
nbInternalTGComponent
;
i
++)
{
if
(
tgcomponent
[
i
]
instanceof
ELNClusterTerminal
)
{
list
.
add
((
ELNClusterTerminal
)(
tgcomponent
[
i
]));
}
}
return
list
;
}
public
java
.
util
.
List
<
ELNClusterPortDE
>
getAllClusterPortDE
()
{
java
.
util
.
List
<
ELNClusterPortDE
>
list
=
new
ArrayList
<
ELNClusterPortDE
>();
for
(
int
i
=
0
;
i
<
nbInternalTGComponent
;
i
++)
{
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortDE
)
{
list
.
add
((
SysCAMS
PortDE
)(
tgcomponent
[
i
]));
if
(
tgcomponent
[
i
]
instanceof
ELNCluster
PortDE
)
{
list
.
add
((
ELNCluster
PortDE
)(
tgcomponent
[
i
]));
}
}
return
list
;
}
public
java
.
util
.
List
<
SysCAMS
PortTDF
>
getAllPortTDF
()
{
java
.
util
.
List
<
SysCAMS
PortTDF
>
list
=
new
ArrayList
<
SysCAMS
PortTDF
>();
public
java
.
util
.
List
<
ELNCluster
PortTDF
>
getAll
Cluster
PortTDF
()
{
java
.
util
.
List
<
ELNCluster
PortTDF
>
list
=
new
ArrayList
<
ELNCluster
PortTDF
>();
for
(
int
i
=
0
;
i
<
nbInternalTGComponent
;
i
++)
{
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortTDF
)
{
list
.
add
((
SysCAMS
PortTDF
)(
tgcomponent
[
i
]));
if
(
tgcomponent
[
i
]
instanceof
ELNCluster
PortTDF
)
{
list
.
add
((
ELNCluster
PortTDF
)(
tgcomponent
[
i
]));
}
}
return
list
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/ui/eln/ELNModule.java
+
14
−
15
View file @
27c3a596
...
...
@@ -42,7 +42,6 @@ import myutil.GraphicLib;
import
ui.*
;
import
ui.eln.sca_eln.*
;
import
ui.eln.sca_eln_sca_tdf.*
;
import
ui.syscams.*
;
import
ui.util.IconManager
;
import
ui.window.*
;
import
java.awt.*
;
...
...
@@ -250,10 +249,10 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
if
(
tgc
instanceof
ELNModuleTerminal
)
{
return
true
;
}
if
(
tgc
instanceof
SysCAMS
PortDE
)
{
if
(
tgc
instanceof
ELNModule
PortDE
)
{
return
true
;
}
if
(
tgc
instanceof
SysCAMS
PortTDF
)
{
if
(
tgc
instanceof
ELNModule
PortTDF
)
{
return
true
;
}
return
false
;
...
...
@@ -365,14 +364,14 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
addInternalComponent
(
tgc
,
0
);
return
true
;
}
if
(
tgc
instanceof
SysCAMS
PortDE
)
{
if
(
tgc
instanceof
ELNModule
PortDE
)
{
tgc
.
setFather
(
this
);
tgc
.
setDrawingZone
(
true
);
tgc
.
resizeWithFather
();
addInternalComponent
(
tgc
,
0
);
return
true
;
}
if
(
tgc
instanceof
SysCAMS
PortTDF
)
{
if
(
tgc
instanceof
ELNModule
PortTDF
)
{
tgc
.
setFather
(
this
);
tgc
.
setDrawingZone
(
true
);
tgc
.
resizeWithFather
();
...
...
@@ -434,10 +433,10 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
if
(
tgcomponent
[
i
]
instanceof
ELNModuleTerminal
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortDE
)
{
if
(
tgcomponent
[
i
]
instanceof
ELNModule
PortDE
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortTDF
)
{
if
(
tgcomponent
[
i
]
instanceof
ELNModule
PortTDF
)
{
tgcomponent
[
i
].
resizeWithFather
();
}
}
...
...
@@ -620,21 +619,21 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
return
list
;
}
public
java
.
util
.
List
<
SysCAMS
PortDE
>
getAllPortDE
()
{
java
.
util
.
List
<
SysCAMS
PortDE
>
list
=
new
ArrayList
<
SysCAMS
PortDE
>();
public
java
.
util
.
List
<
ELNModule
PortDE
>
getAll
Module
PortDE
()
{
java
.
util
.
List
<
ELNModule
PortDE
>
list
=
new
ArrayList
<
ELNModule
PortDE
>();
for
(
int
i
=
0
;
i
<
nbInternalTGComponent
;
i
++)
{
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortDE
)
{
list
.
add
((
SysCAMS
PortDE
)(
tgcomponent
[
i
]));
if
(
tgcomponent
[
i
]
instanceof
ELNModule
PortDE
)
{
list
.
add
((
ELNModule
PortDE
)(
tgcomponent
[
i
]));
}
}
return
list
;
}
public
java
.
util
.
List
<
SysCAMS
PortTDF
>
getAllPortTDF
()
{
java
.
util
.
List
<
SysCAMS
PortTDF
>
list
=
new
ArrayList
<
SysCAMS
PortTDF
>();
public
java
.
util
.
List
<
ELNModule
PortTDF
>
getAll
Module
PortTDF
()
{
java
.
util
.
List
<
ELNModule
PortTDF
>
list
=
new
ArrayList
<
ELNModule
PortTDF
>();
for
(
int
i
=
0
;
i
<
nbInternalTGComponent
;
i
++)
{
if
(
tgcomponent
[
i
]
instanceof
SysCAMS
PortTDF
)
{
list
.
add
((
SysCAMS
PortTDF
)(
tgcomponent
[
i
]));
if
(
tgcomponent
[
i
]
instanceof
ELNModule
PortTDF
)
{
list
.
add
((
ELNModule
PortTDF
)(
tgcomponent
[
i
]));
}
}
return
list
;
...
...
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