Class ScreenEditor


public class ScreenEditor

This class is designed to let humans easily interact with and build
screens once the class for that screen has been written. It needs to
have the ability to load in a screen. I could save the screens as a
vector, but using Locations for the links, when I wrote one screen it
should connect to the others. This could be a weak point of the system
that I'm looking at using. It makes some things better for the programmer,
but it might be a bit harder for the screen design. What I will probably
have to do is to have the editor follow links to get to other screens.


Inner Class Summary
 (package private) static classScreenEditor.PropertiesDialog
           
 (package private) static classScreenEditor.ScreenRepresentation
           
 (package private) classScreenEditor.ScreenSelector
           

Constructor Summary
ScreenEditor(String className, String fileName)
           

Method Summary
 voidblockSelected()
           
 voidentitySelected()
           
 BlockgetSelectedBlock()
           
 GameEntitygetSelectedGameEntity()
           
 static voidmain(String[] args)
           
 static VectorreadScreenVector(String fileName)
          Call this function to read in Screen objects that have been saved by the
ScreenEditor.
 static VectorreadScreenVector(InputStream is)
          Call this function to read in Screen objects that have been saved by the
ScreenEditor.

Constructor Detail

ScreenEditor

public ScreenEditor(String className, String fileName)
Method Detail

blockSelected

public void blockSelected()

entitySelected

public void entitySelected()

getSelectedBlock

public Block getSelectedBlock()

getSelectedGameEntity

public GameEntity getSelectedGameEntity()

main

public static void main(String[] args)

readScreenVector

public static Vector readScreenVector(String fileName)
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.ClassNotFoundException
Call this function to read in Screen objects that have been saved by the
ScreenEditor. You should provide the file name.
Parameters:
fileName A string for the name of the file to be loaded.
Throws:
ClassCastException The data read in isn't a Vector this is thrown.
FileNotFoundException The filename provided doesn't correspond to a file.
IOException There was an error reading the file.
ClassNotFoundException The class that was deserialzed couldn't be found in the classpath.

readScreenVector

public static Vector readScreenVector(InputStream is)
throws java.io.IOException,
java.lang.ClassNotFoundException
Call this function to read in Screen objects that have been saved by the
ScreenEditor. You should provide a valid input stream that it can be
read from. This form is particularly handy when you are reading the
data from someplace other than a file, like across a network. In that
case you can pass it an InputStream that you get from a URL or Socket
object.
Parameters:
is An input stream from which the screen data can be read.
Throws:
ClassCastException If the data read in isn't a Vector this is thrown.
IOException There was an error reading the file.
ClassNotFoundException The class that was deserialzed couldn't be found in the classpath.

Association Links

to Class javax.swing.JFrame

to Class java.lang.Class

to Class java.lang.String

to Class java.util.Vector

to Class EditorDisplay

to Class EditorPlayer

to Class BlockSelectorPanel

to Class EntitySelectorPanel

to Class ScreenEditor.ScreenSelector