Skip to content
Snippets Groups Projects
Commit 27c3a596 authored by Irina LEE's avatar Irina LEE
Browse files

update cluster / module for swallowed components (eln*)

parent e98c64bb
No related branches found
No related tags found
1 merge request!72Syscams
......@@ -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 SysCAMSPortTDF) {
if (tgc instanceof ELNClusterPortTDF) {
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 SysCAMSPortTDF) {
if (tgcomponent[i] instanceof ELNClusterPortTDF) {
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 SysCAMSPortDE) {
list.add((SysCAMSPortDE)(tgcomponent[i]));
if (tgcomponent[i] instanceof ELNClusterPortDE) {
list.add((ELNClusterPortDE)(tgcomponent[i]));
}
}
return list;
}
public java.util.List<SysCAMSPortTDF> getAllPortTDF() {
java.util.List<SysCAMSPortTDF> list = new ArrayList<SysCAMSPortTDF>();
public java.util.List<ELNClusterPortTDF> getAllClusterPortTDF() {
java.util.List<ELNClusterPortTDF> list = new ArrayList<ELNClusterPortTDF>();
for(int i=0; i<nbInternalTGComponent; i++) {
if (tgcomponent[i] instanceof SysCAMSPortTDF) {
list.add((SysCAMSPortTDF)(tgcomponent[i]));
if (tgcomponent[i] instanceof ELNClusterPortTDF) {
list.add((ELNClusterPortTDF)(tgcomponent[i]));
}
}
return list;
......
......@@ -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 SysCAMSPortDE) {
if (tgc instanceof ELNModulePortDE) {
return true;
}
if (tgc instanceof SysCAMSPortTDF) {
if (tgc instanceof ELNModulePortTDF) {
return true;
}
return false;
......@@ -365,14 +364,14 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
addInternalComponent(tgc, 0);
return true;
}
if (tgc instanceof SysCAMSPortDE) {
if (tgc instanceof ELNModulePortDE) {
tgc.setFather(this);
tgc.setDrawingZone(true);
tgc.resizeWithFather();
addInternalComponent(tgc, 0);
return true;
}
if (tgc instanceof SysCAMSPortTDF) {
if (tgc instanceof ELNModulePortTDF) {
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 SysCAMSPortDE) {
if (tgcomponent[i] instanceof ELNModulePortDE) {
tgcomponent[i].resizeWithFather();
}
if (tgcomponent[i] instanceof SysCAMSPortTDF) {
if (tgcomponent[i] instanceof ELNModulePortTDF) {
tgcomponent[i].resizeWithFather();
}
}
......@@ -620,21 +619,21 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
return list;
}
public java.util.List<SysCAMSPortDE> getAllPortDE() {
java.util.List<SysCAMSPortDE> list = new ArrayList<SysCAMSPortDE>();
public java.util.List<ELNModulePortDE> getAllModulePortDE() {
java.util.List<ELNModulePortDE> list = new ArrayList<ELNModulePortDE>();
for(int i=0; i<nbInternalTGComponent; i++) {
if (tgcomponent[i] instanceof SysCAMSPortDE) {
list.add((SysCAMSPortDE)(tgcomponent[i]));
if (tgcomponent[i] instanceof ELNModulePortDE) {
list.add((ELNModulePortDE)(tgcomponent[i]));
}
}
return list;
}
public java.util.List<SysCAMSPortTDF> getAllPortTDF() {
java.util.List<SysCAMSPortTDF> list = new ArrayList<SysCAMSPortTDF>();
public java.util.List<ELNModulePortTDF> getAllModulePortTDF() {
java.util.List<ELNModulePortTDF> list = new ArrayList<ELNModulePortTDF>();
for(int i=0; i<nbInternalTGComponent; i++) {
if (tgcomponent[i] instanceof SysCAMSPortTDF) {
list.add((SysCAMSPortTDF)(tgcomponent[i]));
if (tgcomponent[i] instanceof ELNModulePortTDF) {
list.add((ELNModulePortTDF)(tgcomponent[i]));
}
}
return list;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment