for (Enumeration enum=mySched.getAllScheduleElements(); enum.hasMoreElements();)
for (Enumeration en=mySched.getAllScheduleElements(); en.hasMoreElements();)
  public void setVisibleForAllNamedLocations(String unitLabel, boolean visibility)  {    NamedLocationTime nltm = null;    synchronized (schedImplByUnit)  // synched against load    {      ScheduleImpl mySched = (ScheduleImpl)schedImplByUnit.get(unitLabel);      for (Enumeration enum=mySched.getAllScheduleElements(); enum.hasMoreElements();)      {        nltm = (NamedLocationTime)enum.nextElement();//        if (nltm!=null && nltm.getUnit()!=null && nltm.getUnit().getGraphic()!=null && nltm.getUnit().getLabel().equals(unitLabel))        if (nltm!=null && nltm.getUnit()!=null && nltm.getUnit().getGraphic()!=null)        {          nltm.getUnit().getGraphic().setVisible(visibility);          nltm.getUnit().getGraphic().setNeedToRegenerate(true);        }      }      for (Iterator it=nls.iterator(); it.hasNext();)      {        nltm = (NamedLocationTime)it.next();        if (nltm!=null && nltm.getUnit()!=null && nltm.getUnit().getGraphic()!=null && nltm.getUnit().getLabel().equals(unitLabel))//        if (nltm!=null && nltm.getUnit()!=null && nltm.getUnit().getGraphic()!=null)        {          nltm.getUnit().getGraphic().setVisible(visibility);          nltm.getUnit().getGraphic().setNeedToRegenerate(true);        }      }    }