diff --git a/src/main/java/ui/SysCAMSComponentDesignPanel.java b/src/main/java/ui/SysCAMSComponentDesignPanel.java index 63a3790f7b13224001df074a864196969eb58070..3b82f0e556453d046fecbe61be05a170576cc959 100644 --- a/src/main/java/ui/SysCAMSComponentDesignPanel.java +++ b/src/main/java/ui/SysCAMSComponentDesignPanel.java @@ -107,6 +107,11 @@ public class SysCAMSComponentDesignPanel extends TURTLEPanel { return syscamsctdp.getBlockDEComponentByName(_name); } + public SysCAMSClock getClockComponentByName(String _name) { + return syscamsctdp.getClockComponentByName(_name); + } + + public java.util.List<String> getAllCompositeComponent(String _name) { return syscamsctdp.getAllCompositeComponent(_name); } @@ -171,4 +176,4 @@ public class SysCAMSComponentDesignPanel extends TURTLEPanel { return true; } -} \ No newline at end of file +} diff --git a/src/main/java/ui/TDiagramPanel.java b/src/main/java/ui/TDiagramPanel.java index 0cb1bd2d69c78692e8ceefddc5fcd93d1e857ef7..127ab98dcf31983d5ef2415fe3837abe418326b8 100644 --- a/src/main/java/ui/TDiagramPanel.java +++ b/src/main/java/ui/TDiagramPanel.java @@ -2732,6 +2732,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { || (o instanceof TMLTaskInterface && this.checkTMLTaskInterface((TMLTaskInterface) o, name)) || (o instanceof SysCAMSBlockTDF && this.checkSysCAMSBlockTDFComponent((SysCAMSBlockTDF) o, name)) || (o instanceof SysCAMSBlockDE && this.checkSysCAMSBlockDEComponent((SysCAMSBlockDE) o, name)) + || (o instanceof SysCAMSClock && this.checkSysCAMSClockComponent((SysCAMSClock) o, name)) || (o instanceof SysCAMSCompositeComponent && this.checkSysCAMSCompositeComponent((SysCAMSCompositeComponent) o, name)) || (o instanceof ELNCluster && this.checkELNCluster((ELNCluster) o, name)) || (o instanceof ELNModule && this.checkELNModule((ELNModule) o, name)) @@ -2813,6 +2814,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { public boolean checkSysCAMSBlockDEComponent(SysCAMSBlockDE o, String name) { return false; } + + public boolean checkSysCAMSClockComponent(SysCAMSClock o, String name) { + return false; + } public boolean checkSysCAMSCompositeComponent(SysCAMSCompositeComponent o, String name) { return false; @@ -3101,6 +3106,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { public boolean checkSysCAMSBlockDEComponent(SysCAMSBlockDE o, String name) { return o.getValue().equals(name); } + + public boolean checkSysCAMSClockComponent(SysCAMSClock o, String name) { + return o.getValue().equals(name); + } public boolean checkSysCAMSCompositeComponent(SysCAMSCompositeComponent o, String name) { for (int i = 0; i < o.getNbInternalTGComponent(); i++) diff --git a/src/main/java/ui/syscams/SysCAMSClock.java b/src/main/java/ui/syscams/SysCAMSClock.java index 0183e84406b4369d940012120451d0b8e2046eaf..cac8dbb2f7e0ec94e3b4a393a88088228555c0be 100644 --- a/src/main/java/ui/syscams/SysCAMSClock.java +++ b/src/main/java/ui/syscams/SysCAMSClock.java @@ -238,8 +238,8 @@ public class SysCAMSClock extends TGCScalableWithInternalComponent implements Sw return false; } - JDialogSysCAMSClock jde = new JDialogSysCAMSClock(this); - jde.setVisible(true); + JDialogSysCAMSClock jclk = new JDialogSysCAMSClock(this); + jclk.setVisible(true); rescaled = true; return true; } @@ -517,7 +517,7 @@ public class SysCAMSClock extends TGCScalableWithInternalComponent implements Sw return ret; } - public java.util.List<SysCAMSPortDE> getAllInternalPortsClock() { + public java.util.List<SysCAMSPortDE> getAllInternalPortsDE() { java.util.List<SysCAMSPortDE> list = new ArrayList<SysCAMSPortDE>(); for(int i=0; i<nbInternalTGComponent; i++) { if (tgcomponent[i] instanceof SysCAMSPortDE) { diff --git a/src/main/java/ui/syscams/SysCAMSComponentTaskDiagramPanel.java b/src/main/java/ui/syscams/SysCAMSComponentTaskDiagramPanel.java index c09ac89b8040b84e25163ce6261c331cb4eabd52..878187928849efa2b50a3b336e1337cbb5f5c19e 100644 --- a/src/main/java/ui/syscams/SysCAMSComponentTaskDiagramPanel.java +++ b/src/main/java/ui/syscams/SysCAMSComponentTaskDiagramPanel.java @@ -469,6 +469,21 @@ public class SysCAMSComponentTaskDiagramPanel extends TDiagramPanel implements T return null; } + public SysCAMSClock getClockComponentByName(String _name) { + TGComponent tgc; + Iterator<TGComponent> iterator = componentList.listIterator(); + + while (iterator.hasNext()) { + tgc = iterator.next(); + if (tgc instanceof SysCAMSClock) { + if (tgc.getValue().equals(_name)) { + return ((SysCAMSClock) tgc); + } + } + } + return null; + } + public void updateReferenceToSysCAMSCompositeComponent(SysCAMSCompositeComponent syscamscc) { Iterator<TGComponent> iterator = componentList.listIterator(); TGComponent tgc; @@ -574,12 +589,15 @@ public class SysCAMSComponentTaskDiagramPanel extends TDiagramPanel implements T if (tgc instanceof SysCAMSBlockDE) { deports.addAll(((SysCAMSBlockDE) tgc).getAllInternalPortsDE()); } + if (tgc instanceof SysCAMSClock) { + deports.addAll(((SysCAMSClock) tgc).getAllInternalPortsDE()); + } if (tgc instanceof SysCAMSPortTDF) { tdfports.add((SysCAMSPortTDF) tgc); } if (tgc instanceof SysCAMSPortDE) { deports.add((SysCAMSPortDE) tgc); - } + } } // We take each primitive ports individually and we go thru the graph @@ -886,4 +904,4 @@ public class SysCAMSComponentTaskDiagramPanel extends TDiagramPanel implements T } return terms; } -} \ No newline at end of file +}