Package com.treemap.swing

# Class SwingTreeMapView<N,Row,Column>

java.lang.Object
com.treemap.AbstractTreeMapView<JComponent,N,Row,Column,Color,Font>
com.treemap.swing.SwingTreeMapView<N,Row,Column>

All Implemented Interfaces:
  `TreeMapView<JComponent,N,Row,Column,Color,Font>`

public class SwingTreeMapView<N,Row,Column> extends AbstractTreeMapView<JComponent,N,Row,Column,Color,Font>
Provides a view for a TreeMapModel

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `final class`
  `SwingTreeMapView.NativeComponent`

  ## Nested classes/interfaces inherited from interface com.treemap.TreeMapView

  `TreeMapView.Progressive`

- ## Field Summary

  ### Fields inherited from class com.treemap.AbstractTreeMapView

  `_model, _postRenderers, _preProgressiveRenderers, _preRenderers, _progressive, _progressiveRenderers, _shapes, _showTiming, headerRenderer, labelRenderer, probingToolTip, screenTransform, selectionToolTip, tooltipRenderer, xRangeModel, yRangeModel`

  ### Fields inherited from interface com.treemap.TreeMapView

  `PROPERTY_PROGRESSIVE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SwingTreeMapView()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addContextMenuListener(com.macrofocus.crossplatform.CPCanvas.ContextMenuListener l)`
  `void`
  `addKeyListener(com.macrofocus.crossplatform.CPCanvas.KeyListener l)`
  `void`
  `addMouseListener(com.macrofocus.crossplatform.CPCanvas.MouseListener l)`
  `void`
  `addMouseMotionListener(com.macrofocus.crossplatform.CPCanvas.MouseMotionListener l)`
  `void`
  `addMouseWheelListener(com.macrofocus.crossplatform.CPCanvas.MouseWheelListener l)`
  `com.macrofocus.igraphics.CPColor<Color>`
  `getBackground()`
  `BufferedImage`
  `getImage()`
  Creates a new image and render the current treemap into it.
  `JComponent`
  `getNativeComponent()`
  `RenderingHints`
  `getRenderingHints()`
  `Dimension`
  `getSize()`
  `BufferedImage`
  `getToolTipImage(N node)`
  Creates a new image and render the tooltip used for probing into it.
  `com.macrofocus.geom.Point`
  `getToolTipPreferredLocation(N node)`
  Returns the preferred location of the probing tooltip for the specified node.
  `protected void`
  `repaint(long delay)`
  `void`
  `setLicenseModel(LicenseModel licenseModel)`
  `void`
  `setModel(TreeMapModel<N,Row,Column,Color,Font> model)`
  Sets the data model and registers with it for listener notifications from the new data model.
  `void`
  `setProgressive(TreeMapView.Progressive progressive)`
  Sets whether progressive display mode is enabled.
  `void`
  `setRenderingHints(RenderingHints renderingHints)`
  `void`
  `setShowTiming(boolean showTiming)`
  Sets whether information about refresh rate should be displayed.
  `void`
  `setSize(Dimension dimension)`
  `void`
  `updateModelDimension()`
  `protected void`
  `updateSize()`
  `void`
  `waitUntilReady()`
  Wait until all processing are completed.

  ### Methods inherited from class com.treemap.AbstractTreeMapView

  `addPostRenderer, addPreProgressiveRenderer, addPreRenderer, addProgressiveRenderer, contains, drill, drillDown, drillUp, getHeaderRenderer, getHeadless, getLabelRenderer, getModel, getNode, getNodes, getPostRenderers, getPreProgressiveRenderers, getPreRenderers, getProgressive, getProgressiveRenderers, getRenderedShape, getRubberBand, getScreenTransform, getSelectionToolTip, getToolTip, getTooltipRenderer, getViewport, getWorld, getXRangeModel, getYRangeModel, getZoomFactor, isDirty, isSelectionMode, isShowTiming, isUpdateModelDimension, repaint, screenToWorldX, screenToWorldY, setDirty, setHeaderRenderer, setLabelRenderer, setSelectionMode, setSelectionToolTip, setToolTip, setTooltipRenderer, setUpdateModelDimension, worldToScreen, worldToScreen, worldToScreenPrecise, worldToScreenRectangle, worldToScreenX, worldToScreenY, zoom, zoomIn, zoomOut`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SwingTreeMapView

    public SwingTreeMapView()

- ## Method Details

  - ### getRenderingHints

    public RenderingHints getRenderingHints()

  - ### setRenderingHints

    public void setRenderingHints(RenderingHints renderingHints)

  - ### setModel

    public void setModel(TreeMapModel<N,Row,Column,Color,Font> model)
    Description copied from class: `AbstractTreeMapView`
    Sets the data model and registers with it for listener notifications from the new data model.
    Specified by:
      `setModel` in interface `TreeMapView<JComponent,N,Row,Column,Color,Font>`
    Overrides:
      `setModel` in class `AbstractTreeMapView<JComponent,N,Row,Column,Color,Font>`
    Parameters:
      `model` - the new data model
    See Also:
      - `TreeMapView.getModel()`

  - ### updateSize

    protected void updateSize()
    Specified by:
      `updateSize` in class `AbstractTreeMapView<JComponent,N,Row,Column,Color,Font>`

  - ### updateModelDimension

    public void updateModelDimension()

  - ### setLicenseModel

    public void setLicenseModel(LicenseModel licenseModel)

  - ### getImage

    public BufferedImage getImage()
    Creates a new image and render the current treemap into it. It will wait that all pending update requests to be completed before proceeding to the rendering. The tooltip won't be rendered.
    Returns:
      an image containing the current treemap.

  - ### getToolTipImage

    public BufferedImage getToolTipImage(N node)
    Creates a new image and render the tooltip used for probing into it.
    Parameters:
      `node` - the node for which the tooltip should be rendered
    Returns:
      an image containing the tooltip

  - ### getToolTipPreferredLocation

    public com.macrofocus.geom.Point getToolTipPreferredLocation(N node)
    Returns the preferred location of the probing tooltip for the specified node.
    Parameters:
      `node` - the node to query about its preferred location
    Returns:
      the preferred location of the tooltip in screen coordinates

  - ### waitUntilReady

    public void waitUntilReady()
    Wait until all processing are completed.

  - ### setShowTiming

    public void setShowTiming(boolean showTiming)
    Sets whether information about refresh rate should be displayed.
    Parameters:
      `showTiming` - true to display refresh rate information, false otherwise

  - ### setProgressive

    public void setProgressive(TreeMapView.Progressive progressive)
    Sets whether progressive display mode is enabled.
    Parameters:
      `progressive` - true if progressive display mode is enabled, false otherwise

  - ### getNativeComponent

    public JComponent getNativeComponent()

  - ### getBackground

    public com.macrofocus.igraphics.CPColor<Color> getBackground()

  - ### getSize

    public Dimension getSize()

  - ### setSize

    public void setSize(Dimension dimension)

  - ### repaint

    protected void repaint(long delay)
    Specified by:
      `repaint` in class `AbstractTreeMapView<JComponent,N,Row,Column,Color,Font>`

  - ### addMouseListener

    public void addMouseListener(com.macrofocus.crossplatform.CPCanvas.MouseListener l)

  - ### addMouseMotionListener

    public void addMouseMotionListener(com.macrofocus.crossplatform.CPCanvas.MouseMotionListener l)

  - ### addMouseWheelListener

    public void addMouseWheelListener(com.macrofocus.crossplatform.CPCanvas.MouseWheelListener l)

  - ### addKeyListener

    public void addKeyListener(com.macrofocus.crossplatform.CPCanvas.KeyListener l)

  - ### addContextMenuListener

    public void addContextMenuListener(com.macrofocus.crossplatform.CPCanvas.ContextMenuListener l)