public abstract class AbstractProject extends java.lang.Object implements Project
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
attributes |
protected AbstractProjectManager |
manager |
protected java.lang.String |
name |
Modifier | Constructor and Description |
---|---|
protected |
AbstractProject(java.lang.String name,
AbstractProjectManager manager)
Create a new
AbstractProject . |
Modifier and Type | Method and Description |
---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeFile, getFiles, getSelectedFile, openFile, selectFile
protected final java.util.Map attributes
protected final AbstractProjectManager manager
protected final java.lang.String name
protected AbstractProject(java.lang.String name, AbstractProjectManager manager)
AbstractProject
.name
- the name of this AbstractProject
.manager
- the AbstractProjectManager
in charge of this
AbstractProject
.public java.lang.String getName()
AbstractProject
.public java.lang.Object getAttribute(java.lang.String key)
AbstractProject
.getAttribute
in interface Project
key
- the String
key to which this attribute is tied.Object
public java.lang.Object getAttribute(java.lang.String key, java.lang.Object defaultValue)
AbstractProject
,
returning the specified default value if no such attribute exists.getAttribute
in interface Project
key
- the String
key to which this attribute is tied.defaultValue
- the default Object
to return if no such
attribute exists.Object
public java.lang.String getAttributeAsString(java.lang.String key)
String
value of the specified attribute for this
AbstractProject
.getAttributeAsString
in interface Project
key
- the String
key to which this attribute is tied.String
public void setAttribute(java.lang.String key, java.lang.Object value)
setAttribute
in interface Project
key
- the String
key of the attribute to be set.value
- the Object
value to assign.protected void fireProjectEvent(int eventType)
ProjectEvent
for this AbstractProject
.
ThiseventType
- the int
code for the type of event to fire.protected void fireProjectEvent(int eventType, java.lang.Object target)
ProjectEvent
for this AbstractProject
.
ThiseventType
- the int
code for the type of event to fire.target
- the Object
target of the event to fire.Copyright ? 2002 Romain Guy.