public class NumberSpectrumTrend3DViewer extends javax.swing.JComponent implements ISpectrumListener, java.awt.event.ActionListener, java.awt.event.MouseListener, J3DTrendListener, IJLChartListener
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JMenuItem |
hProfileMenuItem |
protected javax.swing.JFrame |
hProfiler |
protected JLDataView |
hProfilerData |
protected JLChart |
hProfilerGraph |
protected javax.swing.JMenuItem |
hZoomInMenuItem |
protected javax.swing.JMenuItem |
hZoomOutMenuItem |
protected INumberSpectrum |
model |
protected javax.swing.JPopupMenu |
popupMenu |
protected SimplePropertyFrame |
propDialog |
protected javax.swing.JMenuItem |
saveFileMenuItem |
protected javax.swing.JFrame |
settingsFrame |
protected javax.swing.JMenuItem |
settingsMenuItem |
protected javax.swing.JMenuItem |
vProfileMenuItem |
protected LineProfilerViewer |
vProfiler |
protected javax.swing.JMenuItem |
vZoomInMenuItem |
protected javax.swing.JMenuItem |
vZoomOutMenuItem |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
NumberSpectrumTrend3DViewer()
Construct a number specturm 3D viewer
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
clearData()
Clear the viewer
|
void |
clearModel()
removes the model.
|
void |
clearStatusLabel()
Clear the values in the status label, only name is printed until the next click.
|
java.lang.String[] |
clickOnChart(JLChartEvent evt)
Called when the user click on the chart
|
void |
commit()
Rebuild image when some settings has been changed.
|
void |
errorChange(ErrorEvent evt) |
java.lang.String |
getFormat() |
Gradient |
getGradient()
Returns the gradient used by the viewer.
|
int |
getHistoryLength()
Returns the horizontal axis length in pixel.
|
int |
getHorizontalZoom()
Return the horizontal zoom factor.
|
long |
getTimeAt(int x)
Returns the timestamp of the values at the coordinates x.
|
J3DTrend |
getTrend()
Returns 3D trend components
|
double |
getValueAt(int x,
int y)
Return the value at (x,y) position.
|
int |
getVerticalZoom()
Return the vertical zoom factor
|
JLAxis |
getXAxis()
Returns a handle to the horizontal axis
|
int |
getXCursor()
Returns horizontal position of the cursor (data coordinates)
-1 is returned if there is no cursor.
|
JLAxis |
getYAxis()
Returns a handle to the vertical axis
|
int |
getYCursor()
Returns vertical position of the cursor (data coordinates)
-1 is returned if there is no cursor.
|
double |
getZMaximum()
Returns maximum value of the z axis (color)
|
double |
getZMinimum()
Returns the minimum of the of the z axis (color)
|
boolean |
isGradientVisible()
Returns true when the gradient is visible.
|
boolean |
isLogScale()
Return true if the viewer is in log scale for the colormap, false otherwise
|
boolean |
isShowDerivative()
Return true if the viewer display derivative data, false otherwise
|
boolean |
isShowingMenu()
Returns true is the image viewer menu is displayed when clicking
on the right mouse button.
|
boolean |
isZAutoScale()
Returns true if the viewer is in autoscale mode for the colormap, false otherwise
|
static void |
main(java.lang.String[] args) |
protected java.lang.String |
makeTabbedString(boolean transpose) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
readPollingHistory(boolean readPolling)
Reads the polling history when setting the model
|
void |
saveDataFile() |
void |
scrollToLeft()
Scrolls the image to the left
|
void |
scrollToRight()
Scrolls the image to the right
|
void |
setCursorEnabled(boolean enable)
Enable cross cursor on mouse click
|
void |
setData(long[] dates,
double[][] data)
Fill the viewer with arbitrary data
|
void |
setFormat(java.lang.String f) |
void |
setGradient(Gradient g)
Sets the colormap.
|
void |
setGradientVisible(boolean b)
Displays or hides the gradient (right panel).
|
void |
setHistoryLength(int length)
Sets the horizontal axis length in pixel.
|
void |
setHorizontalZoom(int zoom)
Sets the horizontal zoom factor
-10 = 10%
-9 = 11%
-8 = 12%
-7 = 14%
-6 = 16%
-5 = 20%
-4 = 25%
-3 = 33%
-2 = 50%
-1 = 100%
0 = Not allowed
1 = 100%
2 = 200%
...
|
void |
setLogScale(boolean logScale)
Set the viewer in linear or log scale for the colormap
|
void |
setModel(INumberSpectrum v)
Sets the model of this viewer
|
void |
setName(java.lang.String name)
Sets the main name which is displayed in the status line.
|
void |
setNaNColor(java.awt.Color nanColor)
Sets the color for the NaN values
|
void |
setShowDerivative(boolean show)
Set the viewer in linear or log scale for the colormap
|
void |
setShowingMenu(boolean b)
True to enable menu displayed when clicking on right mouse button.
|
void |
setTrendBackground(java.awt.Color bg)
Sets the trend backgroudn color
|
void |
setUnit(java.lang.String unit)
Sets the name which is displayed in the status line for the unit.
|
void |
setValueName(java.lang.String vName)
Sets the name wich is displayed in the status line for the value.
|
void |
setVerticalZoom(int zoom)
Sets the vertical zoom factor
-10 = 10%
-9 = 11%
-8 = 12%
-7 = 14%
-6 = 16%
-5 = 20%
-4 = 25%
-3 = 33%
-2 = 50%
-1 = 100%
0 = Not allowed
1 = 100%
2 = 200%
...
|
void |
setYIndexName(java.lang.String[] idxName)
Sets the names of Y index
|
void |
setYName(java.lang.String yName)
Sets the name which is displayed in the status line for the y value.
|
void |
setYTransfom(double gain,
double offset)
Sets the Y axis coordinates transformation
|
void |
setYUnit(java.lang.String unit)
Sets the unit of the y axis
|
void |
setZAutoScale(boolean autoScale)
Sets the viewer in autoscale mode for the colormap when true, use min and max otherwise
|
void |
setZMaximum(double max)
Sets the maximum of the z axis (color)
|
void |
setZMinimum(double min)
Sets the minimum of the z axis (color)
|
void |
showSettings() |
void |
spectrumChange(NumberSpectrumEvent evt) |
void |
stateChange(AttributeStateEvent evt) |
void |
updateCursor(int xCursor,
int yCursor)
Update cursor information.
|
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, updateUI
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, transferFocusDownCycle, validate, validateTree
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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected INumberSpectrum model
protected javax.swing.JPopupMenu popupMenu
protected javax.swing.JMenuItem saveFileMenuItem
protected javax.swing.JMenuItem settingsMenuItem
protected javax.swing.JMenuItem hProfileMenuItem
protected javax.swing.JMenuItem vProfileMenuItem
protected javax.swing.JMenuItem hZoomInMenuItem
protected javax.swing.JMenuItem hZoomOutMenuItem
protected javax.swing.JMenuItem vZoomInMenuItem
protected javax.swing.JMenuItem vZoomOutMenuItem
protected javax.swing.JFrame settingsFrame
protected SimplePropertyFrame propDialog
protected LineProfilerViewer vProfiler
protected javax.swing.JFrame hProfiler
protected JLChart hProfilerGraph
protected JLDataView hProfilerData
public NumberSpectrumTrend3DViewer()
public void setHistoryLength(int length)
length
- Horizontal axis lengthpublic J3DTrend getTrend()
public int getHistoryLength()
public void clearData()
public void setData(long[] dates, double[][] data)
dates
- Time stampsdata
- Datapublic void setZMinimum(double min)
min
- Minimum valuepublic double getZMinimum()
public void setZMaximum(double max)
max
- Maximum valuepublic double getZMaximum()
public boolean isZAutoScale()
public void setZAutoScale(boolean autoScale)
autoScale
- AutoScale flagpublic boolean isLogScale()
public void setLogScale(boolean logScale)
logScale
- LogScale flagpublic boolean isShowDerivative()
public void setShowDerivative(boolean show)
show
- Display derivative datapublic void setGradient(Gradient g)
g
- Gradient colormappublic Gradient getGradient()
public void setGradientVisible(boolean b)
b
- True if status line is displayedpublic boolean isGradientVisible()
public void setNaNColor(java.awt.Color nanColor)
nanColor
- NaN colorpublic JLAxis getXAxis()
public JLAxis getYAxis()
public void setHorizontalZoom(int zoom)
zoom
- zoom factor (between -4 and 8)public int getHorizontalZoom()
public void setVerticalZoom(int zoom)
zoom
- zoom factor (between -4 and 8)public int getVerticalZoom()
public void setFormat(java.lang.String f)
public java.lang.String getFormat()
public void setModel(INumberSpectrum v)
v
- NumberSpectrum modelpublic void clearModel()
public long getTimeAt(int x)
x
- X coordinates (in image coordinates)public int getXCursor()
public int getYCursor()
public double getValueAt(int x, int y)
x
- X coordinates (in image coordinates)y
- Y coordinates (in image coordinates)public void setCursorEnabled(boolean enable)
enable
- Enable cursorpublic void clearStatusLabel()
public void updateCursor(int xCursor, int yCursor)
updateCursor
in interface J3DTrendListener
xCursor
- x coordinates (referenced by the image)yCursor
- y coordinates (referenced by the image)public void setShowingMenu(boolean b)
b
- True to enable the menupublic boolean isShowingMenu()
public void readPollingHistory(boolean readPolling)
readPolling
- true to enable history reading, false otherwisepublic void setValueName(java.lang.String vName)
vName
- value namepublic void setYName(java.lang.String yName)
yName
- y axis namepublic void setYIndexName(java.lang.String[] idxName)
idxName
- Array of string containing vertical index namepublic void setYUnit(java.lang.String unit)
unit
- Y axis unitpublic void setYTransfom(double gain, double offset)
gain
- Y gainoffset
- Y offsetpublic void setUnit(java.lang.String unit)
unit
- Unitpublic void setName(java.lang.String name)
setName
in class java.awt.Component
name
- Namepublic void commit()
public void scrollToRight()
public void scrollToLeft()
public void setTrendBackground(java.awt.Color bg)
bg
- Background colorpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public java.lang.String[] clickOnChart(JLChartEvent evt)
IJLChartListener
clickOnChart
in interface IJLChartListener
evt
- Event object (containing click inforamtion)public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void spectrumChange(NumberSpectrumEvent evt)
spectrumChange
in interface ISpectrumListener
public void stateChange(AttributeStateEvent evt)
stateChange
in interface IAttributeStateListener
public void errorChange(ErrorEvent evt)
errorChange
in interface IErrorListener
public void showSettings()
public void saveDataFile()
protected java.lang.String makeTabbedString(boolean transpose)
public static void main(java.lang.String[] args)