Package com.macrofocus.treeplot
Class AbstractTreePlotView<C,N,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treeplot.AbstractTreePlotView<C,N,Row,Column,Color,Font>
-
- All Implemented Interfaces:
TreePlotView<C,N,Row,Column,Color,Font>
- Direct Known Subclasses:
SwingTreePlotView
public abstract class AbstractTreePlotView<C,N,Row,Column,Color,Font> extends java.lang.Object implements TreePlotView<C,N,Row,Column,Color,Font>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.macrofocus.treeplot.TreePlotView
TreePlotView.BoundingMode
-
-
Field Summary
Fields Modifier and Type Field Description protected TreePlotModel<N,Row,Column,Color,Font>modelprotected TreeMapToolTipprobingToolTipprotected com.macrofocus.transform.twod.MutableTwoDScreenTransformscreenTransformprotected TreeMapToolTipselectionToolTipprotected java.util.Map<N,java.awt.Shape>shapesprotected com.macrofocus.plot.guide.Guide<C,Color,Font>xGuideprotected MutableBoundedIntervalxRangeModelprotected com.macrofocus.plot.guide.Guide<C,Color,Font>yGuideprotected MutableBoundedIntervalyRangeModel
-
Constructor Summary
Constructors Constructor Description AbstractTreePlotView(Headless<Color,Font> headless)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProgressiveRenderer(TreePlotRenderer renderer)voidaddRenderer(TreePlotRenderer renderer)voiddrill(int x, int y)voiddrillDown()voiddrillUp()MutableSingleSelection<TreePlotView.BoundingMode>getBoundingMode()Headless<Color,Font>getHeadless()java.awt.ShapegetLeafScreenShape(N node)TreePlotModel<N,Row,Column,Color,Font>getModel()Returns the TreePlotModel that provides the data displayed by this TreePlotView.NgetNode(java.awt.Point p)Returns the node at the specified location on the screen.java.util.List<N>getNodes(java.awt.Rectangle rect)Returns the nodes overlapping the specified rectangle.java.awt.PaintgetPaint(N node, java.awt.Shape shape, java.awt.Rectangle bounds, boolean allowGradientPaint)java.util.List<TreePlotRenderer>getProgressiveRenderers()java.awt.ShapegetRenderedShape(N node)java.util.List<TreePlotRenderer>getRenderers()com.macrofocus.rubberband.RubberBandgetRubberBand()java.awt.RectanglegetScreenBounds(N node)java.awt.ShapegetScreenShape(N node)Returns the shape of the node according to its layout position in screen coordinates.TreeMapToolTip<N,Row,Column,Color,Font>getSelectionToolTip()TreeMapToolTip<N,Row,Column,Color,Font>getToolTip()java.awt.PointgetToolTipPreferredLocation(N node)TreePlotTooltipRenderer<C,N,Row,Column,Color,Font>getTooltipRenderer()java.awt.geom.Rectangle2DgetWorld()MutableOneDScreenTransformgetXCoordinateAxis()com.macrofocus.plot.guide.Guide<C,Color,Font>getXGuide()MutableBoundedIntervalgetXRangeModel()MutableOneDScreenTransformgetYCoordinateAxis()com.macrofocus.plot.guide.Guide<C,Color,Font>getYGuide()MutableBoundedIntervalgetYRangeModel()floatgetZoomFactor()booleanisDirty()booleanisShowTiming()Returns whether information about refresh rate should be displayed.voidrepaint()protected abstract voidrepaint(long delay)protected voidresetXAxis()protected voidresetYAxis()protected abstract voidsetBackground(com.macrofocus.igraphics.CPColor<Color> background)voidsetDirty(boolean dirty)voidsetDirtyShapes()voidsetModel(TreePlotModel<N,Row,Column,Color,Font> model)Sets the data model and registers with it for listener notifications from the new data model.voidsetSelectionToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)voidsetShowTiming(boolean showTiming)Sets whether information about refresh rate should be displayed.voidsetToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)voidzoom(double x1, double x2, double y1, double y2)voidzoomIn()voidzoomOut()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.treeplot.TreePlotView
addContextMenuListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, getHeight, getNativeComponent, getSize, getWidth
-
-
-
-
Field Detail
-
probingToolTip
protected TreeMapToolTip probingToolTip
-
selectionToolTip
protected TreeMapToolTip selectionToolTip
-
xRangeModel
protected final MutableBoundedInterval xRangeModel
-
yRangeModel
protected final MutableBoundedInterval yRangeModel
-
screenTransform
protected final com.macrofocus.transform.twod.MutableTwoDScreenTransform screenTransform
-
shapes
protected final java.util.Map<N,java.awt.Shape> shapes
-
-
Method Detail
-
getModel
public TreePlotModel<N,Row,Column,Color,Font> getModel()
Returns the TreePlotModel that provides the data displayed by this TreePlotView.- Specified by:
getModelin interfaceTreePlotView<C,N,Row,Column,Color,Font>- Returns:
- the TreePlotModel that provides the data displayed by this TreePlotView
- See Also:
setModel(TreePlotModel)
-
getPaint
public java.awt.Paint getPaint(N node, java.awt.Shape shape, java.awt.Rectangle bounds, boolean allowGradientPaint)
-
getXRangeModel
public MutableBoundedInterval getXRangeModel()
- Specified by:
getXRangeModelin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getYRangeModel
public MutableBoundedInterval getYRangeModel()
- Specified by:
getYRangeModelin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getXCoordinateAxis
public MutableOneDScreenTransform getXCoordinateAxis()
- Specified by:
getXCoordinateAxisin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getYCoordinateAxis
public MutableOneDScreenTransform getYCoordinateAxis()
- Specified by:
getYCoordinateAxisin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
zoom
public void zoom(double x1, double x2, double y1, double y2)
-
resetXAxis
protected void resetXAxis()
-
resetYAxis
protected void resetYAxis()
-
getZoomFactor
public float getZoomFactor()
- Specified by:
getZoomFactorin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
isShowTiming
public boolean isShowTiming()
Returns whether information about refresh rate should be displayed.- Specified by:
isShowTimingin interfaceTreePlotView<C,N,Row,Column,Color,Font>- Returns:
- true to display refresh rate information, false otherwise
-
setShowTiming
public void setShowTiming(boolean showTiming)
Sets whether information about refresh rate should be displayed.- Specified by:
setShowTimingin interfaceTreePlotView<C,N,Row,Column,Color,Font>- Parameters:
showTiming- true to display refresh rate information, false otherwise
-
setModel
public void setModel(TreePlotModel<N,Row,Column,Color,Font> model)
Sets the data model and registers with it for listener notifications from the new data model.- Specified by:
setModelin interfaceTreePlotView<C,N,Row,Column,Color,Font>- Parameters:
model- the new data model- See Also:
getModel()
-
getTooltipRenderer
public TreePlotTooltipRenderer<C,N,Row,Column,Color,Font> getTooltipRenderer()
- Specified by:
getTooltipRendererin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getToolTipPreferredLocation
public java.awt.Point getToolTipPreferredLocation(N node)
- Specified by:
getToolTipPreferredLocationin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
addProgressiveRenderer
public void addProgressiveRenderer(TreePlotRenderer renderer)
- Specified by:
addProgressiveRendererin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
addRenderer
public void addRenderer(TreePlotRenderer renderer)
- Specified by:
addRendererin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getProgressiveRenderers
public java.util.List<TreePlotRenderer> getProgressiveRenderers()
- Specified by:
getProgressiveRenderersin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getRenderers
public java.util.List<TreePlotRenderer> getRenderers()
- Specified by:
getRenderersin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getScreenShape
public java.awt.Shape getScreenShape(N node)
Returns the shape of the node according to its layout position in screen coordinates.- Specified by:
getScreenShapein interfaceTreePlotView<C,N,Row,Column,Color,Font>- Parameters:
node- the node- Returns:
- the shape of the node
-
getLeafScreenShape
public java.awt.Shape getLeafScreenShape(N node)
-
getRenderedShape
public java.awt.Shape getRenderedShape(N node)
- Specified by:
getRenderedShapein interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getScreenBounds
public java.awt.Rectangle getScreenBounds(N node)
- Specified by:
getScreenBoundsin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getNode
public N getNode(java.awt.Point p)
Returns the node at the specified location on the screen.
-
getNodes
public java.util.List<N> getNodes(java.awt.Rectangle rect)
Returns the nodes overlapping the specified rectangle.
-
setDirty
public void setDirty(boolean dirty)
-
isDirty
public boolean isDirty()
-
setDirtyShapes
public void setDirtyShapes()
- Specified by:
setDirtyShapesin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getToolTip
public TreeMapToolTip<N,Row,Column,Color,Font> getToolTip()
- Specified by:
getToolTipin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
setToolTip
public void setToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)
- Specified by:
setToolTipin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getSelectionToolTip
public TreeMapToolTip<N,Row,Column,Color,Font> getSelectionToolTip()
- Specified by:
getSelectionToolTipin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
setSelectionToolTip
public void setSelectionToolTip(TreeMapToolTip<N,Row,Column,Color,Font> tooltip)
- Specified by:
setSelectionToolTipin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
repaint
public void repaint()
-
repaint
protected abstract void repaint(long delay)
-
setBackground
protected abstract void setBackground(com.macrofocus.igraphics.CPColor<Color> background)
-
getRubberBand
public com.macrofocus.rubberband.RubberBand getRubberBand()
- Specified by:
getRubberBandin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getHeadless
public Headless<Color,Font> getHeadless()
- Specified by:
getHeadlessin interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getBoundingMode
public MutableSingleSelection<TreePlotView.BoundingMode> getBoundingMode()
- Specified by:
getBoundingModein interfaceTreePlotView<C,N,Row,Column,Color,Font>
-
getWorld
public java.awt.geom.Rectangle2D getWorld()
-
drill
public void drill(int x, int y)
-
drillDown
public void drillDown()
-
drillUp
public void drillUp()
-
zoomIn
public void zoomIn()
-
-