|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.isti.jplotresp.RespChartPanel
public class RespChartPanel
Class RespChartPanel generates and hosts the plotting of a response.
Nested Class Summary | |
---|---|
protected static class |
RespChartPanel.RespXYLineAndShapeRenderer
Class RespXYLineAndShapeRenderer extends XYLineAndShapeRenderer to support a 'showPointsFlag' parameter, define a smaller shape that is always returned via the 'getSeriesShape()' method, and show "square" shapes on the legend items. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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 | |
---|---|
protected static java.lang.String |
AMP_LABEL_STR
|
protected AmpPhaseBlk[] |
amplitudePhaseBlkArray
|
protected int |
ampPhaseSelIdx
|
protected org.jfree.chart.plot.XYPlot |
ampPlotObj
|
protected org.jfree.chart.ChartPanel |
chartPanelObj
|
protected boolean |
combineAmpPhaseFlag
|
protected static java.lang.String |
FREQLN_LABEL_STR
|
protected boolean |
logAmpFlag
|
protected OutputGenerator |
outputGeneratorObj
|
protected static java.lang.String |
PHASE_LABEL_STR
|
protected org.jfree.chart.plot.XYPlot |
plotObj
|
protected static java.awt.Shape |
RENDER_DEFAULT_SHAPE
|
protected static java.awt.Shape |
RENDER_LEGEND_SHAPE
|
protected org.jfree.chart.plot.ValueMarker |
senseFreqMarker
|
protected static java.awt.Paint[] |
seriesPaintDefaultsArray
|
protected boolean |
showFreqLineFlag
|
protected boolean |
showPointsFlag
|
protected java.lang.String |
title
|
protected static java.text.NumberFormat |
VNUMAXIS_FORMATTER
|
protected org.jfree.chart.axis.NumberAxis |
xAxis
|
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 | |
---|---|
RespChartPanel(OutputGenerator outGenObj,
java.lang.String channelIdFName,
boolean logSpacingFlag,
PlotDisplayOptionPanel plotDisplayOptionPanel)
Generates and hosts the plotting of a response. |
Method Summary | |
---|---|
boolean |
anyAmpValuesNotPositive()
Determines if any amplitude values are less than or equal to zero. |
protected boolean |
clearFreqLine()
Clears the frequency-sensitivity line. |
void |
createChartPrintJob()
Creates a print job for the chart. |
protected org.jfree.chart.plot.XYPlot |
createPlot(org.jfree.chart.plot.DrawingSupplier supplierObj,
org.jfree.data.xy.XYDataset datasetObj,
boolean ampPlotFlag,
org.jfree.chart.axis.ValueAxis domainAxis)
Create the plot. |
protected void |
createPlots()
Creates the plots. |
protected org.jfree.chart.axis.NumberAxis |
createVerticalNumberAxis(boolean logAxisFlag,
java.lang.String labelStr)
Create a vertical number axis for the specified series. |
void |
doSaveAs()
Opens a file chooser and gives the user an opportunity to save the chart in PNG format. |
void |
enterAmpPhaseSelection(int ampPhaseSelIdx)
Enters new amp/phase displayed selection. |
int |
getAmpPhaseSelection()
Returns the amp/phase displayed selection. |
boolean |
getCombineAmpPhaseFlag()
Returns a flag indicating whether or not the amp and phase plots should be combined on the chart. |
boolean |
getLogAmpFlag()
Returns a flag indicating whether or not the amplitude should be shown logarithmically. |
boolean |
getShowFreqLineFlag()
Returns a flag indicating whether or not sensitivity-frequency line is shown on the chart. |
boolean |
getShowPointsFlag()
Returns a flag indicating whether or not data-points are shown on the chart. |
void |
setCombineAmpPhaseFlag(boolean b)
Selects if the amp and phase plots should be combined on the chart. |
void |
setLogAmpFlag(boolean b)
Selects if the amplitude should be shown logarithmically. |
void |
setShowFreqLineFlag(boolean b)
Selects if sensitivity-frequency line is shown on the chart. |
void |
setShowPointsFlag(boolean b)
Selects if data-points are shown on the chart. |
protected void |
setShowPointsFlag(org.jfree.chart.plot.XYPlot plot,
boolean b)
Selects if data-points are shown on the chart. |
protected void |
showErrorMessage(java.lang.String msgStr)
Displays the given error message. |
protected void |
showFreqLine()
Displays the frequency-sensitivity line. |
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, createToolTip, 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, 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, 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 |
---|
protected int ampPhaseSelIdx
protected boolean showPointsFlag
protected boolean logAmpFlag
protected boolean combineAmpPhaseFlag
protected boolean showFreqLineFlag
protected final java.lang.String title
protected final AmpPhaseBlk[] amplitudePhaseBlkArray
protected final OutputGenerator outputGeneratorObj
protected org.jfree.chart.plot.XYPlot plotObj
protected org.jfree.chart.plot.XYPlot ampPlotObj
protected org.jfree.chart.plot.ValueMarker senseFreqMarker
protected final org.jfree.chart.axis.NumberAxis xAxis
protected org.jfree.chart.ChartPanel chartPanelObj
protected static final java.lang.String AMP_LABEL_STR
protected static final java.lang.String PHASE_LABEL_STR
protected static final java.lang.String FREQLN_LABEL_STR
protected static final java.awt.Shape RENDER_DEFAULT_SHAPE
protected static final java.awt.Shape RENDER_LEGEND_SHAPE
protected static final java.awt.Paint[] seriesPaintDefaultsArray
protected static final java.text.NumberFormat VNUMAXIS_FORMATTER
Constructor Detail |
---|
public RespChartPanel(OutputGenerator outGenObj, java.lang.String channelIdFName, boolean logSpacingFlag, PlotDisplayOptionPanel plotDisplayOptionPanel)
outGenObj
- output generator.channelIdFName
- channel ID fname.logSpacingFlag
- true to plot frequency values logarithmically.plotDisplayOptionPanel
- plot display option panel.Method Detail |
---|
protected void showErrorMessage(java.lang.String msgStr)
msgStr
- message string.protected org.jfree.chart.plot.XYPlot createPlot(org.jfree.chart.plot.DrawingSupplier supplierObj, org.jfree.data.xy.XYDataset datasetObj, boolean ampPlotFlag, org.jfree.chart.axis.ValueAxis domainAxis)
supplierObj
- drawing supplier to use.datasetObj
- dataset to use.ampPlotFlag
- true for amplitude plot; flag for phase plot.domainAxis
- domain axis to use, or null for none..
public void enterAmpPhaseSelection(int ampPhaseSelIdx)
ampPhaseSelIdx
- amp/phase display selectionpublic int getAmpPhaseSelection()
protected org.jfree.chart.axis.NumberAxis createVerticalNumberAxis(boolean logAxisFlag, java.lang.String labelStr)
logAxisFlag
- true for logarithmic axis; false for linear axis.labelStr
- label string for axis.
protected void createPlots()
public void setCombineAmpPhaseFlag(boolean b)
b
- true to combine amp/phase on the same plot.public boolean getCombineAmpPhaseFlag()
public void setShowPointsFlag(boolean b)
b
- true to show data-points on the plot.protected void setShowPointsFlag(org.jfree.chart.plot.XYPlot plot, boolean b)
plot
- the plot.b
- true to show data-points on the plot.public boolean getShowPointsFlag()
public void setLogAmpFlag(boolean b)
b
- true to plot amp values logarithmically.public boolean getLogAmpFlag()
public void setShowFreqLineFlag(boolean b)
b
- true to show sensitivity-frequency line on the plot.protected void showFreqLine()
protected boolean clearFreqLine()
public boolean getShowFreqLineFlag()
public boolean anyAmpValuesNotPositive()
public void createChartPrintJob()
public void doSaveAs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |