Class Location

    • Constructor Detail

      • Location

        public Location​(Element prototype)
        Creates a location based on a given prototype. Use Template.createLocation instead and then insert it into the Template.
        Parameters:
        prototype - the prototype containing default properties.
        See Also:
        Template.createLocation()
    • Method Detail

      • accept

        public void accept​(Visitor visitor)
                    throws Exception
        Description copied from class: Element
        Accept a visitor. This method is specialized in every subclass. Part of the visitor pattern.
        Overrides:
        accept in class Node
        Parameters:
        visitor - - The visitor
        Throws:
        Exception - the visitor threw an exception.
      • setProperty

        public Property setProperty​(String property,
                                    Object value)
        When setting the init property to true, the init property of all other locations in the same template is removed.
        Overrides:
        setProperty in class Element
        Parameters:
        property - - The location property string
        value - - The property value
        Returns:
        the property object.
      • getPrototypeFromParent

        public Element getPrototypeFromParent​(Element parent)
        Description copied from class: Element
        Return the proper prototype for this element stored in the parent. This is used by importInto().
        Overrides:
        getPrototypeFromParent in class Element
        Parameters:
        parent - - The parent element
        Returns:
        the #location property value of the parent argument.
      • getName

        public String getName()
        Description copied from class: AbstractLocation
        Constructs a human-friendly name of this location. Basically it is the value of the "name" property, except that it will give a unicode symbol in case it is anonymous.
        Specified by:
        getName in class AbstractLocation
        Returns:
        the "name" property
      • getXMLLabelKinds

        public String[] getXMLLabelKinds()
        Description copied from class: Element
        Returns possible XML label kinds this element supports.
        Overrides:
        getXMLLabelKinds in class Element
        Returns: