org.jext.project
Class AbstractProject

java.lang.Object
  extended by org.jext.project.AbstractProject
All Implemented Interfaces:
Project

public abstract class AbstractProject
extends java.lang.Object
implements Project

Defines a basic project created using Jext.

Author:
Matt Benson

Field Summary
protected  java.util.Map attributes
           
protected  AbstractProjectManager manager
           
protected  java.lang.String name
           
 
Constructor Summary
protected AbstractProject(java.lang.String name, AbstractProjectManager manager)
          Create a new AbstractProject.
 
Method Summary
protected  void fireProjectEvent(int eventType)
          Fire the specified ProjectEvent for this AbstractProject.
protected  void fireProjectEvent(int eventType, java.lang.Object target)
          Fire the specified ProjectEvent for this AbstractProject.
 java.lang.Object getAttribute(java.lang.String key)
          Returns the value of the specified attribute for this AbstractProject.
 java.lang.Object getAttribute(java.lang.String key, java.lang.Object defaultValue)
          Returns the value of the specified attribute for this AbstractProject, returning the specified default value if no such attribute exists.
 java.lang.String getAttributeAsString(java.lang.String key)
          Returns the String value of the specified attribute for this AbstractProject.
 java.lang.String getName()
          Returns the name of this AbstractProject.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Sets the specified attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jext.project.Project
closeFile, getFiles, getSelectedFile, openFile, selectFile
 

Field Detail

attributes

protected final java.util.Map attributes

manager

protected final AbstractProjectManager manager

name

protected final java.lang.String name
Constructor Detail

AbstractProject

protected AbstractProject(java.lang.String name,
                          AbstractProjectManager manager)
Create a new AbstractProject.

Parameters:
name - the name of this AbstractProject.
manager - the AbstractProjectManager in charge of this AbstractProject.
Method Detail

getName

public java.lang.String getName()
Returns the name of this AbstractProject.

Specified by:
getName in interface Project
Returns:
String.

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Returns the value of the specified attribute for this AbstractProject.

Specified by:
getAttribute in interface Project
Parameters:
key - the String key to which this attribute is tied.
Returns:
Object

getAttribute

public java.lang.Object getAttribute(java.lang.String key,
                                     java.lang.Object defaultValue)
Returns the value of the specified attribute for this AbstractProject, returning the specified default value if no such attribute exists.

Specified by:
getAttribute in interface Project
Parameters:
key - the String key to which this attribute is tied.
defaultValue - the default Object to return if no such attribute exists.
Returns:
Object

getAttributeAsString

public java.lang.String getAttributeAsString(java.lang.String key)
Returns the String value of the specified attribute for this AbstractProject.

Specified by:
getAttributeAsString in interface Project
Parameters:
key - the String key to which this attribute is tied.
Returns:
String

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Sets the specified attribute.

Specified by:
setAttribute in interface Project
Parameters:
key - the String key of the attribute to be set.
value - the Object value to assign.

fireProjectEvent

protected void fireProjectEvent(int eventType)
Fire the specified ProjectEvent for this AbstractProject. This

Parameters:
eventType - the int code for the type of event to fire.

fireProjectEvent

protected void fireProjectEvent(int eventType,
                                java.lang.Object target)
Fire the specified ProjectEvent for this AbstractProject. This

Parameters:
eventType - the int code for the type of event to fire.
target - the Object target of the event to fire.


Copyright ? 2002 Romain Guy.