|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
org.razvan.jzx.BaseScreen
org.razvan.jzx.ScreenBoth
public class ScreenBoth
Screen implementation that runs in both JDK1.1 and JDK1.2 VMs, but is optimized for neither.
This implementation uses a MemoryImageSource, and calls the method newPixels() to indicate that new data is available for drawing into the image.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class org.razvan.jzx.BaseScreen |
|---|
ATTR_LENGTH, ATTR_START, BLACK, BLUE, BORDER_PIXELS, BRIGHT, BRIGHT_BLACK, BRIGHT_BLUE, BRIGHT_CYAN, BRIGHT_GREEN, BRIGHT_MAGENTA, BRIGHT_RED, BRIGHT_WHITE, BRIGHT_YELLOW, COLS, CYAN, FLASH, GREEN, INK, m_borderColor, m_borderDirty, m_flashPhase, m_inkTable, m_logger, m_offscreenBorder, m_offscreenBorderGraphics, m_offscreenImage, m_offscreenImageGraphics, m_paperTable, m_scale, m_screenChanged, m_screenDirty, m_screenHeight, m_screenWidth, m_spectrum, MAGENTA, PAPER, PIXEL_LENGTH, PIXEL_START, RED, ROWS, s_colorPalette, s_rgbPalette, WHITE, X_PIXELS, Y_PIXELS, YELLOW |
| 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 | |
|---|---|
ScreenBoth()
|
|
| Method Summary | |
|---|---|
protected void |
draw8(int x,
int y,
int pix8,
int attr8)
Draw a given byte into the RGB array using the given attribute, at the given location. |
protected void |
endRender()
Call newPixels() on the MemoryImageSource object at the end of a frame. |
void |
init(BaseSpectrum spectrum,
ILogger logger)
Allocate the RGB data array and the MemoryImageSource object that Decorates the data. |
void |
paint(java.awt.Graphics g)
Create the MemoryImageSource object from the given Graphics object. |
protected void |
setScale(int scale)
Update the RGB data array and the MemoryImageSource for the new scale value. |
| Methods inherited from class org.razvan.jzx.BaseScreen |
|---|
attrTouch, clear, clear, createCompatibleImage, dumpScreenshot, flash, getCursorX, getCursorY, getInstance, getMinimumSize, getPage, getPreferredSize, load, print, print, println, println, reset, screenTouch, setBorderColor, setCursor, setPage, startRender, terminate, update |
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenBoth()
| Method Detail |
|---|
public void init(BaseSpectrum spectrum,
ILogger logger)
init in class BaseScreenprotected void setScale(int scale)
setScale in class BaseScreenpublic void paint(java.awt.Graphics g)
paint in class BaseScreenBaseScreen.draw8(int, int, int, int)
protected void draw8(int x,
int y,
int pix8,
int attr8)
draw8 in class BaseScreenx - The X coordinate where the pixels should
be drawn onto the Canvas object.y - The Y coordinat where the pixels should
be drawn onto the Canvas object.pix8 - The 8 bits to draw starting at (X,Y)
ending at (X+8,Y).attr8 - The attributes used to draw the 8
bits.protected void endRender()
endRender in class BaseScreen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||