public class HistogramPanel extends BorderedPanel
Modifier and Type | Class and Description |
---|---|
static interface |
HistogramPanel.HistogramPanelListener |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
HistogramPanel(double minValue,
double maxValue,
boolean integer)
Create a new histogram panel for the specified value range.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(HistogramPanel.HistogramPanelListener l) |
void |
addValue(double value)
Deprecated.
Use
getHistogram.addValue(double) instead. |
void |
addValues(byte[] array,
boolean signed)
Deprecated.
Use
getHistogram.addValue(byte[]) instead. |
void |
addValues(double[] array)
Deprecated.
Use
getHistogram.addValue(double[]) instead. |
void |
addValues(float[] array)
Deprecated.
Use
getHistogram.addValue(float[]) instead. |
void |
addValues(int[] array,
boolean signed)
Deprecated.
Use
getHistogram.addValue(int[]) instead. |
void |
addValues(long[] array,
boolean signed)
Deprecated.
Use
getHistogram.addValue(long[]) instead. |
void |
addValues(java.lang.Object array,
boolean signed)
Deprecated.
Use
getHistogram.addValue(Object, boolean signed) instead. |
void |
addValues(short[] array,
boolean signed)
Deprecated.
Use
getHistogram.addValue(short[]) instead. |
int |
dataToPixel(double value)
Convert a data value to the corresponding pixel position
|
void |
done()
Invoke this method when the histogram calculation has been completed to refresh data cache.
|
double |
getAdjustedBinSize(int index)
Returns the adjusted size (linear / log normalized) of the specified bin.
|
java.awt.Color |
getBackgroundColor()
Returns the background color
|
int |
getBinNumber() |
int[] |
getBins() |
int |
getBinSize(int index)
Returns the size of the specified bin (number of element in the bin)
|
double |
getBinWidth() |
java.awt.Color |
getColor()
Returns the drawing color
|
Histogram |
getHistogram()
Get histogram object
|
double[] |
getHistogramData()
Get computed histogram data
|
boolean |
getLogScaling()
Returns true if histogram is displayed with LOG scaling
|
double |
getMaxValue()
Returns the maximum allowed value of the histogram.
|
double |
getMinValue()
Returns the minimum allowed value of the histogram.
|
boolean |
getUseLAFColors()
Returns true if histogram use LAF color scheme.
|
boolean |
isIntegerType()
Returns true if the input value are integer values only.
|
boolean |
isUpdating()
Returns true when histogram is being calculated.
|
int |
pixelToBin(int value)
Convert a pixel position to corresponding bin index
|
double |
pixelToData(int value)
Convert a pixel position to corresponding data value
|
void |
removeListener(HistogramPanel.HistogramPanelListener l) |
void |
reset()
Call this method to inform you start histogram computation (allow the panel to display
"computing" message).
|
void |
setBackgroundColor(java.awt.Color value)
Set the background color
|
void |
setColor(java.awt.Color value)
Set the drawing color
|
void |
setLogScaling(boolean value)
Set to true to display histogram with LOG scaling (else it uses linear scaling).
|
void |
setMinMaxIntValues(double min,
double max,
boolean intType)
Set minimum, maximum and integer values at once
|
void |
setUseLAFColors(boolean value)
Set to true to use LAF color scheme.
|
getClientHeight, getClientWidth, getClientX, getClientY
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusBackward, transferFocusUpCycle
public HistogramPanel(double minValue, double maxValue, boolean integer)
setLogScaling(boolean)
minValue
- maxValue
- integer
- public boolean isUpdating()
public void reset()
done()
when computation is done.done()
@Deprecated public void addValue(double value)
getHistogram.addValue(double)
instead.@Deprecated public void addValues(java.lang.Object array, boolean signed)
getHistogram.addValue(Object, boolean signed)
instead.@Deprecated public void addValues(byte[] array, boolean signed)
getHistogram.addValue(byte[])
instead.@Deprecated public void addValues(short[] array, boolean signed)
getHistogram.addValue(short[])
instead.@Deprecated public void addValues(int[] array, boolean signed)
getHistogram.addValue(int[])
instead.@Deprecated public void addValues(long[] array, boolean signed)
getHistogram.addValue(long[])
instead.@Deprecated public void addValues(float[] array)
getHistogram.addValue(float[])
instead.@Deprecated public void addValues(double[] array)
getHistogram.addValue(double[])
instead.public double getAdjustedBinSize(int index)
getBinSize(int)
public int getBinSize(int index)
Histogram.getBinSize(int)
public int getBinNumber()
Histogram.getBinNumber()
public double getBinWidth()
Histogram.getBinWidth()
public int[] getBins()
Histogram.getBins()
public void done()
public double getMinValue()
public double getMaxValue()
public boolean isIntegerType()
public boolean getLogScaling()
public boolean getUseLAFColors()
getColor()
,
getBackgroundColor()
public java.awt.Color getColor()
public java.awt.Color getBackgroundColor()
public Histogram getHistogram()
public double[] getHistogramData()
public void setMinMaxIntValues(double min, double max, boolean intType)
public void setLogScaling(boolean value)
public void setUseLAFColors(boolean value)
setColor(Color)
,
setBackgroundColor(Color)
public void setColor(java.awt.Color value)
public void setBackgroundColor(java.awt.Color value)
public int dataToPixel(double value)
public double pixelToData(int value)
public int pixelToBin(int value)
public void addListener(HistogramPanel.HistogramPanelListener l)
public void removeListener(HistogramPanel.HistogramPanelListener l)