Class TrailRenderer

  • All Implemented Interfaces:
    adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, adams.gui.visualization.debug.objectrenderer.ObjectRenderer, Serializable

    public class TrailRenderer
    extends adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
    Renders Trail objects.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected TrailPanel m_LastTrailPanel
      the last setup.
      • Fields inherited from class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer

        m_Cache, m_RendererClasses, m_Renderers
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      TrailRenderer()  
    • Field Detail

      • m_LastTrailPanel

        protected TrailPanel m_LastTrailPanel
        the last setup.
    • Constructor Detail

      • TrailRenderer

        public TrailRenderer()
    • Method Detail

      • handles

        public boolean handles​(Class cls)
        Checks whether the renderer can handle the specified class.
        Specified by:
        handles in interface adams.gui.visualization.debug.objectrenderer.ObjectRenderer
        Specified by:
        handles in class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
        Parameters:
        cls - the class to check
        Returns:
        true if the renderer can handle this type of object
      • canRenderCached

        public boolean canRenderCached​(Object obj,
                                       JPanel panel)
        Checks whether the renderer can use a cached setup to render an object.
        Specified by:
        canRenderCached in interface adams.gui.visualization.debug.objectrenderer.ObjectRenderer
        Overrides:
        canRenderCached in class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
        Parameters:
        obj - the object to render
        panel - the panel to render into
        Returns:
        true if possible
      • doRenderCached

        protected String doRenderCached​(Object obj,
                                        JPanel panel,
                                        Integer limit)
        Performs the actual rendering.
        Overrides:
        doRenderCached in class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
        Parameters:
        obj - the object to render
        panel - the panel to render into
        limit - the limit to use for the rendering (if applicable), ignored if null
        Returns:
        null if successful, otherwise error message
      • doRender

        protected String doRender​(Object obj,
                                  JPanel panel,
                                  Integer limit)
        Performs the actual rendering.
        Specified by:
        doRender in class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
        Parameters:
        obj - the object to render
        panel - the panel to render into
        limit - the limit to use for the rendering (if applicable), ignored if null
        Returns:
        null if successful, otherwise error message