|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.kbna.dioscuri.module.Module
nl.kbna.dioscuri.module.ModuleScreen
nl.kbna.dioscuri.module.screen.Screen
public class Screen
An implementation of a hardware visual screen module.
Metadata module
********************************************
general.type : screen
general.name : Compatible CRT/LCD computer screen
general.architecture : Von Neumann
general.description : General implementation of a monitor.
general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands
general.version : 1.0
general.keywords : screen, monitor, CRT, TFT, LCD
general.relations : video
general.yearOfIntroduction :
general.yearOfEnding :
general.ancestor :
general.successor :
screen.resolutionRange : unlimited
screen.colorDepth : 256| Field Summary | |
|---|---|
protected static int |
BLUE
|
(package private) byte[] |
codePage
|
(package private) boolean |
codePageReqsUpdate
|
(package private) boolean[] |
codePageUpdateIndex
|
protected java.awt.image.ColorModel |
colourModel
|
private int |
cursorPosPrevX
|
private int |
cursorPosPrevY
|
protected java.awt.image.DataBuffer |
dataBuffer
|
private boolean |
debugMode
|
private Emulator |
emu
|
private int |
fontHeight
|
protected java.awt.image.BufferedImage[] |
fontImages
|
private int |
fontWidth
|
protected java.awt.image.BufferedImage |
graphicTile
|
protected static int |
GREEN
|
private byte |
horizPanning
|
protected java.awt.image.BufferedImage |
image
|
protected int |
imageType
|
private boolean |
isObserved
|
private short |
lineCompare
|
private static java.util.logging.Logger |
logger
|
private static int |
MODULE_ID
|
private static java.lang.String |
MODULE_NAME
|
private static java.lang.String |
MODULE_TYPE
|
private java.lang.String[] |
moduleConnections
|
protected byte[][] |
palette
|
protected byte[] |
pixels
|
protected java.awt.image.WritableRaster |
raster
|
protected static int |
RED
|
protected java.awt.image.SampleModel |
sampleModel
|
private int |
screenHeight
|
private ScreenPanel |
screenPanel
|
private int |
screenWidth
|
private int |
textColumns
|
private int |
textRows
|
private byte |
vertPanning
|
protected ModuleVideo |
video
|
private int |
xTileSize
|
private int |
yTileSize
|
| Constructor Summary | |
|---|---|
Screen(Emulator owner)
Class constructor |
|
| Method Summary | |
|---|---|
void |
clearScreen()
Set the screen image to black |
private void |
createCodePage437Images()
Create character images from code page 437 hex values |
java.lang.String[] |
getConnection()
Returns a String[] with all names of modules it needs to be connected to |
byte[] |
getData(Module requester)
Returns data from this module |
boolean |
getDebugMode()
Returns the status of the debug mode toggle |
java.lang.String |
getDump()
Returns a dump of this module |
int |
getID()
Returns the ID of the module |
java.lang.String |
getName()
Returns the name of the module |
javax.swing.JPanel |
getScreen()
Return a reference to the actual screen |
int |
getScreenColumns()
Return the number of columns on screen (text based) |
int |
getScreenHeight()
Return height of screen in number of pixels |
int |
getScreenRows()
Return the number of rows on screen (text based) |
int |
getScreenWidth()
Return width of screen in number of pixels |
java.lang.String |
getType()
Returns the type of the module |
boolean |
isConnected()
Checks if this module is connected to operate normally |
boolean |
isObserved()
Returns the status of observed toggle |
boolean |
reset()
Reset all parameters of module |
void |
setByteInCodePage(int index,
byte data)
Update a byte in the codePage |
boolean |
setConnection(Module mod)
Sets up a connection with another module |
boolean |
setData(byte[] data,
Module sender)
Set data for this module |
boolean |
setData(java.lang.String[] data,
Module sender)
Sets given String[] data for this module |
void |
setDebugMode(boolean status)
Sets the debug mode toggle |
private void |
setImage(int width,
int height)
Set an image with data on screen |
void |
setObserved(boolean status)
Sets the observed toggle |
boolean |
setPaletteColour(byte index,
int red,
int green,
int blue)
Set a colour in the private colourmap to a particular RGB value |
void |
setScreenSize(int width,
int height)
Set the screen size in number of pixels |
void |
start()
Starts the module |
void |
stop()
Stops the module |
void |
updateCodePage(int start)
Update the complete character set |
private void |
updateFontImage(int index,
int[] fontData,
int fontWidth,
int fontHeight)
Replace a BufferedImage in the font table with new data |
void |
updateGraphicsTile(byte[] tile,
int x0,
int y0)
Update a tile on screen with given bytes A tile is a part of the screenbuffer |
private void |
updateImage()
Refresh the on-screen image |
private void |
updatePalette()
Update the colourModel used in the image. |
void |
updateScreenSize(int newWidth,
int newHeight,
int newFontWidth,
int newFontHeight)
Update the screen size (if necesarry) |
void |
updateText(int oldText,
int newText,
long cursorXPos,
long cursorYPos,
short[] textModeAttribs,
int numberRows)
Update text on screen at given position Text mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Emulator emu
private java.lang.String[] moduleConnections
private ScreenPanel screenPanel
protected ModuleVideo video
private boolean isObserved
private boolean debugMode
protected byte[] pixels
protected java.awt.image.DataBuffer dataBuffer
protected java.awt.image.SampleModel sampleModel
protected java.awt.image.WritableRaster raster
protected byte[][] palette
protected java.awt.image.ColorModel colourModel
protected java.awt.image.BufferedImage image
protected int imageType
protected java.awt.image.BufferedImage[] fontImages
protected java.awt.image.BufferedImage graphicTile
byte[] codePage
boolean codePageReqsUpdate
boolean[] codePageUpdateIndex
private int textRows
private int textColumns
private int fontWidth
private int fontHeight
private int screenWidth
private int screenHeight
private byte horizPanning
private byte vertPanning
private short lineCompare
private int cursorPosPrevX
private int cursorPosPrevY
private int xTileSize
private int yTileSize
private static java.util.logging.Logger logger
private static final int MODULE_ID
private static final java.lang.String MODULE_TYPE
private static final java.lang.String MODULE_NAME
protected static final int RED
protected static final int GREEN
protected static final int BLUE
| Constructor Detail |
|---|
public Screen(Emulator owner)
| Method Detail |
|---|
public int getID()
getID in class ModuleModulepublic java.lang.String getType()
getType in class ModuleModulepublic java.lang.String getName()
getName in class ModuleModulepublic java.lang.String[] getConnection()
getConnection in class Modulepublic boolean setConnection(Module mod)
setConnection in class Modulemod - Module that is to be connected to this class
Modulepublic boolean isConnected()
isConnected in class Modulepublic boolean reset()
reset in class Modulepublic void start()
start in class ModuleModulepublic void stop()
stop in class ModuleModulepublic boolean isObserved()
isObserved in class ModuleModulepublic void setObserved(boolean status)
setObserved in class Modulestatus - Modulepublic boolean getDebugMode()
getDebugMode in class ModuleModulepublic void setDebugMode(boolean status)
setDebugMode in class Modulestatus - Modulepublic byte[] getData(Module requester)
getData in class ModuleModule - requester, the requester of the data
Module
public boolean setData(byte[] data,
Module sender)
setData in class Modulebyte[] - containing dataModule - sender, the sender of the data
Module
public boolean setData(java.lang.String[] data,
Module sender)
setData in class ModuleString[] - dataModule - sender, the sender of the data
Modulepublic java.lang.String getDump()
getDump in class ModuleModulepublic javax.swing.JPanel getScreen()
ModuleScreen
getScreen in class ModuleScreenpublic int getScreenRows()
getScreenRows in class ModuleScreenpublic int getScreenColumns()
getScreenColumns in class ModuleScreenpublic int getScreenWidth()
getScreenWidth in class ModuleScreenpublic int getScreenHeight()
getScreenHeight in class ModuleScreen
public void setScreenSize(int width,
int height)
setScreenSize in class ModuleScreenint - width New width of the screen in pixelsint - height New height of the screen in pixels
public void updateScreenSize(int newWidth,
int newHeight,
int newFontWidth,
int newFontHeight)
updateScreenSize in class ModuleScreennewWidth - New screen width in pixelsnewHeight - New screen height in pixelsnewFontHeight - New font height in pixelsnewFontWidth - New font width in pixelspublic void clearScreen()
clearScreen in class ModuleScreen
public boolean setPaletteColour(byte index,
int red,
int green,
int blue)
setPaletteColour in class ModuleScreenindex - Index into the palettered - New value of redgreen - New value of greenblue - New value of blue
public void setByteInCodePage(int index,
byte data)
setByteInCodePage in class ModuleScreenindex - location of byte in codePage arraydata - value of new bytepublic void updateCodePage(int start)
updateCodePage in class ModuleScreenstart -
public void updateText(int oldText,
int newText,
long cursorXPos,
long cursorYPos,
short[] textModeAttribs,
int numberRows)
ModuleScreen
updateText in class ModuleScreen
public void updateGraphicsTile(byte[] tile,
int x0,
int y0)
updateGraphicsTile in class ModuleScreenbyte[] - tile containing the bytes of the tile to be updatedint - x0 the start position Xint - y0 the start position Y
private void setImage(int width,
int height)
width - Width of the image in pixelsheight - Height of the image in pixelsprivate void updateImage()
private void updatePalette()
private void createCodePage437Images()
private void updateFontImage(int index,
int[] fontData,
int fontWidth,
int fontHeight)
index - Index of the new character into the font tablefontData - Array of hex values representing the characterfontWidth - Width of the character in pixelsfontHeight - Height of the character in pixels
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||