Package fr.esrf.tangoatk.core

Examples of fr.esrf.tangoatk.core.IAttribute


    m_isStarted = false;
    StopGlobalBeanThread.addSoleilGlobalBean(this);
  }

  public void stopBean() {
    IAttribute tmpAttribute = BindingTango.getAttribute(deviceName +"/"+attributeName);
    if(tmpAttribute != null)
    {
      if(tmpAttribute instanceof IStringScalar) {
        ((IStringScalar)tmpAttribute).removeStringScalarListener(this);
      }
View Full Code Here


    public void attributeListIsConnected(Vector<IAttribute> aattributeList) {
        //System.out.println("attributeListIsConnected");
        //Check if it s the good attribute list
        Enumeration<IAttribute> tmpEnumeration = aattributeList.elements();
        IAttribute tmpIAttribute = null;
        String tmpDeviceName = null;
        boolean tmpIsTheGoodDeviceName = true;
    
        while (tmpEnumeration.hasMoreElements())
        {
            tmpIAttribute = (IAttribute) tmpEnumeration.nextElement();
            tmpDeviceName = tmpIAttribute.getDevice().getName();
            if(!tmpDeviceName.equalsIgnoreCase(deviceName))
            {
                tmpIsTheGoodDeviceName = false;
                break;
            }
View Full Code Here

   
    public void createAttributePanels(Vector<IAttribute> aattributeList)
    {
        //System.out.println("createAttributePanels");
        Enumeration<IAttribute> tmpEnumeration = aattributeList.elements();
        IAttribute tmpIAttribute = null;
        String tmpAttributeName = null;
        AttributeSpectrumPanel tmpAttributeSpectrumPanel = null;
        AttributeStringSpectrumArea tmpAttributeStringSpectrumArea = null;
        AttributeImagePanel tmpAttributeImagePanel = null;
         while (tmpEnumeration.hasMoreElements())
        {
             tmpIAttribute = (IAttribute) tmpEnumeration.nextElement();
             tmpAttributeName = tmpIAttribute.getNameSansDevice();
            if(!isExcludedAttribute(tmpAttributeName))
            {
                if(tmpIAttribute instanceof INumberSpectrum)
                {
                    tmpAttributeSpectrumPanel = new AttributeSpectrumPanel();
View Full Code Here

  public void attributeListIsConnected(Vector<IAttribute> aattributeList) {
    //System.out.println("attributeListIsConnected=" + aattributeList.size());
    //Check if it s the good attribute list
    Enumeration<IAttribute> tmpEnumeration = aattributeList.elements();
    IAttribute tmpIAttribute = null;
    AttributePolledList tmpAttributePolledList = new AttributePolledList();
    tmpAttributePolledList.setRefreshInterval(refreshingPeriod);
    tmpAttributePolledList.setFilter(new IEntityFilter(){
      private static final long serialVersionUID = 1L;
      public boolean keep(IEntity ientity)
      {
        if(ientity instanceof INumberSpectrum) {
          return true;
        }
        return false;
      }
    });
    while (tmpEnumeration.hasMoreElements())
    {
      tmpIAttribute = tmpEnumeration.nextElement();
      for (String element : attributeNameList) {
        if(tmpIAttribute.getName().equalsIgnoreCase(element.trim()))
        {
          if(tmpIAttribute instanceof INumberSpectrum) {
            tmpAttributePolledList.add(tmpIAttribute);
          }
          else {
            ConnectionErrorDialog.showMessageDialog(this, null, "\n" + tmpIAttribute.getName() + "is not a numerical spectrum");
          }
        }
      }
    }
    if(!tmpAttributePolledList.isEmpty())
View Full Code Here

   */
  public void clearModel() {
      if (!m_attributeTable.isEmpty())
      {
          Enumeration<IAttribute> enumeration = m_attributeTable.elements();
          IAttribute tmpAttribute = null;
          while(enumeration.hasMoreElements())
          {
              tmpAttribute = enumeration.nextElement();
              ((INumberScalar)tmpAttribute).removeNumberScalarListener(this);
              BindingTango.removeAttributeListener(tmpAttribute.getName(), this);
          }
          m_attributeTable.clear();
      }
  }
View Full Code Here

    }

    public void attributeListIsConnected(Vector<IAttribute> aattributeList) {
      //Check if it s the good attribute list
        Enumeration<IAttribute> tmpEnumeration = aattributeList.elements();
        IAttribute tmpIAttribute = null;
        int tmpInvalidAttribute = 0;
        while (tmpEnumeration.hasMoreElements())
        {
            tmpIAttribute = (IAttribute) tmpEnumeration.nextElement();
            for (int i = 0; i < attributeNameList.length; i++)
            {
                if(tmpIAttribute.getName().equalsIgnoreCase(attributeNameList[i].trim()))
                {
                    if(tmpIAttribute instanceof INumberScalar)
                    {
                        m_attributeTable.put(tmpIAttribute.getName().toLowerCase(),tmpIAttribute);
                        ((INumberScalar)tmpIAttribute).addNumberScalarListener(this);
                        BindingTango.addAttributeListener(tmpIAttribute.getName(), this);
                    }  
                    else
                    {
                        tmpInvalidAttribute++;
                        ConnectionErrorDialog.showMessageDialog(this, null, "\n" + tmpIAttribute.getName() + "is not a numerical scalar");
                    }
                    break;
                }
            }
        }
View Full Code Here

                if(ientity instanceof INumberScalar)
                    return true;
                 return false;
            }
        });
        IAttribute tmpIAttribute = null;
        int tmpInvalidAttribute = 0;
        while (tmpEnumeration.hasMoreElements())
        {
            tmpIAttribute = (IAttribute) tmpEnumeration.nextElement();
            for (int i = 0; i < attributeNameList.length; i++)
            {
                if(tmpIAttribute.getName().equalsIgnoreCase(attributeNameList[i].trim()))
                {
                    tmpAttributePolledList.add(tmpIAttribute);   
                    if(!(tmpIAttribute instanceof INumberScalar))
                    {
                        tmpInvalidAttribute++;
                        ConnectionErrorDialog.showMessageDialog(this, null, "\n" + tmpIAttribute.getName() + "is not a numerical scalar");
                    }
                    break;
                }
            }
        }
View Full Code Here

    public void attributeListIsConnected(Vector<IAttribute>  aattributeList) {
        //System.out.println("attributeListIsConnected=" + aattributeList.size());
        //Check if it s the good attribute list
        Enumeration<IAttribute> tmpEnumeration = aattributeList.elements();      
        IAttribute tmpIAttribute = null;
        while (tmpEnumeration.hasMoreElements())
        {
            tmpIAttribute = (IAttribute) tmpEnumeration.nextElement();
            for (int i = 0; i < attributeNameList.length; i++)
            {
                if(tmpIAttribute.getName().equalsIgnoreCase(attributeNameList[i].trim()))
                {
                    if(tmpIAttribute instanceof INumberSpectrum)
                        addNumberSpectrumModel((INumberSpectrum)tmpIAttribute);  
                    else
                        ConnectionErrorDialog.showMessageDialog(this, null, "\n" + tmpIAttribute.getName() + "is not a numerical spectrum");
                }
            }
        }
        if(!attMap.isEmpty())
        {
View Full Code Here

           return true;
         }
         return false;
       }
     });
     IAttribute tmpIAttribute = null;
     int tmpInvalidAttribute = 0;
     while (tmpEnumeration.hasMoreElements())
     {
       tmpIAttribute = tmpEnumeration.nextElement();
       for (String element : attributeNameList) {
         if(tmpIAttribute.getName().equalsIgnoreCase(element.trim()))
         {
           tmpAttributePolledList.add(tmpIAttribute);
           if(!(tmpIAttribute instanceof INumberScalar))
           {
             tmpInvalidAttribute++;
             ConnectionErrorDialog.showMessageDialog(this, null, "\n" + tmpIAttribute.getName() + "is not a numerical scalar");
           }
           break;
         }
       }
     }
     if(tmpAttributePolledList.size() + tmpInvalidAttribute + m_attributeKOList.size() == attributeNameList.length)
     {
       BindingTango.removeConnectionListener(this);
       setModel(tmpAttributePolledList);
       String tmpAttributeName = null;
       Enumeration<?> tmpEnumerationEntity = tmpAttributePolledList.elements();
       tmpIAttribute = null;
       while (tmpEnumerationEntity.hasMoreElements()) {
         tmpIAttribute = (IAttribute) tmpEnumerationEntity.nextElement();
         tmpAttributeName = tmpIAttribute.getName();
         super.addToAxis(tmpAttributeName, Trend.SEL_Y1, true);
       }
       setSelectionTreeVisible(isSelectionTreeVisible());
       setToolbarVisible(toolbarVisible);
       setAutoScale(autoScale);
View Full Code Here

    return instance;
  }

  public void removeAttribute(String attributeName) {
    try {
      IAttribute attribute = getAttribute(attributeName);
      if (attributes.contains(attribute)) {
        synchronized (this) {
          attributes.remove(attributes);
        }
        buildNames();
View Full Code Here

TOP

Related Classes of fr.esrf.tangoatk.core.IAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.