Class PhysicalTreeView


  • public class PhysicalTreeView
    extends AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
    View for graphic visualization of physical tree. Physical trees are used in the context of FTTx networks. In these scenarios, the connection from the exchange office branches out through splice boxes, fiber splitters and other equipment till it reaches the subscribers, forming a tree. Note that the backwards path (from the subscriber to the XO) is linear.
    Author:
    Orlando Paz <orlando.paz@kuwaiba.org>
    • Method Detail

      • getAsXml

        public byte[] getAsXml()
        Description copied from class: AbstractView
        Exports the view to XML. It most likely will have to be called after calling #build() or #build(java.lang.Object).
        Specified by:
        getAsXml in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Returns:
        A byte array with an XML document representing the view. The format of the document must follow the Standard Kuwaiba View Text Format (SKTF)
      • getAsImage

        public byte[] getAsImage()
        Description copied from class: AbstractView
        Exports the view to a PNG image. It most likely will have to be called after calling #build() or #build(java.lang.Object).
        Specified by:
        getAsImage in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Returns:
        A byte array with a PNG formatted image of the view.
      • getAsUiElement

        public com.vaadin.flow.component.orderedlayout.HorizontalLayout getAsUiElement()
                                                                                throws InvalidArgumentException
        Description copied from class: AbstractView
        Gets an embeddable visual component that can be rendered in a dashboard.It most likely will have to be called after calling #build() or #build(java.lang.Object).
        Specified by:
        getAsUiElement in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Returns:
        An embeddable component (Panel, VerticalLayout, etc)
        Throws:
        InvalidArgumentException - If the component could not be created for some reason (most likely, misconfiguration).
      • buildFromSavedView

        public void buildFromSavedView​(byte[] view)
        Description copied from class: AbstractView
        Builds the view. Call this method if no business object is required to build the view. It just loads the elements from an view definition structure (like an XML document).
        Specified by:
        buildFromSavedView in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        view - The view to be rendered.
      • addNode

        public AbstractViewNode addNode​(BusinessObjectLight businessObject,
                                        Properties properties)
        Description copied from class: AbstractView
        Adds a node to views that are not generated automatically.
        Specified by:
        addNode in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        businessObject - The business object behind the node to be added. Nodes that already exist will not be added.
        properties - The properties associated to this object, such as the location that will be used to place it or the URL of the icon that will represent the node.
        Returns:
        A reference to the newly added node.
      • addEdge

        public AbstractViewEdge addEdge​(BusinessObjectLight businessObject,
                                        BusinessObjectLight sourceBusinessObject,
                                        BusinessObjectLight targetBusinessObject,
                                        Properties properties)
        Description copied from class: AbstractView
        Adds an edge to views that are not generated automatically.
        Specified by:
        addEdge in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        businessObject - The business object behind the edge to be added. Edges that already exist will not be added.
        sourceBusinessObject - The business object behind the source node to the edge to be created.
        targetBusinessObject - The business object behind the target node to the edge to be created.
        properties - The properties associated to this object, such as the control points of the edge, or its color.
        Returns:
        A reference to the newly added edge.
      • removeNode

        public void removeNode​(BusinessObjectLight businessObject)
        Description copied from class: AbstractView
        remove a node from the viewMap
        Specified by:
        removeNode in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        businessObject - The business object behind the node to be removed
      • removeEdge

        public void removeEdge​(BusinessObjectLight businessObject)
        Description copied from class: AbstractView
        remove a edge from the viewMap
        Specified by:
        removeEdge in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        businessObject - The business object behind the edge to be removed
      • nodeClickListener

        public void nodeClickListener​(ViewEventListener listener)
        Description copied from class: AbstractView
        Adds a listener to the node click events.
        Specified by:
        nodeClickListener in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        listener - The listener object.
      • edgeClickListener

        public void edgeClickListener​(ViewEventListener listener)
        Description copied from class: AbstractView
        Adds a listener to the edge click events.
        Specified by:
        edgeClickListener in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
        Parameters:
        listener - The listener object.
      • clean

        public void clean()
        Description copied from class: AbstractView
        Cleans the view so some other thing can be painted on the canvas. Typically this is used in refresh buttons.
        Specified by:
        clean in class AbstractView<com.vaadin.flow.component.orderedlayout.HorizontalLayout>