utils.ptplot5_2.ptolemy.plot
Class Render

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--utils.ptplot5_2.ptolemy.plot.PlotBox
                                |
                                +--utils.ptplot5_2.ptolemy.plot.Render
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable

public class Render
extends PlotBox

Since:
Ptolemy II 2.0
Version:
$Id: Render.html,v 1.1.1.1 2003/07/10 12:20:41 dsagnol Exp $
Author:
Neil Turner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class utils.ptplot5_2.ptolemy.plot.PlotBox
PlotBox.DragListener, PlotBox.ZoomListener
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class utils.ptplot5_2.ptolemy.plot.PlotBox
_documentBase, PTPLOT_RELEASE
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
Render()
          Construct an instance.
 
Method Summary
 void addStripe(int[] colors)
          Add a vertical stripe.
 void clearData()
          Clear the render object of any image data.
 int[][] getColormap()
          Get the current colormap.
 double getXIncrement()
          Get the x increment.
 double getXOffset()
          Get the x offset.
 double getYIncrement()
          Get the y increment.
 double getYOffset()
          Get the y offset.
 void samplePlot()
          Create a sample image.
 void setColormap(int[][] colormap)
          Set the colormap.
 void setXIncrement(double xIncrement)
          Set the x increment.
 void setXOffset(double xOffset)
          Set the x offset.
 void setYIncrement(double yIncrement)
          Set the y increment.
 void setYOffset(double yOffset)
          Set the y offset.
 
Methods inherited from class utils.ptplot5_2.ptolemy.plot.PlotBox
addLegend, addXTick, addYTick, clear, clearLegends, deferIfNecessary, export, exportImage, exportImage, exportImage, exportImage, fillPlot, getColor, getColorByName, getDataurl, getDocumentBase, getGrid, getLegend, getMaximumSize, getMinimumSize, getPreferredSize, getTitle, getXLabel, getXLog, getXRange, getXTicks, getYLabel, getYLog, getYRange, getYTicks, init, paintComponent, parseFile, parseFile, print, read, read, removeLegend, resetAxes, setBackground, setBounds, setButtons, setColor, setDataurl, setDocumentBase, setForeground, setGrid, setLabelFont, setSize, setTitle, setTitleFont, setWrap, setXLabel, setXLog, setXRange, setYLabel, setYLog, setYRange, write, write, write, writeData, writeFormat, writeOldSyntax, zoom
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Render

public Render()
Construct an instance. The initial colormap used to render images is 256 grayscale.

Method Detail

addStripe

public void addStripe(int[] colors)
Add a vertical stripe.

Parameters:
colors - The colors of the pixels in the vertical stripe.

clearData

public void clearData()
Clear the render object of any image data.


getColormap

public int[][] getColormap()
Get the current colormap.


getXIncrement

public double getXIncrement()
Get the x increment.


getXOffset

public double getXOffset()
Get the x offset.


getYIncrement

public double getYIncrement()
Get the y increment.


getYOffset

public double getYOffset()
Get the y offset.


samplePlot

public void samplePlot()
Create a sample image.

Overrides:
samplePlot in class PlotBox

setColormap

public void setColormap(int[][] colormap)
Set the colormap. The user needs to give a 3-by-256 integer array as a colormap.

Parameters:
colormap - The colormap used to render images.

setXIncrement

public void setXIncrement(double xIncrement)
Set the x increment.

Parameters:
xIncrement - The increment in units of the x-axis of each stripe.

setXOffset

public void setXOffset(double xOffset)
Set the x offset.

Parameters:
xOffset - The starting value of the x-axis.

setYIncrement

public void setYIncrement(double yIncrement)
Set the y increment.

Parameters:
yIncrement - The increment in units of the y-axis of each patch within each stripe.

setYOffset

public void setYOffset(double yOffset)
Set the y offset.

Parameters:
yOffset - The starting value of the y-axis.