Class FileSinkVideoImages

java.lang.Object
org.graphstream.stream.file.FileSinkImages
casa.lepton.ui.FileSinkVideoImages
All Implemented Interfaces:
org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.file.FileSink, org.graphstream.stream.Sink

public class FileSinkVideoImages extends org.graphstream.stream.file.FileSinkImages
Extends the GraphStream FileSinkImages class in order to allow to insert specialized pre-renderers. Inserting specialized post-renderers was already possible and was used for providing the addLogo method. In this version of the class, a pre-renderer is implemented for providing the addBackground method and a another post-renderer is implemented for providing the addTimer method.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
    static interface 
    Defines pre rendering action on images.

    Nested classes/interfaces inherited from class org.graphstream.stream.file.FileSinkImages

    org.graphstream.stream.file.FileSinkImages.AddLogoRenderer, org.graphstream.stream.file.FileSinkImages.CustomResolution, org.graphstream.stream.file.FileSinkImages.InnerLayoutRunner, org.graphstream.stream.file.FileSinkImages.LayoutPolicy, org.graphstream.stream.file.FileSinkImages.Option, org.graphstream.stream.file.FileSinkImages.OutputPolicy, org.graphstream.stream.file.FileSinkImages.OutputRunner, org.graphstream.stream.file.FileSinkImages.OutputType, org.graphstream.stream.file.FileSinkImages.PostRenderer, org.graphstream.stream.file.FileSinkImages.Quality, org.graphstream.stream.file.FileSinkImages.RendererType, org.graphstream.stream.file.FileSinkImages.Resolution, org.graphstream.stream.file.FileSinkImages.Resolutions
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class org.graphstream.stream.file.FileSinkImages

    autofit, clearImageBeforeOutput, counter, filePrefix, g2d, gg, hasBegan, image, layout, layoutPipeIn, layoutPolicy, layoutStabilizationLimit, layoutStepAfterStabilization, layoutStepPerFrame, layoutStepWithoutFrame, optLayout, outputPolicy, outputRunner, outputRunnerAlive, outputRunnerDelay, outputRunnerProxy, outputType, postRenderers, renderer, resolution, sink, styleSheet
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    FileSinkVideoImages(String prefix, org.graphstream.stream.file.FileSinkImages.OutputType type, org.graphstream.stream.file.FileSinkImages.Resolution resolution, org.graphstream.stream.file.FileSinkImages.OutputPolicy outputPolicy, OppNetGraph graph)
     
    FileSinkVideoImages(org.graphstream.stream.file.FileSinkImages.OutputType type, org.graphstream.stream.file.FileSinkImages.Resolution resolution, OppNetGraph graph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBackground(File backgroundFile, int sinkWidth, int sinkHeight)
    Pre rendering action allowing to add a background picture on images.
    void
    addTimer(OppNetGraph graph, Corner corner)
    Post-rendering action to display the time in a corner of the image
    void
    Produce a new image.
    void
    Almost identical to the original method in FileSinkImages.

    Methods inherited from class org.graphstream.stream.file.FileSinkImages

    addLogo, begin, begin, begin, clearGG, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, end, flush, getViewCenter, getViewPercent, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, initImage, main, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved, printProgress, setAutofit, setClearImageBeforeOutputEnabled, setGraphViewport, setLayoutPolicy, setLayoutStabilizationLimit, setLayoutStepAfterStabilization, setLayoutStepPerFrame, setOutputPolicy, setOutputRunnerDelay, setOutputRunnerEnabled, setQuality, setRenderer, setResolution, setResolution, setStyleSheet, setViewCenter, setViewPercent, stabilizeLayout, stepBegins, usage, writeAll, writeAll, writeAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FileSinkVideoImages

      public FileSinkVideoImages(OppNetGraph graph)
    • FileSinkVideoImages

      public FileSinkVideoImages(org.graphstream.stream.file.FileSinkImages.OutputType type, org.graphstream.stream.file.FileSinkImages.Resolution resolution, OppNetGraph graph)
    • FileSinkVideoImages

      public FileSinkVideoImages(String prefix, org.graphstream.stream.file.FileSinkImages.OutputType type, org.graphstream.stream.file.FileSinkImages.Resolution resolution, org.graphstream.stream.file.FileSinkImages.OutputPolicy outputPolicy, OppNetGraph graph)
  • Method Details

    • outputNewImage

      public void outputNewImage()
      Produce a new image.
      Overrides:
      outputNewImage in class org.graphstream.stream.file.FileSinkImages
    • outputNewImage

      public void outputNewImage(String filename)
      Almost identical to the original method in FileSinkImages. The only thing added is the execution of the pre-renderers
      Overrides:
      outputNewImage in class org.graphstream.stream.file.FileSinkImages
    • addTimer

      public void addTimer(OppNetGraph graph, Corner corner)
      Post-rendering action to display the time in a corner of the image
    • addBackground

      public void addBackground(File backgroundFile, int sinkWidth, int sinkHeight)
      Pre rendering action allowing to add a background picture on images.