JIDE 3.5.15

com.jidesoft.treemap
Class TreeMapView<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>
Type Parameters:
N - the type of nodes
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
DefaultTreeMapView

public abstract class TreeMapView<N>
extends JComponent

Main class for the view part of TreeMap.

See Also:
Serialized Form

Nested Class Summary
static class 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
static String PROPERTY_PROGRESSIVE
           
static String 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
 
Method Summary
abstract  TreeMapHeaderRenderer getHeaderRenderer()
           
abstract  TreeMapLabelRenderer getLabelRenderer()
           
abstract  TreeMapModel<N> getModel()
          Returns the TreeMapModel that provides the data displayed by this TreeMapView.
abstract  N getNode(Point p)
          Returns the node at the specified location on the screen.
abstract  List<N> getNodes(Rectangle rect)
          Returns the nodes overlapping the specified rectangle.
abstract  Iterable<TreeMapRenderer> getPostRenderers()
           
abstract  Iterable<TreeMapRenderer> getPreProgressiveRenderers()
           
abstract  Iterable<TreeMapRenderer> getPreRenderers()
           
 TreeMapView.Progressive getProgressive()
          Returns whether progressive display mode is enabled.
abstract  Iterable<TreeMapRenderer> getProgressiveRenderers()
           
abstract  Shape getRenderedShape(N node)
          Returns the shape of the node according to its rendered position in screen coordinates.
abstract  RenderingHints getRenderingHints()
           
abstract  Rectangle2D getRubberBand()
           
abstract  Rectangle getRubberBandScreen()
           
abstract  Shape getScreenShape(N node)
          Returns the shape of the node according to its layout position in screen coordinates.
abstract  TreeMapToolTip<N> getSelectionToolTip()
           
abstract  TreeMapToolTip<N> getToolTip()
           
abstract  TreeMapTooltipRenderer getTooltipRenderer()
           
 TreeMapUI getUI()
          Returns the L&F object that renders this component.
 String getUIClassID()
          Returns the suffix used to construct the name of the L&F class used to render this component.
abstract  Rectangle2D getViewport()
           
abstract  Rectangle2D getWorld()
           
abstract  float getZoomFactor()
           
abstract  boolean isDirty()
           
 boolean isShowTiming()
          Returns whether information about refresh rate should be displayed.
 boolean isUpdateModelDimension()
           
abstract  double screenToWorldX(int x)
           
abstract  double screenToWorldY(int y)
           
abstract  void setDirty(boolean dirty)
           
abstract  void setHeaderRenderer(TreeMapHeaderRenderer<N> renderer)
           
abstract  void setLabelRenderer(TreeMapLabelRenderer<N> renderer)
           
abstract  void setModel(TreeMapModel<N> model)
          Sets the data model and registers with it for listener notifications from the new data model.
 void setProgressive(TreeMapView.Progressive progressive)
          Sets whether progressive display mode is enabled.
abstract  void setRenderingHints(RenderingHints renderingHints)
           
abstract  void setSelectionToolTip(TreeMapToolTip<N> toolTip)
           
 void setShowTiming(boolean showTiming)
          Sets whether information about refresh rate should be displayed.
abstract  void setToolTip(TreeMapToolTip<N> toolTip)
           
abstract  void setTooltipRenderer(TreeMapTooltipRenderer<N> renderer)
           
 void setUI(TreeMapUI ui)
           
 void setUpdateModelDimension(boolean updateModelDimension)
           
abstract  void startRubberBand(int x, int y)
           
abstract  void stopRubberBand()
           
abstract  void stretchRubberBand(int x, int y)
           
protected abstract  void updateModelDimension()
           
 void updateUI()
          Resets the UI property to a value from the current look and feel.
abstract  Rectangle worldToScreeen(Rectangle2D rectangle)
          Convert the specified rectangle to screen coordinates.
protected abstract  int worldToScreenX(double x)
           
protected abstract  int worldToScreenY(double y)
           
abstract  void zoom(boolean animate, double x1, double x2, double y1, double y2)
           
 
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
 

Field Detail

PROPERTY_PROGRESSIVE

public static final String PROPERTY_PROGRESSIVE
See Also:
Constant Field Values

uiClassID

public static final String uiClassID
See Also:
Constant Field Values
Method Detail

setUI

public void setUI(TreeMapUI ui)

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI in class JComponent

getUI

public TreeMapUI getUI()
Returns the L&F object that renders this component.

Returns:
the TreeMapUI L&F object

getUIClassID

public String getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.

Overrides:
getUIClassID in class JComponent
Returns:
the string "TreeMapUI"

isShowTiming

public boolean isShowTiming()
Returns whether information about refresh rate should be displayed.

Returns:
true to display refresh rate information, false otherwise

setShowTiming

public void setShowTiming(boolean showTiming)
Sets whether information about refresh rate should be displayed.

Parameters:
showTiming - true to display refresh rate information, false otherwise

getProgressive

public TreeMapView.Progressive getProgressive()
Returns whether progressive display mode is enabled.

Returns:
true if progressive display mode is enabled, false otherwise

setProgressive

public void setProgressive(TreeMapView.Progressive progressive)
Sets whether progressive display mode is enabled.

Parameters:
progressive - true if progressive display mode is enabled, false otherwise

isUpdateModelDimension

public boolean isUpdateModelDimension()

setUpdateModelDimension

public void setUpdateModelDimension(boolean updateModelDimension)

updateModelDimension

protected abstract void updateModelDimension()

setModel

public abstract void setModel(TreeMapModel<N> model)
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()

getModel

public abstract TreeMapModel<N> 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:
setModel(com.jidesoft.treemap.TreeMapModel)

getScreenShape

public abstract Shape getScreenShape(N node)
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

public abstract Shape getRenderedShape(N node)
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

public abstract double screenToWorldX(int x)

screenToWorldY

public abstract double screenToWorldY(int y)

worldToScreenX

protected abstract int worldToScreenX(double x)

worldToScreenY

protected abstract int worldToScreenY(double y)

getViewport

public abstract Rectangle2D getViewport()

getWorld

public abstract Rectangle2D getWorld()

zoom

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

getNode

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

Parameters:
p - the location on the screen
Returns:
the node

getNodes

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

Parameters:
rect - the rectangle in screen coordinates
Returns:
the list of nodes

startRubberBand

public abstract void startRubberBand(int x,
                                     int y)

stretchRubberBand

public abstract void stretchRubberBand(int x,
                                       int y)

stopRubberBand

public abstract void stopRubberBand()

getRubberBand

public abstract Rectangle2D getRubberBand()

getRubberBandScreen

public abstract Rectangle getRubberBandScreen()

getZoomFactor

public abstract float getZoomFactor()

getPreRenderers

public abstract Iterable<TreeMapRenderer> getPreRenderers()

getPreProgressiveRenderers

public abstract Iterable<TreeMapRenderer> getPreProgressiveRenderers()

getProgressiveRenderers

public abstract Iterable<TreeMapRenderer> getProgressiveRenderers()

getPostRenderers

public abstract Iterable<TreeMapRenderer> getPostRenderers()

setDirty

public abstract void setDirty(boolean dirty)

isDirty

public abstract boolean isDirty()

setLabelRenderer

public abstract void setLabelRenderer(TreeMapLabelRenderer<N> renderer)

getLabelRenderer

public abstract TreeMapLabelRenderer getLabelRenderer()

setHeaderRenderer

public abstract void setHeaderRenderer(TreeMapHeaderRenderer<N> renderer)

getHeaderRenderer

public abstract TreeMapHeaderRenderer getHeaderRenderer()

setTooltipRenderer

public abstract void setTooltipRenderer(TreeMapTooltipRenderer<N> renderer)

getTooltipRenderer

public abstract TreeMapTooltipRenderer getTooltipRenderer()

worldToScreeen

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

Parameters:
rectangle - the rectangle to convert
Returns:
the rectangle in screen coordinates

getRenderingHints

public abstract RenderingHints getRenderingHints()

setRenderingHints

public abstract void setRenderingHints(RenderingHints renderingHints)

getToolTip

public abstract TreeMapToolTip<N> getToolTip()

setToolTip

public abstract void setToolTip(TreeMapToolTip<N> toolTip)

getSelectionToolTip

public abstract TreeMapToolTip<N> getSelectionToolTip()

setSelectionToolTip

public abstract void setSelectionToolTip(TreeMapToolTip<N> toolTip)

JIDE 3.5.15