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:
SwingTreeMapController
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 ClassesModifier and TypeClassDescriptionclassstatic enumInteraction mode. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTreeMapController(TreeMapView<C, N, Row, Column, Color, Font> view, com.macrofocus.crossplatform.CPFactory<C, ?, ?, ?> factory) -
Method Summary
Modifier and TypeMethodDescriptioncom.macrofocus.geom.Rectangle2Dcom.macrofocus.geom.Rectangle2DgetWorld()booleanvoidReplace the view currently under control.voidsetZoomingEnabled(boolean zoomingEnabled) Controls whether the zooming is permitted.protected doublezoomingCenterFunction(double center) Currently returnsMath.tanh(x * 3).
-
Constructor Details
-
AbstractTreeMapController
-
-
Method Details
-
zoomingCenterFunction
protected double zoomingCenterFunction(double center) Currently returnsMath.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
Description copied from interface:TreeMapControllerReplace the view currently under control. -
getViewport
public com.macrofocus.geom.Rectangle2D getViewport() -
getWorld
public com.macrofocus.geom.Rectangle2D getWorld() -
setZoomingEnabled
public void setZoomingEnabled(boolean zoomingEnabled) Description copied from interface:TreeMapControllerControls whether the zooming is permitted.- Specified by:
setZoomingEnabledin interfaceTreeMapController<C,N, Row, Column, Color, Font> - Parameters:
zoomingEnabled- true to enable zooming, false otherwise.
-
isZoomingEnabled
public boolean isZoomingEnabled()- Specified by:
isZoomingEnabledin interfaceTreeMapController<C,N, Row, Column, Color, Font>
-