Class MmObject

java.lang.Object
  |
  +--MmObject
All Implemented Interfaces:
MmGUI, MmPropObj, MmXmlObject

class MmObject
extends java.lang.Object
implements MmXmlObject, MmGUI, MmPropObj

Objet représentant un objet du micro-monde


Field Summary
static int CONT_LAYER
           
(package private)  MmState courant
           
(package private)  java.util.Hashtable etat
           
(package private)  java.util.Vector etat_tmp
           
private static java.util.Hashtable lstObj
           
private  boolean modeMulti
           
private  boolean modeReel
           
(package private)  java.lang.String nom
           
static int OBJ_LAYER
           
static int OBJCONT_LAYER
           
(package private)  java.awt.Rectangle org
          Dans tous les cas, c'est l'etat courant qui gere l'affichage
 
Constructor Summary
(package private) MmObject()
           
 
Method Summary
 MmXmlObject add(java.lang.String child)
           
(package private) static void createAll(javax.swing.JLayeredPane pere)
           
 void creation(javax.swing.JLayeredPane pere)
           
 MmPropObj getChildAt(int i)
           
 int getChildCount()
           
(package private) static MmObject getId(java.lang.String id)
           
(package private) static java.util.Vector getIds()
           
 int getIndexOfChild(MmPropObj kid)
           
 java.util.HashSet getInObject()
          Cette methode renvoie la liste des objets contenus
 int getLayer()
           
(package private) static java.util.Vector getObjects()
           
 javax.swing.JLayeredPane getPane()
           
 java.awt.Rectangle getRect()
           
 java.util.Vector getStates()
           
 boolean isMultiMode()
           
 boolean isRealMode()
           
 boolean isVisible()
           
 void move(int px, int py)
           
 void moveTo(int x, int y)
           
 javax.swing.JPopupMenu popupMenu(MmTree tree)
          Retourne un JPopupMenu pour le JTree
 javax.swing.JPanel propPane()
          Retourne un objet JPanel permettant de modifier les propietes de l'objet
 javax.swing.JLayeredPane remove()
           
(package private) static void removeAll()
           
(package private) static void removeId(java.lang.String id)
           
 void resetLocation()
           
 void rmState(java.lang.String aSupprimer)
           
 void save(FileW fp, int indent)
           
(package private) static void saveObject(FileW fp, int indent)
           
 void set(java.lang.String caract, java.lang.String something)
           
(package private) static void setId(java.lang.String id, MmObject obj)
           
 void setLayer(int couche)
           
 void setLocation(int x, int y)
           
 void setMultiMode(boolean state)
           
 void setPane(javax.swing.JLayeredPane nouveau)
           
 void setRealMode(boolean state)
          On peut passer dans un mode de fonctionnement ou tous les objets peuvent se deplacer librement
 void setState(java.lang.String nouveau)
           
 void setVisible(boolean val)
           
(package private) static void setVisibleAll(boolean state)
           
(package private) static int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

OBJ_LAYER

public static final int OBJ_LAYER

OBJCONT_LAYER

public static final int OBJCONT_LAYER

CONT_LAYER

public static final int CONT_LAYER

lstObj

private static java.util.Hashtable lstObj

nom

java.lang.String nom

etat

java.util.Hashtable etat

etat_tmp

java.util.Vector etat_tmp

courant

MmState courant

org

java.awt.Rectangle org
Dans tous les cas, c'est l'etat courant qui gere l'affichage

modeReel

private boolean modeReel

modeMulti

private boolean modeMulti
Constructor Detail

MmObject

MmObject()
Method Detail

getIds

static java.util.Vector getIds()

getObjects

static java.util.Vector getObjects()

saveObject

static void saveObject(FileW fp,
                       int indent)
                throws java.io.IOException

setId

static void setId(java.lang.String id,
                  MmObject obj)

getId

static MmObject getId(java.lang.String id)

removeId

static void removeId(java.lang.String id)

removeAll

static void removeAll()

createAll

static void createAll(javax.swing.JLayeredPane pere)

setVisibleAll

static void setVisibleAll(boolean state)

size

static int size()

set

public void set(java.lang.String caract,
                java.lang.String something)
Specified by:
set in interface MmXmlObject

add

public MmXmlObject add(java.lang.String child)
Specified by:
add in interface MmXmlObject

save

public void save(FileW fp,
                 int indent)
          throws java.io.IOException
Specified by:
save in interface MmXmlObject

getRect

public java.awt.Rectangle getRect()
Specified by:
getRect in interface MmGUI

setLayer

public void setLayer(int couche)
Specified by:
setLayer in interface MmGUI

getLayer

public int getLayer()
Specified by:
getLayer in interface MmGUI

setVisible

public void setVisible(boolean val)
Specified by:
setVisible in interface MmGUI

isVisible

public boolean isVisible()
Specified by:
isVisible in interface MmGUI

setLocation

public void setLocation(int x,
                        int y)
Specified by:
setLocation in interface MmGUI

resetLocation

public void resetLocation()
Specified by:
resetLocation in interface MmGUI

move

public void move(int px,
                 int py)
Specified by:
move in interface MmGUI

moveTo

public void moveTo(int x,
                   int y)
Specified by:
moveTo in interface MmGUI

getPane

public javax.swing.JLayeredPane getPane()
Specified by:
getPane in interface MmGUI

setPane

public void setPane(javax.swing.JLayeredPane nouveau)
Specified by:
setPane in interface MmGUI

remove

public javax.swing.JLayeredPane remove()
Specified by:
remove in interface MmGUI

creation

public void creation(javax.swing.JLayeredPane pere)
Specified by:
creation in interface MmGUI

getStates

public java.util.Vector getStates()

rmState

public void rmState(java.lang.String aSupprimer)

setState

public void setState(java.lang.String nouveau)

setRealMode

public void setRealMode(boolean state)
On peut passer dans un mode de fonctionnement ou tous les objets peuvent se deplacer librement

isRealMode

public boolean isRealMode()

setMultiMode

public void setMultiMode(boolean state)

isMultiMode

public boolean isMultiMode()

getInObject

public java.util.HashSet getInObject()
Cette methode renvoie la liste des objets contenus

popupMenu

public javax.swing.JPopupMenu popupMenu(MmTree tree)
Description copied from interface: MmPropObj
Retourne un JPopupMenu pour le JTree
Specified by:
popupMenu in interface MmPropObj
Following copied from interface: MmPropObj
Parameters:
tree - Référence au JTree où s'affichera le popup

propPane

public javax.swing.JPanel propPane()
Description copied from interface: MmPropObj
Retourne un objet JPanel permettant de modifier les propietes de l'objet
Specified by:
propPane in interface MmPropObj

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface MmPropObj

getChildAt

public MmPropObj getChildAt(int i)
Specified by:
getChildAt in interface MmPropObj

getIndexOfChild

public int getIndexOfChild(MmPropObj kid)
Specified by:
getIndexOfChild in interface MmPropObj

toString

public java.lang.String toString()
Specified by:
toString in interface MmPropObj
Overrides:
toString in class java.lang.Object