erland.game.tileadventure
Class MapObjectEditor

java.lang.Object
  extended by erland.game.tileadventure.MapEditor
      extended by erland.game.tileadventure.TileMapEditor
          extended by erland.game.tileadventure.MapObjectEditor
All Implemented Interfaces:
GamePanelInterface

public class MapObjectEditor
extends TileMapEditor


Field Summary
protected  ECheckBox aliveCheckbox
          The alive setting checkbox
protected  DrawMap drawMap
          The draw map implementation to use
protected  ELabel enemyTypeLabel
          The enemy type setting list box label
protected  EListBox enemyTypeListbox
          The enemy type setting list box
protected  EPanel enemyTypePanel
          The enemy type setting list box panel
protected  MapObjectExtendedLevelInfo extendedLevelInfo
          The extra object information
protected  ELabel heightLabel
          The label of height of the block
protected  EPanel heightPanel
          The height setting spinner panel
protected  ENumberSpinner heightSpinner
          The spinner for height of the block
protected  LevelManager levelManager
          The level manager to use
protected  Image paletteBitmap
          The palette bitmap
protected  LevelManager paletteLevelManager
          The level manager to use for palette bitmap
protected  ECheckBox pushableCheckbox
          The pushable setting checkbox
protected  EPanel settingsPanel
          The panel with settings for the tile
protected  ECheckBox walkableCheckbox
          The walkable setting checkbox
 
Fields inherited from class erland.game.tileadventure.TileMapEditor
cont, contPalette, heightLevelSpinner, levelNo, levelNoSpinner, mapBlocks, paletteBlocks
 
Fields inherited from class erland.game.tileadventure.MapEditor
BUTTON_EXIT, BUTTON_LOAD, BUTTON_SAVE
 
Constructor Summary
MapObjectEditor()
           
 
Method Summary
 void drawHoveringFrame(Graphics g, int posX, int posY)
           
 void drawMapBlocks(Graphics g, MapObjectContainerInterface blocks)
           
 void drawSelectedFrame(Graphics g, MapObjectInterface selectedBlock)
           
protected  void exitFinish()
          Called once when exit of the map editor is finished
protected  ParameterSerializable getExtendedLevelInfo()
          Get extended information about the currently edited level/block
protected  String getLevelFileGroupLabel()
          Get the name that is used for the currently edited object type when it is stored to file, for example "level"
protected  String getLevelFileLabel()
          Get the name that is used for a list of the currently edited object type when it is stored to file, for example "levels"
protected  LevelManager getLevelManager()
          Gets the level manager or create a new one if it does not already exist
protected  Image getMapBlockImage()
          Get an image which is based on subimages of all blocks in the block select area
protected  int getMaxHeight()
          Get the maximum height levels of blocks
protected  int getSelectSizeX()
          Get the horizontal number of blocks in the select block area
protected  int getSelectSizeY()
          Get the vertical number of blocks in the select block area
protected  int getSizeX()
          Get the horizontal number of blocks in main editor area
protected  int getSizeY()
          Get the vertical number of blocks in the main editor area
protected  int getSizeZ()
          Get the height number of blocks in the main editor area
protected  void initFinish()
          Called once when the initialization of the map editor is finished
protected  void setExtendedLevelInfo(ParameterSerializable info)
          Set the extended information for the currently edited level/block
protected  void updateBlocks()
          Update all blocks
 
Methods inherited from class erland.game.tileadventure.TileMapEditor
cloneBlock, getFirstPaletteBlock, getHeightLabelText, getLevelLabelText, getLevelNo, getMapBlocks, getMapContainer, getMapPosZ, getMaxLevel, getNoOfPaletteBlocks, getPaletteBlock, getPaletteBlocks, getPaletteContainer, init, initButtons, initHeightChangeButtons, initLevelChangeButtons, isEmptyAllowed, loadButton, prepareAfterLoad, prepareForSave, saveButton
 
Methods inherited from class erland.game.tileadventure.MapEditor
clickedMapBlock, clickedSelectBlock, draw, drawBlock, drawFinish, drawPaletteBlocks, exit, exitButton, getDefaultButtons, getEnvironment, getPalettePosZ, hoverMapBlock, initButtonPanel, initDefaultButtons, isExit, leftMouseDragged, leftMousePressed, mouseHovering, prepareNewBlock, setCheatmode, setMapBlock, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawMap

protected DrawMap drawMap
The draw map implementation to use


levelManager

protected LevelManager levelManager
The level manager to use


settingsPanel

protected EPanel settingsPanel
The panel with settings for the tile


walkableCheckbox

protected ECheckBox walkableCheckbox
The walkable setting checkbox


pushableCheckbox

protected ECheckBox pushableCheckbox
The pushable setting checkbox


aliveCheckbox

protected ECheckBox aliveCheckbox
The alive setting checkbox


enemyTypePanel

protected EPanel enemyTypePanel
The enemy type setting list box panel


enemyTypeListbox

protected EListBox enemyTypeListbox
The enemy type setting list box


enemyTypeLabel

protected ELabel enemyTypeLabel
The enemy type setting list box label


heightPanel

protected EPanel heightPanel
The height setting spinner panel


heightLabel

protected ELabel heightLabel
The label of height of the block


heightSpinner

protected ENumberSpinner heightSpinner
The spinner for height of the block


extendedLevelInfo

protected MapObjectExtendedLevelInfo extendedLevelInfo
The extra object information


paletteLevelManager

protected LevelManager paletteLevelManager
The level manager to use for palette bitmap


paletteBitmap

protected Image paletteBitmap
The palette bitmap

Constructor Detail

MapObjectEditor

public MapObjectEditor()
Method Detail

getLevelFileLabel

protected String getLevelFileLabel()
Description copied from class: TileMapEditor
Get the name that is used for a list of the currently edited object type when it is stored to file, for example "levels"

Specified by:
getLevelFileLabel in class TileMapEditor
Returns:
The name of the currently edited object type used in storage

getLevelFileGroupLabel

protected String getLevelFileGroupLabel()
Description copied from class: TileMapEditor
Get the name that is used for the currently edited object type when it is stored to file, for example "level"

Specified by:
getLevelFileGroupLabel in class TileMapEditor
Returns:
The name of the currently edited object type used in storage

getSizeX

protected int getSizeX()
Description copied from class: TileMapEditor
Get the horizontal number of blocks in main editor area

Specified by:
getSizeX in class TileMapEditor
Returns:
The horizontal number of blocks

getSizeY

protected int getSizeY()
Description copied from class: TileMapEditor
Get the vertical number of blocks in the main editor area

Specified by:
getSizeY in class TileMapEditor
Returns:
The vertical number of blocks

getSizeZ

protected int getSizeZ()
Description copied from class: TileMapEditor
Get the height number of blocks in the main editor area

Specified by:
getSizeZ in class TileMapEditor
Returns:
The height number of blocks

getSelectSizeX

protected int getSelectSizeX()
Description copied from class: TileMapEditor
Get the horizontal number of blocks in the select block area

Specified by:
getSelectSizeX in class TileMapEditor
Returns:
The horizontal number of blocks

getSelectSizeY

protected int getSelectSizeY()
Description copied from class: TileMapEditor
Get the vertical number of blocks in the select block area

Specified by:
getSelectSizeY in class TileMapEditor
Returns:
The vertical number of blocks

getMaxHeight

protected int getMaxHeight()
Description copied from class: TileMapEditor
Get the maximum height levels of blocks

Overrides:
getMaxHeight in class TileMapEditor
Returns:
The maximum numer of height levels of blocks

getMapBlockImage

protected Image getMapBlockImage()
Description copied from class: TileMapEditor
Get an image which is based on subimages of all blocks in the block select area

Specified by:
getMapBlockImage in class TileMapEditor
Returns:

drawMapBlocks

public void drawMapBlocks(Graphics g,
                          MapObjectContainerInterface blocks)
Specified by:
drawMapBlocks in class MapEditor

drawSelectedFrame

public void drawSelectedFrame(Graphics g,
                              MapObjectInterface selectedBlock)
Overrides:
drawSelectedFrame in class TileMapEditor

drawHoveringFrame

public void drawHoveringFrame(Graphics g,
                              int posX,
                              int posY)
Overrides:
drawHoveringFrame in class TileMapEditor

getLevelManager

protected LevelManager getLevelManager()
Description copied from class: TileMapEditor
Gets the level manager or create a new one if it does not already exist

Specified by:
getLevelManager in class TileMapEditor
Returns:
The LevelManager object which we should use

initFinish

protected void initFinish()
Description copied from class: MapEditor
Called once when the initialization of the map editor is finished

Overrides:
initFinish in class MapEditor

exitFinish

protected void exitFinish()
Description copied from class: MapEditor
Called once when exit of the map editor is finished

Overrides:
exitFinish in class MapEditor

setExtendedLevelInfo

protected void setExtendedLevelInfo(ParameterSerializable info)
Description copied from class: TileMapEditor
Set the extended information for the currently edited level/block

Overrides:
setExtendedLevelInfo in class TileMapEditor
Parameters:
info - Extended level/block information

getExtendedLevelInfo

protected ParameterSerializable getExtendedLevelInfo()
Description copied from class: TileMapEditor
Get extended information about the currently edited level/block

Overrides:
getExtendedLevelInfo in class TileMapEditor
Returns:
Extended level/block information

updateBlocks

protected void updateBlocks()
Description copied from class: MapEditor
Update all blocks

Overrides:
updateBlocks in class TileMapEditor


Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.