Package aud.util

Class SVGViewer

java.lang.Object
aud.util.SVGViewer

public class SVGViewer extends Object
Simple SVG viewer based on Batik's SVGCanvas.

Usage:

  • Shift+Mouse Left = pan
  • Shift+Mouse Right (drag) = zoom in/out
  • Ctrl+Mouse Left = rectangle zoom
  • Ctrl+Mouse Right (drag) = rotate [disabled]
  • Ctrl+I = zoom in
  • Ctrl+O = zoom out
See Also:
  • Field Details

    • frame

      protected JFrame frame
    • svgCanvas

      protected org.apache.batik.swing.JSVGCanvas svgCanvas
    • label

      protected JLabel label
    • svgfile

      protected File svgfile
  • Constructor Details

    • SVGViewer

      public SVGViewer(JFrame parent, File svgfile)
      create new instance
  • Method Details

    • parent

      public JFrame parent()
      get parent widget
    • statusbar

      public JLabel statusbar()
      get status bar
    • close

      public void close()
      close viewer
    • createComponents

      protected JComponent createComponents()
    • display

      public void display(File file)
      display svg file
    • display

      public void display()
      display current svg file
    • help

      public static void help()
      print help (mouse/key bindings) to stdout
    • displayWindow

      public static SVGViewer displayWindow(File file, String caption)
      create new SVGViewer (toplevel window) and display file
    • setExitOnClose

      public void setExitOnClose()
      exit application if viewer is closed
    • main

      public static void main(String[] args)
      visualize given dot files (file names as command line arguments)