dioscuri.module.screen
Class Screen

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModuleScreen
          extended by dioscuri.module.screen.Screen
All Implemented Interfaces:
Module

public class Screen
extends ModuleScreen

An implementation of a hardware visual screen module.

See Also:

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
protected static int BLUE
           
protected  java.awt.image.ColorModel colourModel
           
protected  java.awt.image.DataBuffer dataBuffer
           
protected  java.awt.image.BufferedImage[] fontImages
           
protected  java.awt.image.BufferedImage graphicTile
           
protected static int GREEN
           
protected  java.awt.image.BufferedImage image
           
protected  int imageType
           
protected  byte[][] palette
           
protected  byte[] pixels
           
protected  java.awt.image.WritableRaster raster
           
protected static int RED
           
protected  java.awt.image.SampleModel sampleModel
           
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
Screen(Emulator owner)
          Class constructor
 
Method Summary
 void clearScreen()
          Clear screen from any output
 java.lang.String getDump()
          Return a dump of module status
 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
 boolean reset()
          Reset all parameters of module.
 void setByteInCodePage(int index, byte data)
          Set a byte in Code page The code page is the character encoding table
 boolean setPaletteColour(byte index, int red, int green, int blue)
          Set a particular colour in palette with RGB-values
 void setScreenSize(int width, int height)
          Set the screen size in number of pixels
 void updateCodePage(int start)
          Update the code page The code page is the character encoding table
 void updateGraphicsTile(byte[] tile, int x0, int y0)
          Update a tile on screen with given bytes Graphics mode.
 void updateScreenSize(int newWidth, int newHeight, int newFontWidth, int newFontHeight)
          Update screen size
 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 dioscuri.module.AbstractModule
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pixels

protected byte[] pixels

dataBuffer

protected java.awt.image.DataBuffer dataBuffer

sampleModel

protected java.awt.image.SampleModel sampleModel

raster

protected java.awt.image.WritableRaster raster

palette

protected byte[][] palette

colourModel

protected java.awt.image.ColorModel colourModel

image

protected java.awt.image.BufferedImage image

imageType

protected int imageType

fontImages

protected java.awt.image.BufferedImage[] fontImages

graphicTile

protected java.awt.image.BufferedImage graphicTile

RED

protected static final int RED
See Also:
Constant Field Values

GREEN

protected static final int GREEN
See Also:
Constant Field Values

BLUE

protected static final int BLUE
See Also:
Constant Field Values
Constructor Detail

Screen

public Screen(Emulator owner)
Class constructor

Parameters:
owner -
Method Detail

reset

public boolean reset()
Reset all parameters of module.

Specified by:
reset in interface Module
Specified by:
reset in class AbstractModule
Returns:
true iff the AbstractModule was reset properly.
See Also:
AbstractModule

getDump

public java.lang.String getDump()
Return a dump of module status

Provides a dummy implementation since many of the subclasses of this abstract module class do not need or use a getDump() implementation. The ones that do, can override this method.

Specified by:
getDump in interface Module
Overrides:
getDump in class AbstractModule
Returns:
string containing a dump of this module
See Also:
AbstractModule

getScreen

public javax.swing.JPanel getScreen()
Return a reference to the actual screen

Specified by:
getScreen in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

getScreenRows

public int getScreenRows()
Return the number of rows on screen (text based)

Specified by:
getScreenRows in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

getScreenColumns

public int getScreenColumns()
Return the number of columns on screen (text based)

Specified by:
getScreenColumns in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

getScreenWidth

public int getScreenWidth()
Return width of screen in number of pixels

Specified by:
getScreenWidth in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

getScreenHeight

public int getScreenHeight()
Return height of screen in number of pixels

Specified by:
getScreenHeight in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

setScreenSize

public void setScreenSize(int width,
                          int height)
Set the screen size in number of pixels

Specified by:
setScreenSize in class ModuleScreen
See Also:
ModuleScreen

updateScreenSize

public void updateScreenSize(int newWidth,
                             int newHeight,
                             int newFontWidth,
                             int newFontHeight)
Update screen size

Specified by:
updateScreenSize in class ModuleScreen
See Also:
ModuleScreen

clearScreen

public void clearScreen()
Clear screen from any output

Specified by:
clearScreen in class ModuleScreen
See Also:
ModuleScreen

setPaletteColour

public boolean setPaletteColour(byte index,
                                int red,
                                int green,
                                int blue)
Set a particular colour in palette with RGB-values

Specified by:
setPaletteColour in class ModuleScreen
Returns:
-
See Also:
ModuleScreen

setByteInCodePage

public void setByteInCodePage(int index,
                              byte data)
Set a byte in Code page The code page is the character encoding table

Specified by:
setByteInCodePage in class ModuleScreen
See Also:
ModuleScreen

updateCodePage

public void updateCodePage(int start)
Update the code page The code page is the character encoding table

Specified by:
updateCodePage in class ModuleScreen
See Also:
ModuleScreen

updateText

public void updateText(int oldText,
                       int newText,
                       long cursorXPos,
                       long cursorYPos,
                       short[] textModeAttribs,
                       int numberRows)
Update text on screen at given position Text mode. Selected text will replace existing text at given position

Specified by:
updateText in class ModuleScreen
See Also:
ModuleScreen

updateGraphicsTile

public void updateGraphicsTile(byte[] tile,
                               int x0,
                               int y0)
Update a tile on screen with given bytes Graphics mode. A tile is a part of the screenbuffer

Specified by:
updateGraphicsTile in class ModuleScreen
See Also:
ModuleScreen