org.knime.base.node.mine.sota.view
Class SotaDrawingPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.knime.base.node.mine.sota.view.SotaDrawingPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, HiLiteListener

public class SotaDrawingPane
extends JPanel
implements HiLiteListener

Author:
Kilian Thiel, University of Konstanz
See Also:
Serialized Form

Nested Class Summary
(package private)  class SotaDrawingPane.PaneController
          Controls the KeyEvents of the SotaDrawingPane.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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 POPUP_HILITE_SELECTED
          Popup menue entry constant.
static String POPUP_UNHILITE
          Popup menue entry constant.
static String POPUP_UNHILITE_SELECTED
          Popup menue entry constant.
 
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
SotaDrawingPane(SotaTreeCell root, DataArray data, DataArray originalData, boolean isHFuzzyData, int maxHLevel)
          Creates new instance of SotaDrawingPane, which draws the given data and the trained binary cluster tree given by its root node.
 
Method Summary
 JMenu createHiLiteMenu()
           
 JToolTip createToolTip()
          
 DataArray getData()
           
 HiLiteHandler getHiliteHandler()
           
 int getMaxHLevel()
           
 SotaTreeCell getRoot()
           
 String getToolTipText(MouseEvent event)
          
 void hiLite(KeyEvent event)
          Invoked when some item(s) were hilit.
 boolean isDrawHierarchicalFuzzyData()
           
 boolean isDrawHierarchicalSeparators()
           
 boolean isHierarchicalFuzzyData()
           
 boolean isZooming()
           
 void modelChanged(boolean first)
          Creates the Tree structure for the JTree and paints it.
 void paint(Graphics g)
          
 void setAccentHLevel(int level)
           
 void setData(DataArray data)
           
 void setDrawHierarchicalFuzzyData(boolean hierarchicalFuzzyData)
           
 void setDrawHierarchicalSeparators(boolean hierarchicalSeparators)
           
 void setHiliteHandler(HiLiteHandler handler)
           
 void setMaxHLevel(int level)
           
 void setOriginalData(DataArray data)
           
 void setRoot(SotaTreeCell root)
           
 void setZooming(boolean zooming)
           
 void unHiLite(KeyEvent event)
          Invoked when some item(s) were unhilit.
 void unHiLiteAll(KeyEvent event)
          Invoked, when everything (all rows) are unhilit.
protected  void zoomIn()
          Zooms in.
protected  void zoomOut()
          Zooms out.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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

POPUP_HILITE_SELECTED

public static final String POPUP_HILITE_SELECTED
Popup menue entry constant.

See Also:
Constant Field Values

POPUP_UNHILITE_SELECTED

public static final String POPUP_UNHILITE_SELECTED
Popup menue entry constant.

See Also:
Constant Field Values

POPUP_UNHILITE

public static final String POPUP_UNHILITE
Popup menue entry constant.

See Also:
Constant Field Values
Constructor Detail

SotaDrawingPane

public SotaDrawingPane(SotaTreeCell root,
                       DataArray data,
                       DataArray originalData,
                       boolean isHFuzzyData,
                       int maxHLevel)
Creates new instance of SotaDrawingPane, which draws the given data and the trained binary cluster tree given by its root node.

Parameters:
root - the root node of the binary tree to draw
data - the data to draw
originalData - the original data
isHFuzzyData - if true, clusters will be drawn as hierarchical fuzzy clusters
maxHLevel - the maximum hierarchical level
Method Detail

getToolTipText

public String getToolTipText(MouseEvent event)

Overrides:
getToolTipText in class JComponent

createToolTip

public JToolTip createToolTip()

Overrides:
createToolTip in class JComponent

modelChanged

public void modelChanged(boolean first)
Creates the Tree structure for the JTree and paints it.

Parameters:
first - if true size of JPanel will be recomputed

paint

public void paint(Graphics g)

Overrides:
paint in class JComponent

getRoot

public SotaTreeCell getRoot()
Returns:
the root

setRoot

public void setRoot(SotaTreeCell root)
Parameters:
root - the root to set

setData

public void setData(DataArray data)
Parameters:
data - the data to set

setOriginalData

public void setOriginalData(DataArray data)
Parameters:
data - the original data to set.

getData

public DataArray getData()
Returns:
the data

zoomIn

protected void zoomIn()
Zooms in.


zoomOut

protected void zoomOut()
Zooms out.


unHiLiteAll

public void unHiLiteAll(KeyEvent event)
Invoked, when everything (all rows) are unhilit.

Specified by:
unHiLiteAll in interface HiLiteListener
Parameters:
event - contains a list of row key that were unhilit

hiLite

public void hiLite(KeyEvent event)
Invoked when some item(s) were hilit.

Specified by:
hiLite in interface HiLiteListener
Parameters:
event - contains a list of row keys that were hilit

unHiLite

public void unHiLite(KeyEvent event)
Invoked when some item(s) were unhilit.

Specified by:
unHiLite in interface HiLiteListener
Parameters:
event - contains a list of row keys that were unhilit

setHiliteHandler

public void setHiliteHandler(HiLiteHandler handler)
Parameters:
handler - the hiliteHandler to set

getHiliteHandler

public HiLiteHandler getHiliteHandler()
Returns:
the hiliteHandler

isHierarchicalFuzzyData

public boolean isHierarchicalFuzzyData()
Returns:
the isHierarchicalFuzzyData

isDrawHierarchicalFuzzyData

public boolean isDrawHierarchicalFuzzyData()
Returns:
the drawHierarchicalFuzzyData.

setDrawHierarchicalFuzzyData

public void setDrawHierarchicalFuzzyData(boolean hierarchicalFuzzyData)
Parameters:
hierarchicalFuzzyData - the drawHierarchicalFuzzyData to set

isDrawHierarchicalSeparators

public boolean isDrawHierarchicalSeparators()
Returns:
the drawHierarchicalSeparators

setDrawHierarchicalSeparators

public void setDrawHierarchicalSeparators(boolean hierarchicalSeparators)
Parameters:
hierarchicalSeparators - the drawHierarchicalSeparators to set

setMaxHLevel

public void setMaxHLevel(int level)
Parameters:
level - the maxHLevel to set

getMaxHLevel

public int getMaxHLevel()
Returns:
the maxHLevel

setAccentHLevel

public void setAccentHLevel(int level)
Parameters:
level - accentHLevel to set

createHiLiteMenu

public JMenu createHiLiteMenu()
Returns:
a JMenu entry handling the hiliting of objects

isZooming

public boolean isZooming()
Returns:
the m_zooming

setZooming

public void setZooming(boolean zooming)
Parameters:
zooming - zooming to set


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.