Class DrawingInfoLine<D extends Drawable>

  • Type Parameters:
    D - The drawable type for which this is the DrawingInfo
    All Implemented Interfaces:
    DrawingInfo
    Direct Known Subclasses:
    DrawingInfoStripe

    public class DrawingInfoLine<D extends Drawable>
    extends java.lang.Object
    implements DrawingInfo
    DrawingInfoLine stores the drawing information about a line. This can be interpreted by a visualization or animation class.

    Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
    Author:
    Alexander Verbraeck
    • Constructor Summary

      Constructors 
      Constructor Description
      DrawingInfoLine()
      Create an empty DrawingInfo object for a line.
      DrawingInfoLine​(java.awt.Color lineColor, float lineWidth)
      Create a DrawingInfo object for a line.
      DrawingInfoLine​(Colorer<D> lineColorer, float lineWidth)
      Create a DrawingInfo object for a line.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getLineColor​(D drawable)
      The returned color could be dependent on the state of the object representing the line.
      float getLineWidth()  
      void setLineColor​(java.awt.Color lineColor)
      Set the line color using a FixedColorer.
      void setLineColorer​(Colorer<D> lineColorer)
      Set the line colorer.
      void setLineWidth​(float lineWidth)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DrawingInfoLine

        public DrawingInfoLine()
        Create an empty DrawingInfo object for a line.
      • DrawingInfoLine

        public DrawingInfoLine​(java.awt.Color lineColor,
                               float lineWidth)
        Create a DrawingInfo object for a line.
        Parameters:
        lineColor - Color; the line color
        lineWidth - float; the line width, which could be relative and is open for interpretation by the visualization or animation class
      • DrawingInfoLine

        public DrawingInfoLine​(Colorer<D> lineColorer,
                               float lineWidth)
        Create a DrawingInfo object for a line.
        Parameters:
        lineColorer - Colorer<D>; the line colorer
        lineWidth - float; the line width, which could be relative and is open for interpretation by the visualization or animation class
    • Method Detail

      • getLineColor

        public final java.awt.Color getLineColor​(D drawable)
        The returned color could be dependent on the state of the object representing the line. E.g., it turns red under certain circumstances.
        Parameters:
        drawable - D; the object that could influence the color of the line
        Returns:
        the color of the line
      • setLineColor

        public final void setLineColor​(java.awt.Color lineColor)
        Set the line color using a FixedColorer.
        Parameters:
        lineColor - Color; lineColor to set
      • setLineColorer

        public final void setLineColorer​(Colorer<D> lineColorer)
        Set the line colorer.
        Parameters:
        lineColorer - Colorer<D>; lineColorer to set
      • getLineWidth

        public final float getLineWidth()
        Returns:
        lineWidth
      • setLineWidth

        public final void setLineWidth​(float lineWidth)
        Parameters:
        lineWidth - float; lineWidth to set