Package de.f0rce.viz

Class Viz

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
de.f0rce.viz.Viz
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, java.io.Serializable

@NpmPackage(value="viz.js",version="2.1.2") @NpmPackage(value="svg-pan-zoom",version="3.6.1")
@JsModule("./@f0rce/viz-widget/viz-widget.js")
@Tag("viz-widget")
public class Viz
extends com.vaadin.flow.component.html.Div
implements com.vaadin.flow.component.HasSize
Author:
David "F0rce" Dodlek
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Viz()  
  • Method Summary

    Modifier and Type Method Description
    VizEngine getEngine()
    Returns the current set engine.
    VizFormat getFormat()
    Returns the current set format.
    java.lang.String getGraph()
    Returns the current set graph.
    java.lang.String getMimeType()
    Returns the current set MIME-Type.
    boolean isMouseWheelZoomEnabled()
    Returns if mousewheel-scrolling is enabled/disabled.
    boolean isShowControlIcons()
    Returns if the control icons are enabled/disabled.
    void setEngine​(VizEngine engine)
    Sets the engine for the renderer.
    void setFormat​(VizFormat format)
    Sets the format for the renderer.
    void setGraph​(java.io.File file)
    Sets the graph for the widget to render (read from .dot file).
    void setGraph​(java.lang.String graph)
    Sets the graph for the widget to render.
    void setMimeType​(java.lang.String mimeType)
    In IMG mode setFormat(VizFormat) sets the MIME-Type for the renderer.
    void setMouseWheelZoomEnabled​(boolean mouseWheelZoomEnabled)
    In SVG mode setFormat(VizFormat) sets if mousewheel-scrooling should be enabled/disabled.
    void showControlIcons​(boolean showControlIcons)
    In SVG mode setFormat(VizFormat) sets if the control icons in the bottom right corner should be displayed or not.

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    Methods inherited from class com.vaadin.flow.component.Component

    from, getChildren, getElement, getId, getParent, getTranslation, getTranslation, getUI, isVisible, onEnabledStateChanged, setId, setVisible

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, addComponentAsFirst, addComponentAtIndex, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    getText, setText
  • Constructor Details

    • Viz

      public Viz()
  • Method Details

    • setGraph

      public void setGraph​(java.lang.String graph)
      Sets the graph for the widget to render.
      Parameters:
      graph - String
    • setGraph

      public void setGraph​(java.io.File file)
      Sets the graph for the widget to render (read from .dot file).
      Parameters:
      file - File
    • getGraph

      public java.lang.String getGraph()
      Returns the current set graph.
      Returns:
      String
    • showControlIcons

      public void showControlIcons​(boolean showControlIcons)
      In SVG mode setFormat(VizFormat) sets if the control icons in the bottom right corner should be displayed or not.
      Parameters:
      showControlIcons - boolean
    • isShowControlIcons

      public boolean isShowControlIcons()
      Returns if the control icons are enabled/disabled.
      Returns:
      boolean
    • setEngine

      public void setEngine​(VizEngine engine)
      Sets the engine for the renderer.
      Parameters:
      engine - VizEngine
    • getEngine

      public VizEngine getEngine()
      Returns the current set engine.
      Returns:
      VizEngine
    • setFormat

      public void setFormat​(VizFormat format)
      Sets the format for the renderer.
      Parameters:
      format - VizFormat
    • getFormat

      public VizFormat getFormat()
      Returns the current set format.
      Returns:
      VizFormat
    • setMimeType

      public void setMimeType​(java.lang.String mimeType)
      In IMG mode setFormat(VizFormat) sets the MIME-Type for the renderer. MIME-Type has to start with "image/".
      Parameters:
      mimeType - String
    • getMimeType

      public java.lang.String getMimeType()
      Returns the current set MIME-Type.
      Returns:
      String
    • setMouseWheelZoomEnabled

      public void setMouseWheelZoomEnabled​(boolean mouseWheelZoomEnabled)
      In SVG mode setFormat(VizFormat) sets if mousewheel-scrooling should be enabled/disabled.
      Parameters:
      mouseWheelZoomEnabled - boolean
    • isMouseWheelZoomEnabled

      public boolean isMouseWheelZoomEnabled()
      Returns if mousewheel-scrolling is enabled/disabled.
      Returns:
      boolean