|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteasik.sketch.document.DocumentInfo
public class DocumentInfo
Stores information about the current document. This information includes the name of the sketch, the authors of
sketch, a description, and creation/last modification dates.
Information about dates is created automatically, while other information is provided by the user through a
DocInfoUI object.
| Field Summary | |
|---|---|
private java.util.ArrayList<java.lang.String> |
_authors
The authors of this document |
private java.lang.String |
_creationDate
The creation date of this document |
private java.lang.String |
_desc
The description of this document |
private java.lang.String |
_lastMod
The last modification date of this document |
private java.lang.String |
_name
The name of this document |
| Constructor Summary | |
|---|---|
DocumentInfo()
Standard constructor with empty strings for all document information. |
|
| Method Summary | |
|---|---|
void |
addAuthor(java.lang.String author)
Adds an author to the list of authors. |
java.util.ArrayList<java.lang.String> |
getAuthors()
Gets the authors of this sketch |
java.lang.String |
getAuthorString()
Returns a single string of the authors, with commas acting as separators |
java.lang.String |
getCreationDate()
Gets the creation date. |
private static java.lang.String |
getDateTime()
Determines the current date/time and formats it in the XML dateTime format |
java.lang.String |
getDesc()
Gets the description of the current sketch |
java.lang.String |
getLastMod()
Gets the last modification date. |
java.lang.String |
getName()
Gets the name of this sketch |
void |
setAllInfo(java.lang.String name,
java.lang.String author,
java.lang.String desc)
Sets all editable information, with the parameters determined by the user. |
void |
setCreationDate(java.lang.String date)
Sets the creation date. |
void |
setDateInfo()
Sets the date information when a save is called. |
void |
setDesc(java.lang.String desc)
Sets the description of the current sketch |
void |
setModificationDate(java.lang.String date)
Sets the last modification date. |
void |
setName(java.lang.String name)
Sets the name of this sketch, and also sets the name above the information tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String _name
private java.util.ArrayList<java.lang.String> _authors
private java.lang.String _desc
private java.lang.String _creationDate
private java.lang.String _lastMod
| Constructor Detail |
|---|
public DocumentInfo()
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name of this sketchpublic java.util.ArrayList<java.lang.String> getAuthors()
public java.lang.String getAuthorString()
public void addAuthor(java.lang.String author)
author - The authors namepublic java.lang.String getDesc()
public void setDesc(java.lang.String desc)
desc - The description of the sketchpublic java.lang.String getCreationDate()
public void setCreationDate(java.lang.String date)
date - The date of creation of this sketch, based on the first save.public java.lang.String getLastMod()
public void setModificationDate(java.lang.String date)
date - The date of the last modification, or the empty string if this is the latest modification.
public void setAllInfo(java.lang.String name,
java.lang.String author,
java.lang.String desc)
name - The name of the sketchauthor - The string of all authors of the sketchdesc - The description of the sketchpublic void setDateInfo()
private static java.lang.String getDateTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||