Skip navigation links
salvo.jesus.graph.visual

Class AbstractVisualGraphComponent

    • Constructor Detail

      • AbstractVisualGraphComponent

        public AbstractVisualGraphComponent()
    • Method Detail

      • getLabel

        public String getLabel()
        Returns the text displayed for the VisualGraphComponent. This is simply a wrapper around the LabeledGraphComponent.getLabel() method
        Specified by:
        getLabel in interface VisualGraphComponent
      • getFillcolor

        public Color getFillcolor()
        Returns the color used to fill the VisualGraphComponent
        Specified by:
        getFillcolor in interface VisualGraphComponent
        Returns:
        The fill or background Color
      • getOutlinecolor

        public Color getOutlinecolor()
        Returns the color used to draw the outline of the VisualGraphComponent
        Specified by:
        getOutlinecolor in interface VisualGraphComponent
        Returns:
        The outline Color
      • getFont

        public Font getFont()
        Returns the font used to draw the String describing the VisualGraphComponent.
        Specified by:
        getFont in interface VisualGraphComponent
        Returns:
        The Font used to draw the string
      • getFontMetrics

        public FontMetrics getFontMetrics()
        Return the FontMetrics for this VisualGraphComponent., which is used to define the width and height of the text and therefore also of the component.
        Specified by:
        getFontMetrics in interface VisualGraphComponent
      • getFontcolor

        public Color getFontcolor()
        Returns the color used to draw the string representation of the VisualGraphComponent
        Specified by:
        getFontcolor in interface VisualGraphComponent
        Returns:
        The font Color
      • getGeneralPath

        public GeneralPath getGeneralPath()
        Returns the GeneralPath used for rendering the outline of the VisualGraphComponent.
        Specified by:
        getGeneralPath in interface VisualGraphComponent
        Returns:
        The GeneralPath used to draw the outline of the VisualGraphComponent.
      • getPainter

        public Painter getPainter()
        Returns the Painter that is used to paint this VisualGraphComponent.
        Returns:
        Painter delegate responsible for painting.
      • setFillcolor

        public void setFillcolor(Color fillcolor)
        Sets the fill color used to draw the VisualGraphComponent
        Specified by:
        setFillcolor in interface VisualGraphComponent
        Parameters:
        c - The new Color object that will be used as the fill color on the next painting of the VisualGraphComponent
      • setLabel

        public void setLabel(String text)
        Sets the text displayed for the VisualGraphComponent. This is simply a wrapper around the LabeledGraphComponent.setLabel() method
        Specified by:
        setLabel in interface VisualGraphComponent
      • setOutlinecolor

        public void setOutlinecolor(Color outlinecolor)
        Sets the outline color used to draw the VisualGraphComponent
        Specified by:
        setOutlinecolor in interface VisualGraphComponent
        Parameters:
        c - The new Color object that will be used as the outline color on the next painting of the VisualGraphComponent
      • setFont

        public void setFont(Font font)
        Sets the font used to draw the String describing the VisualGraphComponent
        Specified by:
        setFont in interface VisualGraphComponent
        Parameters:
        f - The new Font that will be used
      • setFontcolor

        public void setFontcolor(Color fontcolor)
        Sets the color of the font used to draw the String describing the VisualGraphComponent
        Specified by:
        setFontcolor in interface VisualGraphComponent
        Parameters:
        fontcolor - Font color to be used
      • setGeneralPath

        public void setGeneralPath(GeneralPath path)
        Sets geometry used to draw the outline of the VisualGraphComponent.
        Specified by:
        setGeneralPath in interface VisualGraphComponent
        Parameters:
        path - A GeneralPath object used to draw outline of the VisualGraphComponent.
      • setGeneralPath

        public void setGeneralPath(PathIterator pathIterator)
        Description copied from interface: VisualGraphComponent
        Sets geometry used to draw the outline of the VisualGraphComponent.
        Specified by:
        setGeneralPath in interface VisualGraphComponent
        Parameters:
        pathIterator - A PathIterator object used to draw outline of the VisualGraphComponent.
      • setPainter

        public void setPainter(Painter newPainter)
        Assigns a new Painter delegate which will be responsible for further painting of this VisualGraphComponent.
        Parameters:
        newPainter - The new Painter delegate.
      • getBounds

        public Rectangle getBounds()
        Returns the bounding Rectangle of the VisualGraphComponent.
        Specified by:
        getBounds in interface VisualGraphComponent
        Returns:
        The Rectangle bounding the VisualGraphComponent.
      • getBounds2D

        public Rectangle2D getBounds2D()
        Returns the bounding Rectangle of the VisualGraphComponent.
        Specified by:
        getBounds2D in interface VisualGraphComponent
        Returns:
        The Rectangle2D bounding the VisualGraphComponent.
      • addMouseListener

        public void addMouseListener(MouseListener l)
        Adds a listener to receive mouse events on this VisualGraphComponent.
        Specified by:
        addMouseListener in interface VisualGraphComponent
        Parameters:
        l - The listener to receive mouse events.
      • removeMouseListener

        public void removeMouseListener(MouseListener l)
        Removes the specified mouse listener so that it no longer receives mouse events from this VisualGraphComponent.
        Specified by:
        removeMouseListener in interface VisualGraphComponent
        Parameters:
        l - The listener to be removed.
      • removeMouseMotionListener

        public void removeMouseMotionListener(MouseMotionListener l)
        Removes the specified mouse motion listener so that it no longer receives mouse motion events from this VisualGraphComponent.
        Specified by:
        removeMouseMotionListener in interface VisualGraphComponent
        Parameters:
        l - The listener to receive mouse events.
      • processMouseEvent

        public void processMouseEvent(MouseEvent e)
        Processes mouse events occuring on this VisualGraphComponent. Notifies the registered mouse event listeners with the specified mouse event. This method is not directly called by Java, but must be called explicitly by the container (GraphPanel) where VisualGraphComponent is contained.
        Specified by:
        processMouseEvent in interface VisualGraphComponent
        Parameters:
        e - The mouse event
      • processMouseMotionEvent

        public void processMouseMotionEvent(MouseEvent e)
        Processes mouse motion events occuring on this VisualGraphComponent. Notifies the registered mouse motion event listeners with the specified mouse motion event. This method is not directly called by Java, but must be called explicitly by the container (GraphPanel) where VisualGraphComponent is contained.
        Specified by:
        processMouseMotionEvent in interface VisualGraphComponent
        Parameters:
        e - The mouse event
      • processKeyEvent

        public void processKeyEvent(KeyEvent e)
        Processes key events occuring on this VisualGraphComponent. This method is not directly called by Java, but must be called explicitly by the container (GraphPanel) where VisualGraphComponent is contained.

        Currently, this method does not do anything.

        Specified by:
        processKeyEvent in interface VisualGraphComponent

Copyright © 2019 JULIE Lab, Germany. All rights reserved.