Math2mat
|
00001 00015 package m2m.frontend.dynamicview.model; 00016 00017 public class GraphicLoop extends GraphicFunction 00018 { 00022 private boolean isReduct = false; 00023 00024 00029 public boolean getIsReduct() 00030 { 00031 return isReduct; 00032 } 00033 00034 00039 public void setIsReduct(boolean val) 00040 { 00041 isReduct = val; 00042 } 00043 00044 00049 public void setVisible(boolean visible) 00050 { 00051 super.setVisible(visible); 00052 00053 if(!isReduct) 00054 for(Node node : getChildrenArray()) 00055 node.setVisible(visible); 00056 } 00057 00058 00063 public void setConnectionsVisible(boolean visible) 00064 { 00065 for(Node node : getChildrenArray()) 00066 { 00067 if(node instanceof GraphicLoop && !((GraphicLoop)node).isReduct) 00068 ((GraphicLoop)node).setConnectionsVisible(visible); 00069 else 00070 { 00071 /* Mask/Unmask the sources connections inside the function */ 00072 for(Connection conn : node.getSourceConnections()) 00073 conn.setVisible(visible); 00074 00075 /* Mask/Unmask the targets connections inside the function */ 00076 for(Connection conn : node.getTargetConnections()) 00077 conn.setVisible(visible); 00078 } 00079 } 00080 } 00081 }