|
|||||||||
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
uk.ac.starlink.ttools.plot.TablePlot
public abstract class TablePlot
Superclass for all components which draw plots from table data.
Nested Class Summary |
---|
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 |
---|
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 | |
---|---|
protected |
TablePlot()
Constructor. |
Method Summary | |
---|---|
void |
addPlotListener(PlotListener listener)
Adds a listener which will be notified when this plot has been painted. |
DataBounds |
calculateBounds(PlotData data,
PlotState state)
Calculates data bounds for a given data set as appropriate for this plot. |
protected void |
firePlotChangedLater(PlotEvent evt)
Sends a plot event to all registered listeners, deferring the send by submitting it for future execution on the AWT event dispatch thread. |
abstract Rectangle |
getPlotBounds()
Returns the bounds of the actual plot. |
PlotState |
getState()
Returns the most recently set state for this plot. |
static boolean |
isVectorContext(Graphics g)
Determines whether the given graphics context represents a vector graphics type environment (such as PostScript). |
void |
removePlotListener(PlotListener listener)
Removes a listener previously added by addPlotListener . |
void |
setState(PlotState state)
Sets the plot state for this plot. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected TablePlot()
Method Detail |
---|
public void setState(PlotState state)
state
- plot statepublic PlotState getState()
public void addPlotListener(PlotListener listener)
listener
- listener to addpublic void removePlotListener(PlotListener listener)
addPlotListener
.
listener
- listener to removeprotected void firePlotChangedLater(PlotEvent evt)
JComponent.paintComponent(java.awt.Graphics)
invocation.
I'm not certain it's a bad idea to call other swing-type methods
from within a paint, but it sounds like a good thing to avoid.
evt
- event to dispatchpublic DataBounds calculateBounds(PlotData data, PlotState state)
data
- plot datastate
- plot state
public abstract Rectangle getPlotBounds()
public static boolean isVectorContext(Graphics g)
g
- graphics context to test
g
is PostScript-like
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |