Class mxGraphOutline

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class mxGraphOutline extends JComponent
An outline view for a specific graph component.
See Also:
  • Field Details

    • DEFAULT_ZOOMHANDLE_FILL

      public static Color DEFAULT_ZOOMHANDLE_FILL
    • graphComponent

      protected mxGraphComponent graphComponent
    • tripleBuffer

      protected BufferedImage tripleBuffer
      TODO: Not yet implemented.
    • tripleBufferGraphics

      protected Graphics2D tripleBufferGraphics
      Holds the graphics of the triple buffer.
    • repaintBuffer

      protected boolean repaintBuffer
      True if the triple buffer needs a full repaint.
    • repaintClip

      protected mxRectangle repaintClip
      Clip of the triple buffer to be repainted.
    • tripleBuffered

      protected boolean tripleBuffered
    • finderBounds

      protected Rectangle finderBounds
    • zoomHandleLocation

      protected Point zoomHandleLocation
    • finderVisible

      protected boolean finderVisible
    • zoomHandleVisible

      protected boolean zoomHandleVisible
    • useScaledInstance

      protected boolean useScaledInstance
    • antiAlias

      protected boolean antiAlias
    • drawLabels

      protected boolean drawLabels
    • fitPage

      protected boolean fitPage
      Specifies if the outline should be zoomed to the page if the graph component is in page layout mode. Default is true.
    • outlineBorder

      protected int outlineBorder
      Not yet implemented. Border to add around the page bounds if wholePage is true. Default is 4.
    • tracker

      protected mxGraphOutline.MouseTracker tracker
    • scale

      protected double scale
    • translate

      protected Point translate
    • zoomGesture

      protected transient boolean zoomGesture
    • repaintHandler

      protected mxEventSource.mxIEventListener repaintHandler
    • componentHandler

      protected ComponentListener componentHandler
    • adjustmentHandler

      protected AdjustmentListener adjustmentHandler
  • Constructor Details

  • Method Details

    • setTripleBuffered

      public void setTripleBuffered(boolean tripleBuffered)
      Fires a property change event for tripleBuffered.
      Parameters:
      tripleBuffered - the tripleBuffered to set
    • isTripleBuffered

      public boolean isTripleBuffered()
    • setDrawLabels

      public void setDrawLabels(boolean drawLabels)
      Fires a property change event for drawLabels.
      Parameters:
      drawLabels - the drawLabels to set
    • isDrawLabels

      public boolean isDrawLabels()
    • setAntiAlias

      public void setAntiAlias(boolean antiAlias)
      Fires a property change event for antiAlias.
      Parameters:
      antiAlias - the antiAlias to set
    • isAntiAlias

      public boolean isAntiAlias()
      Returns:
      the antiAlias
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class JComponent
    • setFinderVisible

      public void setFinderVisible(boolean visible)
    • setZoomHandleVisible

      public void setZoomHandleVisible(boolean visible)
    • setFitPage

      public void setFitPage(boolean fitPage)
      Fires a property change event for fitPage.
      Parameters:
      fitPage - the fitPage to set
    • isFitPage

      public boolean isFitPage()
    • getGraphComponent

      public mxGraphComponent getGraphComponent()
    • setGraphComponent

      public void setGraphComponent(mxGraphComponent graphComponent)
      Fires a property change event for graphComponent.
      Parameters:
      graphComponent - the graphComponent to set
    • checkTripleBuffer

      public void checkTripleBuffer()
      Checks if the triple buffer exists and creates a new one if it does not. Also compares the size of the buffer with the size of the graph and drops the buffer if it has a different size.
    • createTripleBuffer

      protected void createTripleBuffer(int width, int height)
      Creates the tripleBufferGraphics and tripleBuffer for the given dimension and draws the complete graph onto the triplebuffer.
      Parameters:
      width -
      height -
    • destroyTripleBuffer

      public void destroyTripleBuffer()
      Destroys the tripleBuffer and tripleBufferGraphics objects.
    • repaintTripleBuffer

      public void repaintTripleBuffer(Rectangle clip)
      Clears and repaints the triple buffer at the given rectangle or repaints the complete buffer if no rectangle is specified.
      Parameters:
      clip -
    • updateFinder

      public void updateFinder(boolean repaint)
    • updateFinderBounds

      public void updateFinderBounds(Rectangle bounds, boolean repaint)
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • paintBackground

      protected void paintBackground(Graphics g)
      Paints the background.
    • paintGraph

      public void paintGraph(Graphics g)
      Paints the graph outline.
    • paintForeground

      protected void paintForeground(Graphics g)
      Paints the foreground. Foreground is dynamic and should never be made part of the triple buffer. It is painted on top of the buffer.
    • updateScaleAndTranslate

      public boolean updateScaleAndTranslate()
      Returns true if the scale or translate has changed.