|
|||||||||
| 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
spv.graphics.GraphicsCanvasDecorator
spv.graphics.AbstractSensitiveCanvas
spv.graphics.AxisCanvas
public class AxisCanvas
This canvas adds axis with labels and titles to the decorated object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class spv.graphics.AbstractSensitiveCanvas |
|---|
AbstractSensitiveCanvas.CursorIconControl, AbstractSensitiveCanvas.MouseControl |
| 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 | |
|---|---|
private Annotation[] |
annotations
|
private Axis |
bottom_axis
|
static java.lang.String |
BOTTOM_AXIS_KEY
|
private java.awt.Graphics2D |
boundedGraphics
|
private Viewport |
dev
|
private boolean |
is_ready_to_draw
|
private Axis |
left_axis
|
static java.lang.String |
LEFT_AXIS_KEY
|
private Axis |
right_axis
|
private Axis |
top_axis
|
| Fields inherited from class spv.graphics.AbstractSensitiveCanvas |
|---|
sense_regions |
| Fields inherited from class spv.graphics.GraphicsCanvasDecorator |
|---|
decorated_canvas, decorator, ignore_cursor, printing |
| 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.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AxisCanvas(GraphicsCanvas graphic_canvas)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
activate(int index)
This method is called whenever the mouse is clicked on one of the axis titles. |
protected void |
activate(int region,
boolean showTextFields)
|
void |
draw(java.awt.Graphics g)
Performs the drawing operations. |
private void |
drawAxis(java.awt.Graphics g)
Draws the four axis. |
void |
plot()
Re-computes everything necessary to plot in the current viewports and calls plot() in the superclass. |
private java.awt.Graphics2D |
resetClipRegion(java.awt.Graphics g)
Reset the clip region to current viewport. |
void |
setAnnotations(java.util.Map list)
Sets annotation objects witb the axis labels |
private void |
setTitleRegions()
Set sensitive regions for the axis titles. |
void |
setTitles(java.lang.String xtitle,
java.lang.String ytitle)
Sets the axis titles. |
| Methods inherited from class spv.graphics.AbstractSensitiveCanvas |
|---|
setSensitiveRegions, unsetSensitiveRegions |
| 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, 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 |
|---|
private Viewport dev
private Axis top_axis
private Axis bottom_axis
private Axis left_axis
private Axis right_axis
private boolean is_ready_to_draw
private Annotation[] annotations
private java.awt.Graphics2D boundedGraphics
public static final java.lang.String LEFT_AXIS_KEY
public static final java.lang.String BOTTOM_AXIS_KEY
| Constructor Detail |
|---|
public AxisCanvas(GraphicsCanvas graphic_canvas)
graphic_canvas - the GraphicsCanvas object to be
decorated with a frame| Method Detail |
|---|
public void setTitles(java.lang.String xtitle,
java.lang.String ytitle)
setTitles in interface GraphicsCanvassetTitles in class GraphicsCanvasDecoratorxtitle - the X axis titleytitle - the Y axis titlepublic void draw(java.awt.Graphics g)
draw in interface PlottableGraphicsdraw in class AbstractSensitiveCanvasg - the Graphics context where to drawprivate void drawAxis(java.awt.Graphics g)
This method basically defers the required operations to the
underlying Axis objects in this.
g - the graphics contextprivate java.awt.Graphics2D resetClipRegion(java.awt.Graphics g)
g - the graphics context
private void setTitleRegions()
public void plot()
plot() in the superclass.
This method basically defers the required operations to the
underlying Axis objects in this.
plot in interface GraphicsCanvasplot in interface PlottableGraphicsplot in class GraphicsCanvasDecoratorprotected void activate(int index)
activate in class AbstractSensitiveCanvasindex - the region to be activated
protected void activate(int region,
boolean showTextFields)
activate in class AbstractSensitiveCanvaspublic void setAnnotations(java.util.Map list)
setAnnotations in interface GraphicsCanvassetAnnotations in class GraphicsCanvasDecoratorlist - the list of annotation objects
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||