JIDE 3.5.15

com.jidesoft.treemap
Class DefaultTreeMapView<N>

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.jidesoft.treemap.TreeMapView<N>
                  extended by com.jidesoft.treemap.DefaultTreeMapView<N>
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class DefaultTreeMapView<N>
extends TreeMapView<N>

Provides a view for a TreeMapModel

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.treemap.TreeMapView
TreeMapView.Progressive
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.jidesoft.treemap.TreeMapView
PROPERTY_PROGRESSIVE, uiClassID
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DefaultTreeMapView()
           
 
Method Summary
protected  void addPostRenderer(TreeMapRenderer renderer)
           
protected  void addPreProgressiveRenderer(TreeMapRenderer renderer)
           
protected  void addPreRenderer(TreeMapRenderer renderer)
           
protected  void addProgressiveRenderer(TreeMapRenderer renderer)
           
 TreeMapHeaderRenderer<N> getHeaderRenderer()
           
 TreeMapLabelRenderer<N> getLabelRenderer()
           
 TreeMapModel<N> getModel()
          Returns the TreeMapModel that provides the data displayed by this TreeMapView.
 N getNode(Point p)
          Returns the node at the specified location on the screen.
 List<N> getNodes(Rectangle rect)
          Returns the nodes overlapping the specified rectangle.
 Iterable<TreeMapRenderer> getPostRenderers()
          
 Iterable<TreeMapRenderer> getPreProgressiveRenderers()
          
 Iterable<TreeMapRenderer> getPreRenderers()
          
 Iterable<TreeMapRenderer> getProgressiveRenderers()
          
 Shape getRenderedShape(N node)
          Returns the shape of the node according to its rendered position in screen coordinates.
 RenderingHints getRenderingHints()
           
 Rectangle2D getRubberBand()
          
 Rectangle getRubberBandScreen()
          
 Shape getScreenShape(N node)
          Returns the shape of the node according to its layout position in screen coordinates.
 TreeMapToolTip<N> getSelectionToolTip()
           
 TreeMapToolTip<N> getToolTip()
           
 TreeMapTooltipRenderer<N> getTooltipRenderer()
           
 Rectangle2D getViewport()
           
 Rectangle2D getWorld()
           
protected  MutableBoundedInterval getXRangeModel()
          
protected  MutableBoundedInterval getYRangeModel()
          
 float getZoomFactor()
          
 boolean isDirty()
          
 double screenToWorldX(int x)
          
 double screenToWorldY(int y)
          
 void setDirty(boolean dirty)
          
 void setHeaderRenderer(TreeMapHeaderRenderer<N> renderer)
           
 void setLabelRenderer(TreeMapLabelRenderer<N> renderer)
           
 void setModel(TreeMapModel<N> model)
          Sets the data model and registers with it for listener notifications from the new data model.
 void setRenderingHints(RenderingHints renderingHints)
           
 void setSelectionToolTip(TreeMapToolTip<N> tooltip)
           
 void setToolTip(TreeMapToolTip<N> tooltip)
           
 void setTooltipRenderer(TreeMapTooltipRenderer<N> renderer)
           
 void startRubberBand(int x, int y)
          
 void stopRubberBand()
          
 void stretchRubberBand(int x, int y)
          
protected  void updateModelDimension()
           
 Rectangle worldToScreeen(Rectangle2D rectangle)
          Convert the specified rectangle to screen coordinates.
protected  int worldToScreenX(double x)
          
protected  int worldToScreenY(double y)
          
 void zoom(boolean animate, double x1, double x2, double y1, double y2)
          
 
Methods inherited from class com.jidesoft.treemap.TreeMapView
getProgressive, getUI, getUIClassID, isShowTiming, isUpdateModelDimension, setProgressive, setShowTiming, setUI, setUpdateModelDimension, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTreeMapView

public DefaultTreeMapView()
Method Detail

updateModelDimension

protected void updateModelDimension()
Specified by:
updateModelDimension in class TreeMapView<N>

setModel

public void setModel(TreeMapModel<N> model)
Sets the data model and registers with it for listener notifications from the new data model.

Specified by:
setModel in class TreeMapView<N>
Parameters:
model - the new data model
See Also:
TreeMapView.getModel()

getModel

public TreeMapModel<N> getModel()
Returns the TreeMapModel that provides the data displayed by this TreeMapView.

Specified by:
getModel in class TreeMapView<N>
Returns:
the TreeMapModel that provides the data displayed by this TreeMapView
See Also:
TreeMapView.setModel(com.jidesoft.treemap.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 class TreeMapView<N>

isDirty

public boolean isDirty()

Specified by:
isDirty in class TreeMapView<N>

getScreenShape

public Shape getScreenShape(N node)
Returns the shape of the node according to its layout position in screen coordinates.

Specified by:
getScreenShape in class TreeMapView<N>
Parameters:
node - the node
Returns:
the shape of the node

getRenderedShape

public Shape getRenderedShape(N node)
Returns the shape of the node according to its rendered position in screen coordinates.

Specified by:
getRenderedShape in class TreeMapView<N>
Parameters:
node - the node
Returns:
the shape of the node

getViewport

public Rectangle2D getViewport()
Specified by:
getViewport in class TreeMapView<N>

getWorld

public Rectangle2D getWorld()
Specified by:
getWorld in class TreeMapView<N>

screenToWorldX

public double screenToWorldX(int x)

Specified by:
screenToWorldX in class TreeMapView<N>

screenToWorldY

public double screenToWorldY(int y)

Specified by:
screenToWorldY in class TreeMapView<N>

worldToScreenX

protected int worldToScreenX(double x)

Specified by:
worldToScreenX in class TreeMapView<N>

worldToScreenY

protected int worldToScreenY(double y)

Specified by:
worldToScreenY in class TreeMapView<N>

getXRangeModel

protected MutableBoundedInterval getXRangeModel()


getYRangeModel

protected MutableBoundedInterval getYRangeModel()


getPreRenderers

public Iterable<TreeMapRenderer> getPreRenderers()

Specified by:
getPreRenderers in class TreeMapView<N>

getPreProgressiveRenderers

public Iterable<TreeMapRenderer> getPreProgressiveRenderers()

Specified by:
getPreProgressiveRenderers in class TreeMapView<N>

getProgressiveRenderers

public Iterable<TreeMapRenderer> getProgressiveRenderers()

Specified by:
getProgressiveRenderers in class TreeMapView<N>

getPostRenderers

public Iterable<TreeMapRenderer> getPostRenderers()

Specified by:
getPostRenderers in class TreeMapView<N>

zoom

public void zoom(boolean animate,
                 double x1,
                 double x2,
                 double y1,
                 double y2)

Specified by:
zoom in class TreeMapView<N>

getNode

public N getNode(Point p)
Returns the node at the specified location on the screen.

Specified by:
getNode in class TreeMapView<N>
Parameters:
p - the location on the screen
Returns:
the node

getNodes

public List<N> getNodes(Rectangle rect)
Returns the nodes overlapping the specified rectangle.

Specified by:
getNodes in class TreeMapView<N>
Parameters:
rect - the rectangle in screen coordinates
Returns:
the list of nodes

startRubberBand

public void startRubberBand(int x,
                            int y)

Specified by:
startRubberBand in class TreeMapView<N>

stretchRubberBand

public void stretchRubberBand(int x,
                              int y)

Specified by:
stretchRubberBand in class TreeMapView<N>

stopRubberBand

public void stopRubberBand()

Specified by:
stopRubberBand in class TreeMapView<N>

getRubberBand

public Rectangle2D getRubberBand()

Specified by:
getRubberBand in class TreeMapView<N>

getRubberBandScreen

public Rectangle getRubberBandScreen()

Specified by:
getRubberBandScreen in class TreeMapView<N>

worldToScreeen

public Rectangle worldToScreeen(Rectangle2D rectangle)
Convert the specified rectangle to screen coordinates.

Specified by:
worldToScreeen in class TreeMapView<N>
Parameters:
rectangle - the rectangle to convert
Returns:
the rectangle in screen coordinates

getZoomFactor

public float getZoomFactor()

Specified by:
getZoomFactor in class TreeMapView<N>

getLabelRenderer

public TreeMapLabelRenderer<N> getLabelRenderer()
Specified by:
getLabelRenderer in class TreeMapView<N>

setLabelRenderer

public void setLabelRenderer(TreeMapLabelRenderer<N> renderer)
Specified by:
setLabelRenderer in class TreeMapView<N>

getHeaderRenderer

public TreeMapHeaderRenderer<N> getHeaderRenderer()
Specified by:
getHeaderRenderer in class TreeMapView<N>

setHeaderRenderer

public void setHeaderRenderer(TreeMapHeaderRenderer<N> renderer)
Specified by:
setHeaderRenderer in class TreeMapView<N>

getTooltipRenderer

public TreeMapTooltipRenderer<N> getTooltipRenderer()
Specified by:
getTooltipRenderer in class TreeMapView<N>

setTooltipRenderer

public void setTooltipRenderer(TreeMapTooltipRenderer<N> renderer)
Specified by:
setTooltipRenderer in class TreeMapView<N>

getRenderingHints

public RenderingHints getRenderingHints()
Specified by:
getRenderingHints in class TreeMapView<N>

setRenderingHints

public void setRenderingHints(RenderingHints renderingHints)
Specified by:
setRenderingHints in class TreeMapView<N>

getToolTip

public TreeMapToolTip<N> getToolTip()
Specified by:
getToolTip in class TreeMapView<N>

setToolTip

public void setToolTip(TreeMapToolTip<N> tooltip)
Specified by:
setToolTip in class TreeMapView<N>

getSelectionToolTip

public TreeMapToolTip<N> getSelectionToolTip()
Specified by:
getSelectionToolTip in class TreeMapView<N>

setSelectionToolTip

public void setSelectionToolTip(TreeMapToolTip<N> tooltip)
Specified by:
setSelectionToolTip in class TreeMapView<N>

JIDE 3.5.15