Class ElementAttribute

    • Constructor Detail

      • ElementAttribute

        public ElementAttribute​(Element element,
                                java.lang.String attributeName)
        The constructor which requires both, an element and the attribute name
        Parameters:
        element - the element instance to which the attribute belongs
        attributeName - the name of the attribute
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface Knob
        Returns:
        a description for this knob
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Knob
        Returns:
        the name of the knob
      • doSetTotalValue

        protected final void doSetTotalValue​(double value)
        Description copied from class: AbstractKnob
        has to be implemented by subclass to set the total value to madx. The only call from this is from setTotalValue, which also notifies the listeners.
        Specified by:
        doSetTotalValue in class AbstractKnob
        Parameters:
        value - the value to set
      • getTotalValue

        public double getTotalValue()
        Specified by:
        getTotalValue in interface Knob
        Returns:
        the total value (value+offset)
      • getKey

        public java.lang.String getKey()
        Specified by:
        getKey in interface Knob
        Returns:
        a unique key (within all knobs of the same type)
      • getType

        public KnobType getType()
        Specified by:
        getType in interface Knob
        Returns:
        the type of this knob
      • getKnobType

        public static KnobType getKnobType()
      • createKey

        public static java.lang.String createKey​(Element element,
                                                 java.lang.String attributeName)
        creates a key for an given element and attribute-name
        Parameters:
        element - the element to use in the combined key
        attributeName - the name of the attribute to use in the combined key
        Returns:
        a key which can be used in maps
      • getElementNameFromKey

        public static java.lang.String getElementNameFromKey​(java.lang.String key)
        extracts the element-name from the key
        Parameters:
        key - the key used in maps for element-attributes
        Returns:
        the name of the element which is contained in the attribute-key
      • getAttributeNameFromKey

        public static java.lang.String getAttributeNameFromKey​(java.lang.String key)
        extracts the attribute-name from the key
        Parameters:
        key - the key from which to extract the attribute
        Returns:
        the name of the attribute contained in the key
      • getMadxName

        public java.lang.String getMadxName()
        Specified by:
        getMadxName in interface MadxParameter
        Returns:
        the name to be used in madx