|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--org.omegahat.Graphics.Devices.GuiOutputDevice
Graphics device that displays its contents using a Java AWT component.
A device object from this class has both a graphical object (the contents of the display) and a Java Graphics2d object to do the actual plotting. The class extends Canvas to give access to the range of interaction and control provided by Java's AWT and Swing packages.
| Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected java.awt.Graphics2D |
gc
The graphics context or pen for drawing on the device. |
protected GraphicalComponentInt |
go
The top of the hierarchy or tree. |
| 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 | |
GuiOutputDevice()
|
|
| Method Summary | |
void |
addGraphicalObject(GraphicalComponentInt go)
|
void |
drawIcon(javax.swing.Icon icon,
double x,
double y,
double width,
double height)
|
void |
drawLines(double[] x,
double[] y)
|
void |
drawOval(double x,
double y,
double width,
double height)
|
void |
drawPolygon(double[] x,
double[] y)
|
void |
drawPolyline(double[] x,
double[] y)
|
void |
drawRectangle(double x,
double y,
double width,
double height)
|
void |
drawText(java.lang.String s,
double x,
double y,
double rx,
double ry,
int fontSize,
double angle)
|
void |
fillOval(double x,
double y,
double width,
double height)
|
void |
fillRectangle(double x,
double y,
double width,
double height)
|
java.awt.Graphics2D |
gc()
|
java.awt.Graphics2D |
gc(java.awt.Graphics2D g)
|
GraphicalComponentInt |
go()
|
GraphicalComponentInt |
go(GraphicalComponentInt g)
|
void |
paint(java.awt.Graphics g)
|
SimpleGraphicalContainerInt |
parent()
Get the parent of this container. |
SimpleGraphicalContainerInt |
parent(SimpleGraphicalContainerInt p)
Set the parent of this container. |
boolean |
popParameters(GraphicsParameters p)
|
GraphicsParameters |
pushParameters(GraphicsParameters p)
|
boolean |
setParameters(AWTParameters p,
AWTParameters diff)
|
boolean |
setParameters(GraphicsParameters p,
GraphicsParameters diff)
|
double |
stringHeight(java.lang.String s)
|
double |
stringWidth(java.lang.String s)
|
void |
updateGraphics()
|
| Methods inherited from class java.awt.Canvas |
addNotify, getAccessibleContext |
| 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, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.omegahat.Graphics.Devices.OutputDevice |
repaint |
| Field Detail |
protected java.awt.Graphics2D gc
protected GraphicalComponentInt go
| Constructor Detail |
public GuiOutputDevice()
| Method Detail |
public void drawLines(double[] x,
double[] y)
drawLines in interface OutputDevice
public void drawPolyline(double[] x,
double[] y)
drawPolyline in interface OutputDevice
public void drawPolygon(double[] x,
double[] y)
drawPolygon in interface OutputDevice
public void drawIcon(javax.swing.Icon icon,
double x,
double y,
double width,
double height)
drawIcon in interface OutputDevice
public void drawOval(double x,
double y,
double width,
double height)
drawOval in interface OutputDevice
public void fillOval(double x,
double y,
double width,
double height)
fillOval in interface OutputDevice
public void drawRectangle(double x,
double y,
double width,
double height)
drawRectangle in interface OutputDevice
public void fillRectangle(double x,
double y,
double width,
double height)
fillRectangle in interface OutputDevice
public void drawText(java.lang.String s,
double x,
double y,
double rx,
double ry,
int fontSize,
double angle)
drawText in interface OutputDevicepublic double stringWidth(java.lang.String s)
stringWidth in interface OutputDevicepublic double stringHeight(java.lang.String s)
stringHeight in interface OutputDevicepublic void paint(java.awt.Graphics g)
paint in class java.awt.Canvaspublic void addGraphicalObject(GraphicalComponentInt go)
addGraphicalObject in interface OutputDevice
public boolean setParameters(GraphicsParameters p,
GraphicsParameters diff)
setParameters in interface OutputDevicepublic GraphicsParameters pushParameters(GraphicsParameters p)
pushParameters in interface OutputDevicepublic boolean popParameters(GraphicsParameters p)
popParameters in interface OutputDevice
public boolean setParameters(AWTParameters p,
AWTParameters diff)
public java.awt.Graphics2D gc()
public java.awt.Graphics2D gc(java.awt.Graphics2D g)
public GraphicalComponentInt go()
public GraphicalComponentInt go(GraphicalComponentInt g)
public void updateGraphics()
public SimpleGraphicalContainerInt parent()
SimpleGraphicalContainerIntparent in interface SimpleGraphicalContainerIntpublic SimpleGraphicalContainerInt parent(SimpleGraphicalContainerInt p)
SimpleGraphicalContainerIntparent in interface SimpleGraphicalContainerInt
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||