synergynetframework.appsystem.contentsystem
Class ContentSystem

java.lang.Object
  extended by synergynetframework.appsystem.contentsystem.ContentSystem
Direct Known Subclasses:
JMEContentSystem

public abstract class ContentSystem
extends java.lang.Object

Main layer in producing multi-touch capable content for an application. This avoids application developers having to deal with the intricacies of managing multi-touch interactions for graphical compoments.


Constructor Summary
ContentSystem()
           
 
Method Summary
abstract  void addContentItem(ContentItem contentItem)
          Adds the content item.
 void addUpdateableListener(Updateable l)
          Adds the updateable listener.
abstract  ContentItem createContentItem(java.lang.Class<? extends ContentItem> contentItemType)
          Creates the content item.
abstract  ContentItem createContentItem(java.lang.Class<? extends ContentItem> contentItemType, java.lang.String itemName)
          Create a content item with a specific name.
 java.lang.String generateUniqueName()
          Generate unique name.
 java.util.Map<java.lang.String,ContentItem> getAllContentItems()
          Gets the all content items.
 ContentItem getContentItem(java.lang.String name)
          Gets the content item.
 int getContentItemsCount()
          Gets the content items count.
static ContentSystem getContentSystemForSynergyNetApp(SynergyNetApp app)
          Gets the content system for synergy net app.
 IImplementationItemFactory getImplementationItemFactory()
          Gets the implementation item factory.
abstract  int getScreenHeight()
          Gets the screen height.
abstract  int getScreenWidth()
          Gets the screen width.
abstract  boolean isTopLevelContainer(java.lang.Object implementationObject)
          Checks if is top level container.
 java.util.Set<ContentItem> loadContentItems(java.lang.String xmlFilePath)
          Load content items.
abstract  void removeAllContentItems()
          Removes the all content items.
abstract  void removeContentItem(ContentItem contentItem)
          Removes the content item.
abstract  void removeContentItem(ContentItem contentItem, boolean releaseTextures)
          Removes the content item.
 void removeUpdateableListener(Updateable l)
          Removes the updateable listener.
abstract  void setItemName(ContentItem item, java.lang.String nameName)
          Sets the item name.
abstract  void update(float tpf)
          Update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentSystem

public ContentSystem()
Method Detail

getContentSystemForSynergyNetApp

public static ContentSystem getContentSystemForSynergyNetApp(SynergyNetApp app)
Gets the content system for synergy net app.

Parameters:
app - the app
Returns:
the content system for synergy net app

addContentItem

public abstract void addContentItem(ContentItem contentItem)
Adds the content item.

Parameters:
contentItem - the content item

addUpdateableListener

public void addUpdateableListener(Updateable l)
Adds the updateable listener.

Parameters:
l - the l

createContentItem

public abstract ContentItem createContentItem(java.lang.Class<? extends ContentItem> contentItemType)
Creates the content item.

Parameters:
contentItemType - the content item type
Returns:
the content item

createContentItem

public abstract ContentItem createContentItem(java.lang.Class<? extends ContentItem> contentItemType,
                                              java.lang.String itemName)
Create a content item with a specific name. The content item will be a class that extends ContentItem. You may use the default set of ContentItem classes found in synergynet.contentsystem.items or use your own.

Parameters:
contentItemType - the content item type
itemName - the item name
Returns:
the content item

generateUniqueName

public java.lang.String generateUniqueName()
Generate unique name.

Returns:
the string

getAllContentItems

public java.util.Map<java.lang.String,ContentItem> getAllContentItems()
Gets the all content items.

Returns:
the all content items

getContentItem

public ContentItem getContentItem(java.lang.String name)
Gets the content item.

Parameters:
name - the name
Returns:
the content item

getContentItemsCount

public int getContentItemsCount()
Gets the content items count.

Returns:
the content items count

getImplementationItemFactory

public IImplementationItemFactory getImplementationItemFactory()
Gets the implementation item factory.

Returns:
the implementation item factory

getScreenHeight

public abstract int getScreenHeight()
Gets the screen height.

Returns:
the screen height

getScreenWidth

public abstract int getScreenWidth()
Gets the screen width.

Returns:
the screen width

isTopLevelContainer

public abstract boolean isTopLevelContainer(java.lang.Object implementationObject)
Checks if is top level container.

Parameters:
implementationObject - the implementation object
Returns:
true, if is top level container

loadContentItems

public java.util.Set<ContentItem> loadContentItems(java.lang.String xmlFilePath)
Load content items.

Parameters:
xmlFilePath - the xml file path
Returns:
the sets the

removeAllContentItems

public abstract void removeAllContentItems()
Removes the all content items.


removeContentItem

public abstract void removeContentItem(ContentItem contentItem)
Removes the content item.

Parameters:
contentItem - the content item

removeContentItem

public abstract void removeContentItem(ContentItem contentItem,
                                       boolean releaseTextures)
Removes the content item.

Parameters:
contentItem - the content item
releaseTextures - the release textures

removeUpdateableListener

public void removeUpdateableListener(Updateable l)
Removes the updateable listener.

Parameters:
l - the l

setItemName

public abstract void setItemName(ContentItem item,
                                 java.lang.String nameName)
Sets the item name.

Parameters:
item - the item
nameName - the name name

update

public abstract void update(float tpf)
Update.

Parameters:
tpf - the tpf