daoc.editor.model
Class UIModel

java.lang.Object
  extended bydaoc.editor.model.UIModel
All Implemented Interfaces:
java.util.EventListener, IUpdateListener

public class UIModel
extends java.lang.Object
implements IUpdateListener

A singleton data model. Our primary data source is a tree containing TreeNodes. This tree is constructed by parsing the uimain.xml user interface file. This model also contains flat lists of several specific elements (e.g. windows templates, textures, ...) for quick access.


Method Summary
 void addSelectionListener(IModelSelectionListener l)
           
static boolean fallback()
           
static AdapterManager getAdapterManager()
           
static AssetTypes getAssetTypes()
           
static BoundsStore getBoundsStore()
           
static CanvasManager getCanvasManager()
           
static ControlTypes getControlTypes()
           
static EventManager getEventManager()
           
static FontManager getFontManager()
           
static UIModel getInstance()
           
static RootNode getRoot()
           
 ElementNode getSelection()
           
static Settings getSettings()
           
static TemplateManager getTemplateManager()
           
static TemplateTypes getTemplateTypes()
           
static TextureManager getTextureManager()
           
static WindowManager getWindowManager()
           
 boolean hasChanaged()
           
 void load(LoadingDialog d, java.lang.String customDir, boolean fallback)
           
 void nodeAdded(ElementNode node, ElementNode child)
           
 void nodeRemoved(ElementNode node, ElementNode child)
           
 void nodeUpdated(ElementNode node)
           
 void removeSelectionListener(IModelSelectionListener l)
           
 void setChanged(boolean b)
           
 void setSelection(ElementNode node)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UIModel getInstance()

load

public void load(LoadingDialog d,
                 java.lang.String customDir,
                 boolean fallback)
          throws java.io.IOException,
                 org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

fallback

public static boolean fallback()

setChanged

public void setChanged(boolean b)

hasChanaged

public boolean hasChanaged()

getRoot

public static RootNode getRoot()

getWindowManager

public static WindowManager getWindowManager()

getTextureManager

public static TextureManager getTextureManager()

getTemplateManager

public static TemplateManager getTemplateManager()

getCanvasManager

public static CanvasManager getCanvasManager()

getAdapterManager

public static AdapterManager getAdapterManager()

getFontManager

public static FontManager getFontManager()

getSettings

public static Settings getSettings()

getControlTypes

public static ControlTypes getControlTypes()

getTemplateTypes

public static TemplateTypes getTemplateTypes()

getAssetTypes

public static AssetTypes getAssetTypes()

getEventManager

public static EventManager getEventManager()

getBoundsStore

public static BoundsStore getBoundsStore()

setSelection

public void setSelection(ElementNode node)

getSelection

public ElementNode getSelection()

addSelectionListener

public void addSelectionListener(IModelSelectionListener l)

removeSelectionListener

public void removeSelectionListener(IModelSelectionListener l)

nodeUpdated

public void nodeUpdated(ElementNode node)
Specified by:
nodeUpdated in interface IUpdateListener

nodeAdded

public void nodeAdded(ElementNode node,
                      ElementNode child)
Specified by:
nodeAdded in interface IUpdateListener

nodeRemoved

public void nodeRemoved(ElementNode node,
                        ElementNode child)
Specified by:
nodeRemoved in interface IUpdateListener