|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.sahits.game.rendering.AbstractRenderPart
ch.sahits.game.graphic.display.start.StartupView
public class StartupView
| Nested Class Summary | |
|---|---|
private static class |
StartupView.MouseState
|
private static class |
StartupView.PageState
|
| Field Summary | |
|---|---|
private int |
historyIndex
|
private int |
historySize
|
private ArrayList<ch.sahits.game.graphic.image.NamedBufferedImage> |
images
|
private static String |
IMS_FILE
|
private ch.sahits.game.graphic.image.LanguageImageLoader |
imsLoader
|
private int |
initialRenderedImages
Number of images that are initially drawn |
private static String[] |
names
|
private HashMap<String,Point> |
offsets
Storage of the offsets for each image. |
private OffsetCalculator |
offsetter
|
private StartupView.PageState |
pageState
|
private TreeMap<Integer,NamedPolygon> |
polygons
Store the polygons for checking against clicking them Using a TreeMap so it may be possible do define polygons that cover the same are but in a different z-order. |
private Rectangle |
size
|
private StartupView.MouseState |
state
|
private static int |
TEXT_BACK_NEXT
|
private static int |
TEXT_CREDITS
|
private static int |
TEXT_FOCUS_BACK
|
private static int |
TEXT_FOCUS_CREDITS
|
private static int |
TEXT_FOCUS_HISTORY
|
private static int |
TEXT_FOCUS_LOAD
|
private static int |
TEXT_FOCUS_NEW
|
private static int |
TEXT_FOCUS_NEXT
|
private static int |
TEXT_FOCUS_OPTIONS
|
private static int |
TEXT_HISTORY
|
private static int |
TEXT_UNFOCUSED
|
private int |
textImageIndex
Index of the text image in the images List |
private boolean |
viewChanged
|
| Fields inherited from class ch.sahits.game.rendering.AbstractRenderPart |
|---|
rect |
| Constructor Summary | |
|---|---|
StartupView(Rectangle bounds)
|
|
| Method Summary | |
|---|---|
private boolean |
contains(String imageName)
check if an image is already contained. |
private String |
findPolygon(int x,
int y)
Find the polygon name that contains the coordinates. |
void |
gameRender(Graphics gScr)
|
void |
gameUpdate(ch.sahits.game.event.Event e,
Object notice)
|
private String |
getImageName(StartupView.MouseState state)
|
private void |
initImages()
load and initialize the images, and build their 'hot-spots' |
private void |
initMouseState()
|
protected void |
initOffsets()
Compute the offsets for the images to be drawn onto the panel |
private void |
initStartPolygons()
Setting the positions of the polygons on the screen |
protected void |
insertFirst(String insertImageName)
|
protected void |
insertImageBefore(String insertImageName,
String imageName)
Insert the image before another image. |
protected void |
insertImageLast(ch.sahits.game.graphic.image.NamedBufferedImage img)
|
protected void |
insertImageLast(String insertImageName)
Inserts an image at the last position |
protected void |
removeImage(String name)
Remove the image with the name. |
private void |
returnBackToStartFromHistory()
|
protected void |
updateMouseState(String polyName)
|
| Methods inherited from class ch.sahits.game.rendering.AbstractRenderPart |
|---|
getBounds, isEnabled, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int TEXT_UNFOCUSED
private static final int TEXT_FOCUS_NEW
private static final int TEXT_FOCUS_LOAD
private static final int TEXT_FOCUS_OPTIONS
private static final int TEXT_FOCUS_CREDITS
private static final int TEXT_FOCUS_HISTORY
private static final int TEXT_CREDITS
private static final int TEXT_FOCUS_BACK
private static final int TEXT_HISTORY
private static final int TEXT_BACK_NEXT
private static final int TEXT_FOCUS_NEXT
private static final String[] names
private int historyIndex
private int historySize
private int textImageIndex
images List
private Rectangle size
private OffsetCalculator offsetter
private TreeMap<Integer,NamedPolygon> polygons
private HashMap<String,Point> offsets
private static final String IMS_FILE
private ArrayList<ch.sahits.game.graphic.image.NamedBufferedImage> images
private final int initialRenderedImages
private StartupView.MouseState state
private StartupView.PageState pageState
private final ch.sahits.game.graphic.image.LanguageImageLoader imsLoader
private volatile boolean viewChanged
| Constructor Detail |
|---|
public StartupView(Rectangle bounds)
| Method Detail |
|---|
private void initMouseState()
protected void updateMouseState(String polyName)
private String findPolygon(int x,
int y)
x - coordinatey - coordinate
private void initStartPolygons()
private void initImages()
protected void initOffsets()
protected void removeImage(String name)
name -
protected void insertImageBefore(String insertImageName,
String imageName)
insertImageName - Name of the image to be inserted.imageName - Name of the image before which to insert.protected final void insertFirst(String insertImageName)
private boolean contains(String imageName)
imageName -
protected void insertImageLast(String insertImageName)
insertImageName - protected void insertImageLast(ch.sahits.game.graphic.image.NamedBufferedImage img)
private String getImageName(StartupView.MouseState state)
private void returnBackToStartFromHistory()
public void gameRender(Graphics gScr)
public void gameUpdate(ch.sahits.game.event.Event e,
Object notice)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||