org.ocd.desktop
Class Desktop

java.lang.Object
  |
  +--org.ocd.desktop.Desktop
All Implemented Interfaces:
IDesktop, IXMLPersistable

public class Desktop
extends java.lang.Object
implements IDesktop

Since:
$Date: 2002/08/07 02:58:33 $
Version:
$Revision: 1.15 $
Author:
$Author: drichan $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)

Fields inherited from interface org.ocd.desktop.IDesktop
XML_DOC_DIR, XML_NODE_NAME
 
Fields inherited from interface org.ocd.blx.IXMLPersistable
BLX_CLASS_NAME_ATTR, BLX_COMP_HEIGHT_ATTR, BLX_COMP_ID, BLX_COMP_NODE_NAME, BLX_COMP_WIDTH_ATTR, BLX_COMP_X_ATTR, BLX_COMP_Y_ATTR, BLX_DOCUMENT_NAME, BLX_EXT_HREF_ATTR, BLX_EXT_VERSION_ATTR, BLX_EXTENSION_ATTR, BLX_FACTORY_NODE_NAME, BLX_FACTORY_TYPE_ATTR, BLX_HREF_ATTR, BLX_NS, BLX_OBJ_NODE_NAME, COMP_TYPE, COMPONENT_FACTORY_TYPE, COMPONENT_FACTORY_TYPE_STR, FACTORY_TYPE, FILE_EXT, OBJECT_FACTORY_TYPE, OBJECT_FACTORY_TYPE_STR, OBJECT_TYPE
 
Constructor Summary
Desktop()
          Creates new Desktop
 
Method Summary
 void addDesktopComponent(DCComponent pComp)
          Add an Object to this Container
 void addDesktopDropListener(IDesktopDropListener pListener)
          Add a Drop Listener to the Desktop A Drop Listener is notified when anything is dropped on the Desktop
 void desktopInstalled()
          This Method is called by the Desktop Service When this Desktop has been made the current Desktop
 void desktopUninstalled()
          This Method is called by the Desktop Service when This Desktop has been removed as the current Desktop
 org.w3c.dom.Element getBLXElement()
          This will return a Node that represents this Components BLX Settings This can be altered by the Container or Parent
 org.w3c.dom.Element getXMLElement()
          This is the Data of the Desktop.
 boolean isInstalled()
          Returns True if this Desktop is Currently Installed as the Current Desktop
 void loadDefault()
          Loads this Desktops Default Configuration
 void removeDesktopComponent(DCComponent pComp)
          remove an Object from this Container
 void removeDesktopDropListener(IDesktopDropListener pListener)
          Remove a Drop Listener
 void setBLXElement(org.w3c.dom.Element pElement, java.net.URL pRelativeURL)
          Set the Node on this Component
 void setExtensionInfo(java.lang.String pName, java.lang.String pURLStr, java.lang.String pVersion)
          Set the Extension Information of the Extension this Component was created From
 boolean xmlHasChanged()
          Return true if this components state has changed in a way that Requires a new XML Node to be fetched
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Desktop

public Desktop()
Creates new Desktop
Method Detail

setBLXElement

public void setBLXElement(org.w3c.dom.Element pElement,
                          java.net.URL pRelativeURL)
Set the Node on this Component
Specified by:
setBLXElement in interface IXMLPersistable
Parameters:
pElement - Node that contains this components settings
pRelativeURL - the URL that all HREFs would be relative to

getBLXElement

public org.w3c.dom.Element getBLXElement()
This will return a Node that represents this Components BLX Settings This can be altered by the Container or Parent
Specified by:
getBLXElement in interface IXMLPersistable
Returns:
dcf Node

getXMLElement

public org.w3c.dom.Element getXMLElement()
This is the Data of the Desktop.
Specified by:
getXMLElement in interface IXMLPersistable
Following copied from interface: org.ocd.blx.IXMLPersistable
Returns:
the Node that contains this Components Settings

desktopInstalled

public void desktopInstalled()
This Method is called by the Desktop Service When this Desktop has been made the current Desktop
Specified by:
desktopInstalled in interface IDesktop

desktopUninstalled

public void desktopUninstalled()
This Method is called by the Desktop Service when This Desktop has been removed as the current Desktop
Specified by:
desktopUninstalled in interface IDesktop

isInstalled

public boolean isInstalled()
Returns True if this Desktop is Currently Installed as the Current Desktop
Specified by:
isInstalled in interface IDesktop
Returns:
installed status

addDesktopDropListener

public void addDesktopDropListener(IDesktopDropListener pListener)
Add a Drop Listener to the Desktop A Drop Listener is notified when anything is dropped on the Desktop
Specified by:
addDesktopDropListener in interface IDesktop
Parameters:
Listener - to receive events

removeDesktopDropListener

public void removeDesktopDropListener(IDesktopDropListener pListener)
Remove a Drop Listener
Specified by:
removeDesktopDropListener in interface IDesktop
Parameters:
Listener - to Remove

loadDefault

public void loadDefault()
Loads this Desktops Default Configuration
Specified by:
loadDefault in interface IDesktop

xmlHasChanged

public boolean xmlHasChanged()
Return true if this components state has changed in a way that Requires a new XML Node to be fetched
Specified by:
xmlHasChanged in interface IXMLPersistable
Returns:
true if component has changed

setExtensionInfo

public void setExtensionInfo(java.lang.String pName,
                             java.lang.String pURLStr,
                             java.lang.String pVersion)
Set the Extension Information of the Extension this Component was created From
Parameters:
Extension - Name
Extension - HREF
Extension - Version

addDesktopComponent

public void addDesktopComponent(DCComponent pComp)
Add an Object to this Container
Specified by:
addDesktopComponent in interface IDesktop
Parameters:
id - of the Object
pObject - to add

removeDesktopComponent

public void removeDesktopComponent(DCComponent pComp)
remove an Object from this Container
Specified by:
removeDesktopComponent in interface IDesktop
Parameters:
pObject - to remove