Package com.treemap

# Class AbstractTreeMapView<C,N,Row,Column,Color,Font>

java.lang.Object
com.treemap.AbstractTreeMapView<C,N,Row,Column,Color,Font>

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

Direct Known Subclasses:
  `SwingTreeMapView`

public abstract class AbstractTreeMapView<C,N,Row,Column,Color,Font> extends Object implements TreeMapView<C,N,Row,Column,Color,Font>
Created by luc on 03/02/16.

- ## Nested Class Summary

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

  `TreeMapView.Progressive`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected TreeMapModel<N,Row,Column,Color,Font>`
  `_model`
  `protected final List<TreeMapRenderer>`
  `_postRenderers`
  `protected final List<TreeMapRenderer>`
  `_preProgressiveRenderers`
  `protected final List<TreeMapRenderer>`
  `_preRenderers`
  `protected TreeMapView.Progressive`
  `_progressive`
  `protected final List<TreeMapRenderer>`
  `_progressiveRenderers`
  `protected final Map<N,com.macrofocus.geom.Shape>`
  `_shapes`
  `protected boolean`
  `_showTiming`
  `protected TreeMapHeaderRenderer<N,Row,Column,Color,Font>`
  `headerRenderer`
  `protected TreeMapLabelRenderer<C,N,Row,Column,Color,Font>`
  `labelRenderer`
  `protected TreeMapToolTip`
  `probingToolTip`
  `protected final com.macrofocus.transform.twod.MutableTwoDScreenTransform`
  `screenTransform`
  `protected TreeMapToolTip`
  `selectionToolTip`
  `protected TreeMapTooltipRenderer<C,N,Row,Column,Color,Font>`
  `tooltipRenderer`
  `protected final MutableBoundedInterval`
  `xRangeModel`
  `protected final MutableBoundedInterval`
  `yRangeModel`

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

  `PROPERTY_PROGRESSIVE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTreeMapView(Headless<Color,Font> headless)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `addPostRenderer(TreeMapRenderer renderer)`
  `protected void`
  `addPreProgressiveRenderer(TreeMapRenderer renderer)`
  `protected void`
  `addPreRenderer(TreeMapRenderer renderer)`
  `protected void`
  `addProgressiveRenderer(TreeMapRenderer renderer)`
  `boolean`
  `contains(com.macrofocus.geom.Point p, com.macrofocus.geom.Shape shape)`
  `void`
  `drill(int x, int y)`
  `void`
  `drillDown()`
  `void`
  `drillUp()`
  `TreeMapHeaderRenderer<N,Row,Column,Color,Font>`
  `getHeaderRenderer()`
  `Headless<Color,Font>`
  `getHeadless()`
  `TreeMapLabelRenderer<C,N,Row,Column,Color,Font>`
  `getLabelRenderer()`
  `TreeMapModel<N,Row,Column,Color,Font>`
  `getModel()`
  Returns the TreeMapModel that provides the data displayed by this TreeMapView.
  `N`
  `getNode(com.macrofocus.geom.Point p)`
  Returns the node at the specified location on the screen.
  `List<N>`
  `getNodes(com.macrofocus.geom.Rectangle rect)`
  Returns the nodes overlapping the specified rectangle.
  `Iterable<TreeMapRenderer>`
  `getPostRenderers()`
  `Iterable<TreeMapRenderer>`
  `getPreProgressiveRenderers()`
  `Iterable<TreeMapRenderer>`
  `getPreRenderers()`
  `TreeMapView.Progressive`
  `getProgressive()`
  Returns whether progressive display mode is enabled.
  `Iterable<TreeMapRenderer>`
  `getProgressiveRenderers()`
  `com.macrofocus.geom.Shape`
  `getRenderedShape(N node)`
  Returns the shape of the node according to its rendered position in screen coordinates.
  `com.macrofocus.rubberband.RubberBand`
  `getRubberBand()`
  `com.macrofocus.transform.twod.TwoDScreenTransform`
  `getScreenTransform()`
  `TreeMapToolTip<N,Row,Column,Color,Font>`
  `getSelectionToolTip()`
  Returns the tooltip used for selection.
  `TreeMapToolTip<N,Row,Column,Color,Font>`
  `getToolTip()`
  Returns the tooltip used for probing (aka mouse over).
  `TreeMapTooltipRenderer<C,N,Row,Column,Color,Font>`
  `getTooltipRenderer()`
  `com.macrofocus.geom.Rectangle2D`
  `getViewport()`
  `com.macrofocus.geom.Rectangle2D`
  `getWorld()`
  `MutableBoundedInterval`
  `getXRangeModel()`
  `MutableBoundedInterval`
  `getYRangeModel()`
  `float`
  `getZoomFactor()`
  `boolean`
  `isDirty()`
  `boolean`
  `isSelectionMode()`
  `boolean`
  `isShowTiming()`
  Returns whether information about refresh rate should be displayed.
  `boolean`
  `isUpdateModelDimension()`
  Returns whether change in the view dimension should be reflected in the model.
  `void`
  `repaint()`
  `protected abstract void`
  `repaint(long delay)`
  `double`
  `screenToWorldX(int x)`
  `double`
  `screenToWorldY(int y)`
  `void`
  `setDirty(boolean dirty)`
  `void`
  `setHeaderRenderer(TreeMapHeaderRenderer<N,Row,Column,Color,Font> renderer)`
  `void`
  `setLabelRenderer(TreeMapLabelRenderer<C,N,Row,Column,Color,Font> renderer)`
  `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`
  `setSelectionMode(boolean value)`
  `void`
  `setSelectionToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)`
  Sets the tooltip used for selection.
  `void`
  `setToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)`
  Sets the tooltip used for probing (aka mouse over).
  `void`
  `setTooltipRenderer(TreeMapTooltipRenderer<C,N,Row,Column,Color,Font> renderer)`
  `void`
  `setUpdateModelDimension(boolean updateModelDimension)`
  Sets whether change in the view dimension should be reflected in the model.
  `protected abstract void`
  `updateSize()`
  `com.macrofocus.geom.Shape`
  `worldToScreen(com.macrofocus.geom.Shape shape)`
  `com.macrofocus.geom.Shape`
  `worldToScreen(N node)`
  Returns the shape of the node according to its layout position in screen coordinates.
  `com.macrofocus.geom.Rectangle2D`
  `worldToScreenPrecise(com.macrofocus.geom.Rectangle2D r)`
  Convert the specified rectangle to screen coordinates.
  `com.macrofocus.geom.Rectangle`
  `worldToScreenRectangle(com.macrofocus.geom.Rectangle2D r)`
  Convert the specified rectangle to screen coordinates.
  `int`
  `worldToScreenX(double x)`
  `int`
  `worldToScreenY(double y)`
  `void`
  `zoom(boolean animate, double x1, double x2, double y1, double y2)`
  `void`
  `zoomIn()`
  `void`
  `zoomOut()`

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

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

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

  `addContextMenuListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, getBackground, getImage, getNativeComponent, getSize, getToolTipImage, getToolTipPreferredLocation, setLicenseModel, setProgressive, setShowTiming, setSize, updateModelDimension, waitUntilReady`

- ## Field Details

  - ### xRangeModel

    protected final MutableBoundedInterval xRangeModel

  - ### yRangeModel

    protected final MutableBoundedInterval yRangeModel

  - ### screenTransform

    protected final com.macrofocus.transform.twod.MutableTwoDScreenTransform screenTransform

  - ### _preRenderers

    protected final List<TreeMapRenderer> _preRenderers

  - ### _preProgressiveRenderers

    protected final List<TreeMapRenderer> _preProgressiveRenderers

  - ### _progressiveRenderers

    protected final List<TreeMapRenderer> _progressiveRenderers

  - ### _postRenderers

    protected final List<TreeMapRenderer> _postRenderers

  - ### _shapes

    protected final Map<N,com.macrofocus.geom.Shape> _shapes

  - ### _model

    protected TreeMapModel<N,Row,Column,Color,Font> _model

  - ### labelRenderer

    protected TreeMapLabelRenderer<C,N,Row,Column,Color,Font> labelRenderer

  - ### headerRenderer

    protected TreeMapHeaderRenderer<N,Row,Column,Color,Font> headerRenderer

  - ### tooltipRenderer

    protected TreeMapTooltipRenderer<C,N,Row,Column,Color,Font> tooltipRenderer

  - ### probingToolTip

    protected TreeMapToolTip probingToolTip

  - ### selectionToolTip

    protected TreeMapToolTip selectionToolTip

  - ### _progressive

    protected TreeMapView.Progressive _progressive

  - ### _showTiming

    protected boolean _showTiming

- ## Constructor Details

  - ### AbstractTreeMapView

    public AbstractTreeMapView(Headless<Color,Font> headless)

- ## Method Details

  - ### getHeadless

    public Headless<Color,Font> getHeadless()
    Specified by:
      `getHeadless` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### isUpdateModelDimension

    public boolean isUpdateModelDimension()
    Returns whether change in the view dimension should be reflected in the model.
    Specified by:
      `isUpdateModelDimension` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      true if change to the view should change the model dimension, false otherwise

  - ### setUpdateModelDimension

    public void setUpdateModelDimension(boolean updateModelDimension)
    Sets whether change in the view dimension should be reflected in the model.
    Specified by:
      `setUpdateModelDimension` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `updateModelDimension` - true if change to the view should change the model dimension, false otherwise

  - ### getProgressive

    public TreeMapView.Progressive getProgressive()
    Returns whether progressive display mode is enabled.
    Specified by:
      `getProgressive` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      true if progressive display mode is enabled, false otherwise

  - ### isShowTiming

    public boolean isShowTiming()
    Returns whether information about refresh rate should be displayed.
    Specified by:
      `isShowTiming` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      true to display refresh rate information, false otherwise

  - ### setModel

    public 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.
    Specified by:
      `setModel` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `model` - the new data model
    See Also:
      - `TreeMapView.getModel()`

  - ### getModel

    public TreeMapModel<N,Row,Column,Color,Font> getModel()
    Returns the TreeMapModel that provides the data displayed by this TreeMapView.
    Specified by:
      `getModel` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      the TreeMapModel that provides the data displayed by this TreeMapView
    See Also:
      - `TreeMapView.setModel(TreeMapModel)`

  - ### addPreRenderer

    protected void addPreRenderer(TreeMapRenderer renderer)

  - ### addPreProgressiveRenderer

    protected void addPreProgressiveRenderer(TreeMapRenderer renderer)

  - ### addProgressiveRenderer

    protected void addProgressiveRenderer(TreeMapRenderer renderer)

  - ### addPostRenderer

    protected void addPostRenderer(TreeMapRenderer renderer)

  - ### setDirty

    public void setDirty(boolean dirty)
    Specified by:
      `setDirty` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### isDirty

    public boolean isDirty()
    Specified by:
      `isDirty` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### worldToScreen

    public com.macrofocus.geom.Shape worldToScreen(N node)
    Returns the shape of the node according to its layout position in screen coordinates.
    Specified by:
      `worldToScreen` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `node` - the node
    Returns:
      the shape of the node

  - ### worldToScreen

    public com.macrofocus.geom.Shape worldToScreen(com.macrofocus.geom.Shape shape)
    Specified by:
      `worldToScreen` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getRenderedShape

    public com.macrofocus.geom.Shape getRenderedShape(N node)
    Returns the shape of the node according to its rendered position in screen coordinates.
    Specified by:
      `getRenderedShape` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `node` - the node
    Returns:
      the shape of the node

  - ### getViewport

    public com.macrofocus.geom.Rectangle2D getViewport()
    Specified by:
      `getViewport` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getWorld

    public com.macrofocus.geom.Rectangle2D getWorld()
    Specified by:
      `getWorld` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### screenToWorldX

    public double screenToWorldX(int x)
    Specified by:
      `screenToWorldX` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### screenToWorldY

    public double screenToWorldY(int y)
    Specified by:
      `screenToWorldY` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### worldToScreenX

    public int worldToScreenX(double x)
    Specified by:
      `worldToScreenX` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### worldToScreenY

    public int worldToScreenY(double y)
    Specified by:
      `worldToScreenY` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getXRangeModel

    public MutableBoundedInterval getXRangeModel()
    Specified by:
      `getXRangeModel` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getYRangeModel

    public MutableBoundedInterval getYRangeModel()
    Specified by:
      `getYRangeModel` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getPreRenderers

    public Iterable<TreeMapRenderer> getPreRenderers()
    Specified by:
      `getPreRenderers` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getPreProgressiveRenderers

    public Iterable<TreeMapRenderer> getPreProgressiveRenderers()
    Specified by:
      `getPreProgressiveRenderers` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getProgressiveRenderers

    public Iterable<TreeMapRenderer> getProgressiveRenderers()
    Specified by:
      `getProgressiveRenderers` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getPostRenderers

    public Iterable<TreeMapRenderer> getPostRenderers()
    Specified by:
      `getPostRenderers` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### zoom

    public void zoom(boolean animate, double x1, double x2, double y1, double y2)
    Specified by:
      `zoom` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getNode

    public N getNode(com.macrofocus.geom.Point p)
    Returns the node at the specified location on the screen.
    Specified by:
      `getNode` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `p` - the location on the screen
    Returns:
      the node

  - ### contains

    public boolean contains(com.macrofocus.geom.Point p, com.macrofocus.geom.Shape shape)
    Specified by:
      `contains` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getNodes

    public List<N> getNodes(com.macrofocus.geom.Rectangle rect)
    Returns the nodes overlapping the specified rectangle.
    Specified by:
      `getNodes` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `rect` - the rectangle in screen coordinates
    Returns:
      the list of nodes

  - ### getRubberBand

    public com.macrofocus.rubberband.RubberBand getRubberBand()
    Specified by:
      `getRubberBand` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### worldToScreenRectangle

    public com.macrofocus.geom.Rectangle worldToScreenRectangle(com.macrofocus.geom.Rectangle2D r)
    Convert the specified rectangle to screen coordinates.
    Specified by:
      `worldToScreenRectangle` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `r` - the rectangle to convert
    Returns:
      the rectangle in screen coordinates

  - ### worldToScreenPrecise

    public com.macrofocus.geom.Rectangle2D worldToScreenPrecise(com.macrofocus.geom.Rectangle2D r)
    Convert the specified rectangle to screen coordinates.
    Specified by:
      `worldToScreenPrecise` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `r` - the rectangle to convert
    Returns:
      the rectangle in screen coordinates

  - ### getZoomFactor

    public float getZoomFactor()
    Specified by:
      `getZoomFactor` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getLabelRenderer

    public TreeMapLabelRenderer<C,N,Row,Column,Color,Font> getLabelRenderer()
    Specified by:
      `getLabelRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### setLabelRenderer

    public void setLabelRenderer(TreeMapLabelRenderer<C,N,Row,Column,Color,Font> renderer)
    Specified by:
      `setLabelRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getHeaderRenderer

    public TreeMapHeaderRenderer<N,Row,Column,Color,Font> getHeaderRenderer()
    Specified by:
      `getHeaderRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### setHeaderRenderer

    public void setHeaderRenderer(TreeMapHeaderRenderer<N,Row,Column,Color,Font> renderer)
    Specified by:
      `setHeaderRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getTooltipRenderer

    public TreeMapTooltipRenderer<C,N,Row,Column,Color,Font> getTooltipRenderer()
    Specified by:
      `getTooltipRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### setTooltipRenderer

    public void setTooltipRenderer(TreeMapTooltipRenderer<C,N,Row,Column,Color,Font> renderer)
    Specified by:
      `setTooltipRenderer` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getToolTip

    public TreeMapToolTip<N,Row,Column,Color,Font> getToolTip()
    Returns the tooltip used for probing (aka mouse over).
    Specified by:
      `getToolTip` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      the tooltip used for probing

  - ### setToolTip

    public void setToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)
    Sets the tooltip used for probing (aka mouse over).
    Specified by:
      `setToolTip` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `tooltip` - the tooltip used for probing

  - ### getSelectionToolTip

    public TreeMapToolTip<N,Row,Column,Color,Font> getSelectionToolTip()
    Returns the tooltip used for selection.
    Specified by:
      `getSelectionToolTip` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Returns:
      the tooltip used for selection

  - ### setSelectionToolTip

    public void setSelectionToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)
    Sets the tooltip used for selection.
    Specified by:
      `setSelectionToolTip` in interface `TreeMapView<C,N,Row,Column,Color,Font>`
    Parameters:
      `tooltip` - the tooltip used for selection

  - ### repaint

    public void repaint()
    Specified by:
      `repaint` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### repaint

    protected abstract void repaint(long delay)

  - ### updateSize

    protected abstract void updateSize()

  - ### isSelectionMode

    public boolean isSelectionMode()
    Specified by:
      `isSelectionMode` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### setSelectionMode

    public void setSelectionMode(boolean value)
    Specified by:
      `setSelectionMode` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### getScreenTransform

    public com.macrofocus.transform.twod.TwoDScreenTransform getScreenTransform()
    Specified by:
      `getScreenTransform` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### drill

    public void drill(int x, int y)
    Specified by:
      `drill` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### drillDown

    public void drillDown()
    Specified by:
      `drillDown` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### drillUp

    public void drillUp()
    Specified by:
      `drillUp` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### zoomIn

    public void zoomIn()
    Specified by:
      `zoomIn` in interface `TreeMapView<C,N,Row,Column,Color,Font>`

  - ### zoomOut

    public void zoomOut()
    Specified by:
      `zoomOut` in interface `TreeMapView<C,N,Row,Column,Color,Font>`