All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jive3.AttributeNode Maven / Gradle / Ivy

The newest version!
package jive3;

import fr.esrf.Tango.DevFailed;
import fr.esrf.TangoApi.Database;
import fr.esrf.TangoApi.DeviceProxy;
import jive.JiveUtils;

import javax.swing.*;
import java.io.IOException;

/**
 * Attribute Property node
 */
public class AttributeNode extends TangoNode {

  private String devName;
  private TreePanel self;
  private Database db;

  AttributeNode(TreePanel self,String devName,Database db) {
    this.devName = devName;
    this.self = self;
    this.db = db;
  }

  void populateNode() throws DevFailed {

    String[] list = new String[0];
    String[] devList = new String[0];
    String[] dbList = new String[0];
    int idl = 0; // 0 means that no property will be considered as attribute config.
    // In other terms , that means that if the device doesn't run , all
    // attribute properties will appear in the attribute property node.
    DeviceProxy ds = new DeviceProxy(devName);

    try {
      devList = ds.get_attribute_list();
      idl = ds.get_idl_version();
    } catch( DevFailed e) {
    }
    dbList = db.get_device_attribute_list(devName);

    JiveUtils.sortList(list);
    for(int i=0;i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy