|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--show.ComplexDisplay | +--show.GridDisplay
shows the values of a complex function (handed over in a Complex[][] array) by transforming a grid
Inner Class Summary | |
class |
GridDisplay.GridCanvas
this inner class represents the canvas on which everything is drawn. |
class |
GridDisplay.MouseCoordinateReader
an inner class to read out mouse coordinates and calculate the corresponding values |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.awt.Canvas |
canvas
initialize canvas as GridCanvas in getCanvas(), when called the first time |
protected double |
cellHeight
the height of a single cell in (logical) pixels |
protected double |
cellWidth
the width of a single cell in (logical) pixels |
protected Complex[][] |
complexValues
needed here for output only |
protected double |
imagDif
imagRange[1] - imagRange[0], needed for transformation |
protected double[] |
imagRange
the range in imaginary direction, needs to be stored for transformation |
protected GridDisplay.MouseCoordinateReader |
mouseCoordinateReader
store the mouselistener used by this class, so that the subclass can remove it by reference |
protected double |
realDif
realRange[1] - realRange[0], needed for transformation |
protected double[] |
realRange
the range in real direction, needs to be stored for transformation |
protected java.awt.Label |
showCoords1
a label showing the function value of the coordinate of the mouse |
protected java.awt.Label |
showCoords2
a label showing the coordinates of the mouse in complex numbers |
protected java.awt.geom.AffineTransform |
transform
the affine transformation applied to the Complex-Data for projecting it on the screen, its inverse is used by the MouseCoordinateReader to calculate the Complex coordinates from physical screen-coordinates |
protected double |
viewImagDif
the imaginary diff in the view |
protected double[] |
viewImagRange
the range in view, initialized to imagRange |
protected double |
viewRealDif
the real diff in the view |
protected double[] |
viewRealRange
the range in view, initialized to imagRange |
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 | |
GridDisplay()
|
Method Summary | |
void |
determineCellSize()
sets the cellwidth and -height, determined by realDif and imagDif |
void |
determineTransform(int width,
int height)
sets the affine transformation, determined by window-size and function range |
Complex |
getOriginValue(Complex o)
returns for a given function value f the approximate origin value (i.e. the value in the grid whose function value best matches f) |
void |
setRange(double[] realRange,
double[] imagRange)
sets the ranges for both real and imaginary direction |
void |
setValues(Complex[][] inValues)
sets the calculated values, that need to be displayed |
Complex |
transformXY(int x,
int y)
returns a Complex number with points which have been transformed from integer-physical graphics coordinates to double logical space coordinates using the inverse Transformation of the one used in paint() |
Methods inherited from class show.ComplexDisplay |
setCalculator |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Complex[][] complexValues
protected double[] realRange
protected double[] imagRange
protected double[] viewRealRange
protected double[] viewImagRange
protected double realDif
protected double imagDif
protected double viewRealDif
protected double viewImagDif
protected java.awt.Label showCoords1
protected java.awt.Label showCoords2
protected java.awt.Canvas canvas
protected java.awt.geom.AffineTransform transform
protected GridDisplay.MouseCoordinateReader mouseCoordinateReader
protected double cellWidth
protected double cellHeight
Constructor Detail |
public GridDisplay()
Method Detail |
public void determineCellSize()
public void determineTransform(int width, int height)
public Complex transformXY(int x, int y)
public Complex getOriginValue(Complex o)
public void setRange(double[] realRange, double[] imagRange)
setRange
in class ComplexDisplay
public void setValues(Complex[][] inValues)
ComplexDisplay
setValues
in class ComplexDisplay
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |