jmce - 1_02

jmce.sinclair.spectrum
Class Screen

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.sinclair.spectrum.Screen
All Implemented Interfaces:
Hardware, Peripheral, SwingHardware, SpectrumConstants

public class Screen
extends AbstractPeripheral
implements SwingHardware, SpectrumConstants

Spectrum screen.

This device implements the Screen and the keyboard for the spectrum and can optionally show the Spectrum keyboard if the property keyboardVisible is true.

Version:
1.01
Author:
Mario Viara
See Also:
setKeyboardVisible(boolean)

Field Summary
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Fields inherited from interface jmce.sinclair.spectrum.SpectrumConstants
ATTRIBUTE_BRIGHT, ATTRIBUTE_FLASH, MMU_DISABLE, MMU_PORT, MMU_ROM, MMU_VIDEO, ROM_MEMORY_END, SCREEN_ATTRIBUTE_END, SCREEN_ATTRIBUTE_SIZE, SCREEN_ATTRIBUTE_START, SCREEN_MEMORY_END, SCREEN_MEMORY_SIZE, SCREEN_MEMORY_START, ULA_BORDER, ULA_IN, ULA_KBD, ULA_MIC, ULA_OUT, ULA_PORT
 
Constructor Summary
Screen()
          Default constructor
Screen(int scale)
          Constructor with specified scale
 
Method Summary
 java.awt.Component getComponent()
           
 boolean getKeyboardVisible()
           
 int getScale()
           
 void init(Hardware parent)
          Initialize the hardware.
 void registerCPU(CPU cpu)
          Register a parent CPU for future reference.
 void setBorder(int border)
          Set the color of screen border
 void setKeyboardVisible(boolean b)
           
 void setMemory(Memory m)
           
 void setScale(int scale)
           
 
Methods inherited from class jmce.sim.AbstractPeripheral
idle, setIdle, setLive
 
Methods inherited from class jmce.sim.AbstractHardware
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 

Constructor Detail

Screen

public Screen()
Default constructor


Screen

public Screen(int scale)
Constructor with specified scale

Method Detail

getKeyboardVisible

public boolean getKeyboardVisible()

setKeyboardVisible

public void setKeyboardVisible(boolean b)

getScale

public int getScale()

setBorder

public void setBorder(int border)
Set the color of screen border

Since:
1.02

setScale

public void setScale(int scale)

getComponent

public java.awt.Component getComponent()
Specified by:
getComponent in interface SwingHardware

setMemory

public void setMemory(Memory m)

registerCPU

public void registerCPU(CPU cpu)
                 throws SIMException
Description copied from interface: Peripheral
Register a parent CPU for future reference.

Specified by:
registerCPU in interface Peripheral
Overrides:
registerCPU in class AbstractPeripheral
Throws:
SIMException

init

public void init(Hardware parent)
          throws SIMException
Description copied from interface: Hardware
Initialize the hardware. This method must be called before any use of the interface. Only set ... / get ... method are allowed to be called before the intialization.

Specified by:
init in interface Hardware
Overrides:
init in class AbstractHardware
Parameters:
parent - Parent of this hardware.
Throws:
SIMException

jmce - 1_02