Package com.treemap

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

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

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

Direct Known Subclasses:
  `JavaFXTreeMapController`

public abstract class AbstractTreeMapController<C,N,Row,Column,Color,Font> extends Object implements TreeMapController<C,N,Row,Column,Color,Font>
Created by luc on 03.05.17.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `AbstractTreeMapController.DefaultMouseListener`
  `static enum`
  `AbstractTreeMapController.Mode`
  Interaction mode.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTreeMapController(TreeMapView<C,N,Row,Column,Color,Font> view, com.macrofocus.crossplatform.CPFactory<C,?,?,?> factory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.macrofocus.geom.Rectangle2D`
  `getViewport()`
  `com.macrofocus.geom.Rectangle2D`
  `getWorld()`
  `boolean`
  `isZoomingEnabled()`
  `void`
  `setView(TreeMapView<C,N,Row,Column,Color,Font> view)`
  Replace the view currently under control.
  `void`
  `setZoomingEnabled(boolean zoomingEnabled)`
  Controls whether the zooming is permitted.
  `protected double`
  `zoomingCenterFunction(double center)`
  Currently returns `Math.tanh(x * 3)`.

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

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

- ## Constructor Details

  - ### AbstractTreeMapController

    public AbstractTreeMapController(TreeMapView<C,N,Row,Column,Color,Font> view, com.macrofocus.crossplatform.CPFactory<C,?,?,?> factory)

- ## Method Details

  - ### zoomingCenterFunction

    protected double zoomingCenterFunction(double center)
    Currently returns `Math.tanh(x * 3)`. Can be overridden to use other (e.g. logistic) function.
    Parameters:
      `center` - the center within a normalized (-1..1) range
    Returns:
      the new center within a normalized (-1..1) range

  - ### setView

    public void setView(TreeMapView<C,N,Row,Column,Color,Font> view)
    Description copied from interface: `TreeMapController`
    Replace the view currently under control.
    Specified by:
      `setView` in interface `TreeMapController<C,N,Row,Column,Color,Font>`
    Parameters:
      `view` - the TreeMapView to use

  - ### getViewport

    public com.macrofocus.geom.Rectangle2D getViewport()

  - ### getWorld

    public com.macrofocus.geom.Rectangle2D getWorld()

  - ### setZoomingEnabled

    public void setZoomingEnabled(boolean zoomingEnabled)
    Description copied from interface: `TreeMapController`
    Controls whether the zooming is permitted.
    Specified by:
      `setZoomingEnabled` in interface `TreeMapController<C,N,Row,Column,Color,Font>`
    Parameters:
      `zoomingEnabled` - true to enable zooming, false otherwise.

  - ### isZoomingEnabled

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