insensa.view.image
Class ImageVariableBreaks

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by insensa.view.image.ImageVariableBreaks
All Implemented Interfaces:
ImageComponent, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ImageVariableBreaks
extends javax.swing.JComponent
implements ImageComponent

See Also:
Serialized Form

Nested Class Summary
 class ImageVariableBreaks.DropInfoListener
           
(package private)  class ImageVariableBreaks.myMouseListener
           
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  java.util.List<ClassificationRange> breakList
           
private  org.jfree.chart.ChartPanel chartPanel
           
private  CCountValues counts
           
(package private)  double[][] data
           
(package private)  CDialogSetVariableBreaksProperties dialog
           
private  java.awt.image.BufferedImage image
           
(package private)  java.util.List<org.jfree.chart.annotations.XYLineAnnotation> lineList
           
private  int maxCnt
           
(package private)  double maxCount
           
private  float maxHeight
           
private  int maxWidth
           
(package private)  double minCount
           
private  java.awt.Dimension pDim
           
private  org.jfree.chart.plot.XYPlot plot
           
private static long serialVersionUID
           
private  int startX
           
private  float startY
           
private  float stepHeight
           
private  int widthPerBar
           
 
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
ImageVariableBreaks(CCountValues lcounts, java.lang.String applicationTitle, java.lang.String chartTitle, CDialogSetVariableBreaksProperties dialog)
           
 
Method Summary
 void addBreakLine(double xVal)
           
 void checkPosition()
           
 void createHistogramm(java.awt.Dimension dim)
           
 java.awt.image.BufferedImage createNewImage(java.awt.Dimension dim)
           
private  org.jfree.chart.JFreeChart createXYChart(org.jfree.data.xy.XYDataset dataset, java.lang.String title)
          Creates a chart.
private  org.jfree.data.xy.XYDataset createXYDataset()
           
 void deleteBreakLine(int index)
           
 javax.swing.JComponent getComponent()
           
 java.awt.image.BufferedImage getImage()
           
 javax.swing.JComponent getPanel()
           
 void markBreakLine(int index, double xVal)
           
 void moveBreakLine(int index, double xVal)
           
protected  void paintComponent(java.awt.Graphics g)
           
 void refresh(java.awt.Dimension dim)
           
 void resizeImage(java.awt.Dimension d)
           
 void setImage(java.awt.image.BufferedImage image)
           
 void unmarkBreakLine(int index, double xVal)
           
 
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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, updateUI
 
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

startX

private int startX

maxWidth

private int maxWidth

maxHeight

private float maxHeight

startY

private float startY

maxCnt

private int maxCnt

widthPerBar

private int widthPerBar

stepHeight

private float stepHeight

pDim

private java.awt.Dimension pDim

image

private java.awt.image.BufferedImage image

counts

private CCountValues counts

chartPanel

private org.jfree.chart.ChartPanel chartPanel

plot

private org.jfree.chart.plot.XYPlot plot

data

double[][] data

maxCount

double maxCount

minCount

double minCount

lineList

java.util.List<org.jfree.chart.annotations.XYLineAnnotation> lineList

breakList

java.util.List<ClassificationRange> breakList

dialog

CDialogSetVariableBreaksProperties dialog
Constructor Detail

ImageVariableBreaks

public ImageVariableBreaks(CCountValues lcounts,
                           java.lang.String applicationTitle,
                           java.lang.String chartTitle,
                           CDialogSetVariableBreaksProperties dialog)
                    throws java.io.IOException
Parameters:
lcounts -
applicationTitle -
chartTitle -
dialog -
Throws:
java.io.IOException
Method Detail

addBreakLine

public void addBreakLine(double xVal)
Parameters:
xVal -

checkPosition

public void checkPosition()
                   throws java.io.IOException
Throws:
java.io.IOException

createHistogramm

public void createHistogramm(java.awt.Dimension dim)
                      throws java.io.IOException
Parameters:
dim -
Throws:
java.io.IOException

createNewImage

public java.awt.image.BufferedImage createNewImage(java.awt.Dimension dim)
                                            throws java.io.IOException
Specified by:
createNewImage in interface ImageComponent
Returns:
Throws:
java.io.IOException
See Also:
ImageComponent.createNewImage(java.awt.Dimension)

createXYChart

private org.jfree.chart.JFreeChart createXYChart(org.jfree.data.xy.XYDataset dataset,
                                                 java.lang.String title)
Creates a chart.

Parameters:
dataset -
title -
Returns:

createXYDataset

private org.jfree.data.xy.XYDataset createXYDataset()
                                             throws java.io.IOException
Returns:
Throws:
java.io.IOException

deleteBreakLine

public void deleteBreakLine(int index)
Parameters:
index -

getComponent

public javax.swing.JComponent getComponent()
Specified by:
getComponent in interface ImageComponent
Returns:
See Also:
ImageComponent.getComponent()

getImage

public java.awt.image.BufferedImage getImage()
Specified by:
getImage in interface ImageComponent
Returns:
See Also:
ImageComponent.getImage()

getPanel

public javax.swing.JComponent getPanel()
Returns:

markBreakLine

public void markBreakLine(int index,
                          double xVal)
Parameters:
index -
xVal -

moveBreakLine

public void moveBreakLine(int index,
                          double xVal)
Parameters:
index -
xVal -

paintComponent

protected void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics)

refresh

public void refresh(java.awt.Dimension dim)
             throws java.io.IOException
Specified by:
refresh in interface ImageComponent
Throws:
java.io.IOException
See Also:
ImageComponent.refresh(java.awt.Dimension)

resizeImage

public void resizeImage(java.awt.Dimension d)
                 throws java.io.IOException
Specified by:
resizeImage in interface ImageComponent
Throws:
java.io.IOException
See Also:
ImageComponent.resizeImage(java.awt.Dimension)

setImage

public void setImage(java.awt.image.BufferedImage image)
Parameters:
image -

unmarkBreakLine

public void unmarkBreakLine(int index,
                            double xVal)
Parameters:
index -
xVal -