Package com.treemap
Interface TreeMapView<C,N,Row,Column,Color,Font>
- Type Parameters:
N- the type of nodes
- All Known Implementing Classes:
AbstractTreeMapView,SwingTreeMapView
@JsType
public interface TreeMapView<C,N,Row,Column,Color,Font>
Main class for the view part of TreeMap.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContextMenuListener(com.macrofocus.crossplatform.CPCanvas.ContextMenuListener l) voidaddKeyListener(com.macrofocus.crossplatform.CPCanvas.KeyListener listener) voidaddMouseListener(com.macrofocus.crossplatform.CPCanvas.MouseListener l) voidaddMouseMotionListener(com.macrofocus.crossplatform.CPCanvas.MouseMotionListener l) voidaddMouseWheelListener(com.macrofocus.crossplatform.CPCanvas.MouseWheelListener l) booleancontains(com.macrofocus.geom.Point p, com.macrofocus.geom.Shape shape) voiddrill(int x, int y) voidvoiddrillUp()com.macrofocus.igraphics.CPColor<Color> getImage()Creates a new image and render the current treemap into it.getModel()Returns the TreeMapModel that provides the data displayed by this TreeMapView.getNode(com.macrofocus.geom.Point p) Returns the node at the specified location on the screen.getNodes(com.macrofocus.geom.Rectangle rect) Returns the nodes overlapping the specified rectangle.Returns whether progressive display mode is enabled.com.macrofocus.geom.ShapegetRenderedShape(N node) Returns the shape of the node according to its rendered position in screen coordinates.com.macrofocus.rubberband.RubberBandcom.macrofocus.transform.twod.TwoDScreenTransformReturns the tooltip used for selection.getSize()Returns the tooltip used for probing (aka mouse over).getToolTipImage(N node) Creates a new image and render the tooltip used for probing into it.com.macrofocus.geom.PointgetToolTipPreferredLocation(N node) Returns the preferred location of the probing tooltip for the specified node.com.macrofocus.geom.Rectangle2Dcom.macrofocus.geom.Rectangle2DgetWorld()floatbooleanisDirty()booleanbooleanReturns whether information about refresh rate should be displayed.booleanReturns whether change in the view dimension should be reflected in the model.voidrepaint()doublescreenToWorldX(int x) doublescreenToWorldY(int y) voidsetDirty(boolean dirty) voidsetHeaderRenderer(TreeMapHeaderRenderer<N, Row, Column, Color, Font> renderer) voidsetLabelRenderer(TreeMapLabelRenderer<C, N, Row, Column, Color, Font> renderer) voidsetLicenseModel(LicenseModel licenseModel) voidSets the data model and registers with it for listener notifications from the new data model.voidsetProgressive(TreeMapView.Progressive progressive) Sets whether progressive display mode is enabled.voidsetSelectionMode(boolean value) voidsetSelectionToolTip(TreeMapToolTip<N, Row, Column, Color, Font> toolTip) Sets the tooltip used for selection.voidsetShowTiming(boolean showTiming) Sets whether information about refresh rate should be displayed.voidvoidsetToolTip(TreeMapToolTip<N, Row, Column, Color, Font> toolTip) Sets the tooltip used for probing (aka mouse over).voidsetTooltipRenderer(TreeMapTooltipRenderer<C, N, Row, Column, Color, Font> renderer) voidsetUpdateModelDimension(boolean updateModelDimension) Sets whether change in the view dimension should be reflected in the model.voidvoidWait until all processing are completed.com.macrofocus.geom.ShapeworldToScreen(com.macrofocus.geom.Shape shape) com.macrofocus.geom.ShapeworldToScreen(N node) Returns the shape of the node according to its layout position in screen coordinates.com.macrofocus.geom.Rectangle2DworldToScreenPrecise(com.macrofocus.geom.Rectangle2D rectangle) Convert the specified rectangle to screen coordinates.com.macrofocus.geom.RectangleworldToScreenRectangle(com.macrofocus.geom.Rectangle2D rectangle) Convert the specified rectangle to screen coordinates.intworldToScreenX(double x) intworldToScreenY(double y) voidzoom(boolean animate, double x1, double x2, double y1, double y2) voidzoomIn()voidzoomOut()
-
Field Details
-
PROPERTY_PROGRESSIVE
- See Also:
-
-
Method Details
-
getHeadless
-
worldToScreen
@JsIgnore com.macrofocus.geom.Shape worldToScreen(com.macrofocus.geom.Shape shape) -
contains
@JsIgnore boolean contains(com.macrofocus.geom.Point p, com.macrofocus.geom.Shape shape) -
getXRangeModel
-
getYRangeModel
-
repaint
void repaint() -
isSelectionMode
boolean isSelectionMode() -
setSelectionMode
void setSelectionMode(boolean value) -
getScreenTransform
@JsIgnore com.macrofocus.transform.twod.TwoDScreenTransform getScreenTransform() -
setLicenseModel
-
isShowTiming
boolean isShowTiming()Returns whether information about refresh rate should be displayed.- Returns:
- true to display refresh rate information, false otherwise
-
setShowTiming
void setShowTiming(boolean showTiming) Sets whether information about refresh rate should be displayed.- Parameters:
showTiming- true to display refresh rate information, false otherwise
-
getProgressive
Returns whether progressive display mode is enabled.- Returns:
- true if progressive display mode is enabled, false otherwise
-
setProgressive
Sets whether progressive display mode is enabled.- Parameters:
progressive- true if progressive display mode is enabled, false otherwise
-
isUpdateModelDimension
boolean isUpdateModelDimension()Returns whether change in the view dimension should be reflected in the model.- Returns:
- true if change to the view should change the model dimension, false otherwise
-
setUpdateModelDimension
void setUpdateModelDimension(boolean updateModelDimension) Sets whether change in the view dimension should be reflected in the model.- Parameters:
updateModelDimension- true if change to the view should change the model dimension, false otherwise
-
updateModelDimension
void updateModelDimension() -
setModel
Sets the data model and registers with it for listener notifications from the new data model.- Parameters:
model- the new data model- See Also:
-
getModel
Returns the TreeMapModel that provides the data displayed by this TreeMapView.- Returns:
- the TreeMapModel that provides the data displayed by this TreeMapView
- See Also:
-
worldToScreen
Returns the shape of the node according to its layout position in screen coordinates.- Parameters:
node- the node- Returns:
- the shape of the node
-
getRenderedShape
Returns the shape of the node according to its rendered position in screen coordinates.- Parameters:
node- the node- Returns:
- the shape of the node
-
screenToWorldX
double screenToWorldX(int x) -
screenToWorldY
double screenToWorldY(int y) -
worldToScreenX
int worldToScreenX(double x) -
worldToScreenY
int worldToScreenY(double y) -
getViewport
@JsIgnore com.macrofocus.geom.Rectangle2D getViewport() -
getWorld
@JsIgnore com.macrofocus.geom.Rectangle2D getWorld() -
zoom
void zoom(boolean animate, double x1, double x2, double y1, double y2) -
getNode
Returns the node at the specified location on the screen.- Parameters:
p- the location on the screen- Returns:
- the node
-
getNodes
Returns the nodes overlapping the specified rectangle.- Parameters:
rect- the rectangle in screen coordinates- Returns:
- the list of nodes
-
getRubberBand
@JsIgnore com.macrofocus.rubberband.RubberBand getRubberBand() -
getZoomFactor
@JsIgnore float getZoomFactor() -
getPreRenderers
-
getPreProgressiveRenderers
-
getProgressiveRenderers
-
getPostRenderers
-
setDirty
void setDirty(boolean dirty) -
isDirty
boolean isDirty() -
setLabelRenderer
-
getLabelRenderer
-
setHeaderRenderer
-
getHeaderRenderer
-
setTooltipRenderer
-
getTooltipRenderer
-
worldToScreenRectangle
@JsIgnore com.macrofocus.geom.Rectangle worldToScreenRectangle(com.macrofocus.geom.Rectangle2D rectangle) Convert the specified rectangle to screen coordinates.- Parameters:
rectangle- the rectangle to convert- Returns:
- the rectangle in screen coordinates
-
worldToScreenPrecise
@JsIgnore com.macrofocus.geom.Rectangle2D worldToScreenPrecise(com.macrofocus.geom.Rectangle2D rectangle) Convert the specified rectangle to screen coordinates.- Parameters:
rectangle- the rectangle to convert- Returns:
- the rectangle in screen coordinates
-
getToolTip
Returns the tooltip used for probing (aka mouse over).- Returns:
- the tooltip used for probing
-
setToolTip
Sets the tooltip used for probing (aka mouse over).- Parameters:
toolTip- the tooltip used for probing
-
getSelectionToolTip
Returns the tooltip used for selection.- Returns:
- the tooltip used for selection
-
setSelectionToolTip
Sets the tooltip used for selection.- Parameters:
toolTip- the tooltip used for selection
-
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
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
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
void waitUntilReady()Wait until all processing are completed. -
getNativeComponent
-
getBackground
-
getSize
-
setSize
-
addMouseListener
@JsIgnore void addMouseListener(com.macrofocus.crossplatform.CPCanvas.MouseListener l) -
addMouseMotionListener
@JsIgnore void addMouseMotionListener(com.macrofocus.crossplatform.CPCanvas.MouseMotionListener l) -
addMouseWheelListener
@JsIgnore void addMouseWheelListener(com.macrofocus.crossplatform.CPCanvas.MouseWheelListener l) -
addKeyListener
@JsIgnore void addKeyListener(com.macrofocus.crossplatform.CPCanvas.KeyListener listener) -
addContextMenuListener
void addContextMenuListener(com.macrofocus.crossplatform.CPCanvas.ContextMenuListener l) -
drill
void drill(int x, int y) -
drillDown
void drillDown() -
drillUp
void drillUp() -
zoomIn
void zoomIn() -
zoomOut
void zoomOut()
-