com.monkeycoder.monkeynes.gui
Class PaletteViewerGui

java.lang.Object
  |
  +--com.monkeycoder.monkeynes.gui.PaletteViewerGui
All Implemented Interfaces:
Observer

public class PaletteViewerGui
extends Object
implements Observer

This is the GUI dialog that shows graphically the contents of the palettes.

Originally part of the MonkeyNES project.

Author:
David Stephens

Constructor Summary
PaletteViewerGui(Frame inParentFrame, NesVideoMemory inVidMemory, NesPalette inPalette)
          Creates and configures a new PaletteViewerGui.
 
Method Summary
 void show()
          Displays the PaletteViewerGui.
 void update(Observable o, Object arg)
          Accepts messages from video memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteViewerGui

public PaletteViewerGui(Frame inParentFrame,
                        NesVideoMemory inVidMemory,
                        NesPalette inPalette)
Creates and configures a new PaletteViewerGui. Note that the window is constructed but not displayed.

Parameters:
inParentFrame - The parent of this dialog.
inVidMemory - The VideoMemory from which the palette information will be loaded.
Method Detail

update

public void update(Observable o,
                   Object arg)
Accepts messages from video memory. If the specific area of video memory that contains the pattern tables changes a redraw of this control will be triggered.

Specified by:
update in interface Observer
Parameters:
o - The observable object sending the message.
arg - The message being sent.

show

public void show()
Displays the PaletteViewerGui.