ch.sahits.game.graphic.display
Class MainGameView

java.lang.Object
  extended by ch.sahits.game.rendering.AbstractRenderPart
      extended by ch.sahits.game.graphic.display.MainGameView
All Implemented Interfaces:
ch.sahits.game.event.IEventListener, ch.sahits.game.rendering.Renderable, ch.sahits.game.rendering.RenderablePart

public class MainGameView
extends ch.sahits.game.rendering.AbstractRenderPart

This is the main in game view. The main part of this class is to delegate further down and to draw the frame borders over the delegated stuff.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 30, 2011

Field Summary
private  BufferedImage background
          Cached background image
private static int BORDER_SPACING
          Width/height of the border
private  GameStatus gameStatus
          View status holding money and time
private static int HORIZONTAL_DECO_HEIGHT
          Height of the horizontal fries
private static int LEFT_PANEL_WIDTH
          Width og the left panels inclusive borders
private static int LEFT_STATUS_PANEL_WIDTH
          Width of the left panels (without borders)
private  ch.sahits.game.graphic.image.ImagesLoader loader
          Image loader to retrieve the images
private  MainMenu mainMenu
          View holding the main menu
private  MainView mainView
          Main view of the map or the city
private static int MAP_OVERVIEW_HEIGHT
          Height of the map overview
private  MapView mapOverview
          View holding the sea or city overview map
private static int MENU_HEIGHT
          Height of the menu bar
static int MINMIMAL_DISPLAY_HEIGHT
          The minimal height the display must have
private static int NOTICE_HEIGHT
          Height of the notice view
private  NoticeView noticeView
          View holding notices and state information
private  SubMenu subMenu
          View holding the sub menu (ship or city) menu
private static int TOP_STATUS_HEIGHT
          Height of the top status bar
private  ViewStatus viewStatus
          Status view of the fleet or city
 
Fields inherited from class ch.sahits.game.rendering.AbstractRenderPart
rect
 
Constructor Summary
MainGameView(Rectangle rect, ch.sahits.game.openpatrician.client.IClient cl)
           
 
Method Summary
private  BufferedImage createBackground()
          Create the background image
 void gameRender(Graphics gScr)
           
 void gameUpdate(ch.sahits.game.event.Event e, Object notice)
           
 
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

MAP_OVERVIEW_HEIGHT

private static final int MAP_OVERVIEW_HEIGHT
Height of the map overview

See Also:
Constant Field Values

LEFT_STATUS_PANEL_WIDTH

private static final int LEFT_STATUS_PANEL_WIDTH
Width of the left panels (without borders)

See Also:
Constant Field Values

TOP_STATUS_HEIGHT

private static final int TOP_STATUS_HEIGHT
Height of the top status bar

See Also:
Constant Field Values

BORDER_SPACING

private static final int BORDER_SPACING
Width/height of the border

See Also:
Constant Field Values

HORIZONTAL_DECO_HEIGHT

private static final int HORIZONTAL_DECO_HEIGHT
Height of the horizontal fries

See Also:
Constant Field Values

MENU_HEIGHT

private static final int MENU_HEIGHT
Height of the menu bar

See Also:
Constant Field Values

NOTICE_HEIGHT

private static final int NOTICE_HEIGHT
Height of the notice view

See Also:
Constant Field Values

LEFT_PANEL_WIDTH

private static final int LEFT_PANEL_WIDTH
Width og the left panels inclusive borders

See Also:
Constant Field Values

MINMIMAL_DISPLAY_HEIGHT

public static final int MINMIMAL_DISPLAY_HEIGHT
The minimal height the display must have

See Also:
Constant Field Values

mapOverview

private final MapView mapOverview
View holding the sea or city overview map


mainMenu

private final MainMenu mainMenu
View holding the main menu


subMenu

private final SubMenu subMenu
View holding the sub menu (ship or city) menu


noticeView

private final NoticeView noticeView
View holding notices and state information


gameStatus

private final GameStatus gameStatus
View status holding money and time


viewStatus

private final ViewStatus viewStatus
Status view of the fleet or city


mainView

private final MainView mainView
Main view of the map or the city


loader

private final ch.sahits.game.graphic.image.ImagesLoader loader
Image loader to retrieve the images


background

private final BufferedImage background
Cached background image

Constructor Detail

MainGameView

public MainGameView(Rectangle rect,
                    ch.sahits.game.openpatrician.client.IClient cl)
Method Detail

gameRender

public void gameRender(Graphics gScr)

createBackground

private BufferedImage createBackground()
Create the background image

Returns:

gameUpdate

public void gameUpdate(ch.sahits.game.event.Event e,
                       Object notice)


Copyright © 2011 Sahits GmbH. All Rights Reserved.