legacy
Class Configuration

java.lang.Object
  extended by legacy.Configuration
All Implemented Interfaces:
PalletFactory

public abstract class Configuration
extends java.lang.Object
implements PalletFactory

Configuration.class Allows the user define the enviroment it wishes to run in.

Author:
Benjamin Tarrant

Constructor Summary
Configuration()
           
 
Method Summary
abstract  void createPallet(RGB[] pal)
          createPallet to allow user to define a pallet.
abstract  int getFrameRate()
          getFrameRate() return the disird framerate or frames per second to lock.
Recommend viewing description in VideoAdapter.class.
abstract  VideoAdapter getVideoAdaptor()
          getVideoAdaptor() should return the required video adaptor.
abstract  java.lang.Object getVideoMemoryModel()
          This must be set to allow the proceeding createPallet(RGB[] pal) method to be correctly called and applied to the active VideaAdapter
example
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Method Detail

getVideoAdaptor

public abstract VideoAdapter getVideoAdaptor()
getVideoAdaptor() should return the required video adaptor.

Returns:
desired video adaptor

getFrameRate

public abstract int getFrameRate()
getFrameRate() return the disird framerate or frames per second to lock.
Recommend viewing description in VideoAdapter.class.

Returns:
desired frame rate
See Also:
VideoAdapter

getVideoMemoryModel

public abstract java.lang.Object getVideoMemoryModel()
This must be set to allow the proceeding createPallet(RGB[] pal) method to be correctly called and applied to the active VideaAdapter
example
                   
 public Object getVideoMemoryModel(){
      return adaptor.MemoryModelPalletized1Bit;
 }
 

Returns:
the memory model defined in VideoAdapter

createPallet

public abstract void createPallet(RGB[] pal)
createPallet to allow user to define a pallet. This pallet will be defined by size and checked by the Video Adapter befor initialization of the Graphics object.
Correct usage
 public void createPallet(RGB[] pal){
    Pallets.GREYSCALE_256C.createPallet(pal);
    pal[1] = Colors.MONEY_GREEN; 
 }
 

Incorrect usage
 public void createPallet(RGB[] pal){
    pal = new RGB[256];   //Illegal cannot change object!!!
    Pallets.GREYSCALE_256C.createPallet(pal);
    pal[1] = Colors.MONEY_GREEN; 
 }
 

Specified by:
createPallet in interface PalletFactory
Parameters:
pal - array pre determinied to be defined.