|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttico.board.TProject
public class TProject
Set of TBoards
wich can be navigated from an specified initial
one.
Constructor Summary | |
---|---|
TProject()
Creates a new empty TProject with no initial name . |
|
TProject(java.lang.String name)
Creates a new empty TProject with the specified initial
name . |
Method Summary | |
---|---|
void |
addBoard(TBoard board)
Add a board to the project. |
void |
addProject(TProject project)
Add all the boards of project to the project. |
void |
addProjectChangeListener(ProjectChangeListener listener)
Adds an ProjectChangeListener . |
TBoard |
getBoard(int index)
Returns the project board in the specified index . |
TBoard |
getBoard(java.lang.String name)
Returns the project board with the specified name . |
int |
getBoardCount()
Returns the number of boards contained by the project |
java.util.ArrayList |
getBoardList()
Return an ArrayList with all project boards. |
TBoard |
getInitialBoard()
Returns the initialBoard . |
java.lang.String |
getName()
Returns the project name . |
boolean |
isRepeatedName(TBoard board,
java.lang.String name)
Determines if any project board different from board
has the specified name . |
boolean |
isUsedName(java.lang.String name)
Determines if any project board has the specified name . |
static java.lang.String |
newName()
Creates a new project name different from any other project
name created with this function. |
void |
removeBoard(TBoard board)
Removes the specified board from the project. |
void |
removeProjectChangeListener(ProjectChangeListener listener)
Removes a ProjectChangeListener . |
void |
setBoardList(java.util.ArrayList newBoardList)
|
void |
setInitialBoard(TBoard initialBoard)
Sets the initialBoard . |
void |
setName(java.lang.String name)
Sets the project name . |
static TProject |
XMLDecode(org.w3c.dom.Element element)
Returns a TProject object from the data contained in
the XML Element . |
static TProject |
XMLDecode(org.w3c.dom.Element element,
java.lang.String projectName)
Returns a TProject object from the data contained in
the XML Element . |
org.w3c.dom.Element |
XMLEncode(org.w3c.dom.Document doc)
Generates an XML Element that contains the project information. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TProject()
TProject
with no initial name
.
public TProject(java.lang.String name)
TProject
with the specified initial
name
.
name
- The specified initial name
Method Detail |
---|
public java.lang.String getName()
name
.
name
public void setName(java.lang.String name)
name
.
name
- The project name
to setpublic static java.lang.String newName()
name
different from any other project
name
created with this function.
name
public void addBoard(TBoard board)
board
to the project. The board is renamed if its
name is already used by other board of the project. If is the first
board
of the project, its automatically set as the
initialBoard
.
board
- The board
to addpublic void addProject(TProject project)
project
to the project. If any of
the new board has a name already used by other board of the project, it
is renamed. If this project was empty, the first board of project
is set as initialBoard
.
project
- The project
to addpublic void removeBoard(TBoard board)
board
from the project.
board
- The board
to deletepublic int getBoardCount()
public TBoard getBoard(java.lang.String name)
name
.
name
- The specified board name
name
. If the
project does not contain any board with that name, returns nullpublic TBoard getBoard(int index)
index
.
index
- The specified board index
name
public TBoard getInitialBoard()
initialBoard
.
initialBoard
public void setInitialBoard(TBoard initialBoard)
initialBoard
. It initialBoard
is not
contained in the project, adds it.
initialBoard
- The initialBoard
to setpublic boolean isUsedName(java.lang.String name)
name
.
name
- The specified name
name
public boolean isRepeatedName(TBoard board, java.lang.String name)
board
has the specified name
.
board
- The board
name
- The specified id
board
has the specified name
public java.util.ArrayList getBoardList()
ArrayList
with all project boards.
ArrayList
with all project boardspublic void setBoardList(java.util.ArrayList newBoardList)
public void addProjectChangeListener(ProjectChangeListener listener)
ProjectChangeListener
.
The ProjectChangeListener
. will receive a
ProjectChangeEvent
when the project of any of its boards
has been changed.
listener
- The ProjectChangeListener
that is to be notifiedpublic void removeProjectChangeListener(ProjectChangeListener listener)
ProjectChangeListener
.
listener
- The ProjectChangeListener
to removepublic org.w3c.dom.Element XMLEncode(org.w3c.dom.Document doc)
Element
that contains the project information.
doc
- The Document
that represents the
entire XML document
Element
generatedpublic static TProject XMLDecode(org.w3c.dom.Element element) throws InvalidFormatException
TProject
object from the data contained in
the XML Element
.
element
- The XML Element
that contains the project data
TProject
InvalidFormatException
- If Element
has an invalid formatpublic static TProject XMLDecode(org.w3c.dom.Element element, java.lang.String projectName) throws InvalidFormatException
TProject
object from the data contained in
the XML Element
.
element
- The XML Element
that contains the project dataprojectName
- The new TProject
project name
TProject
InvalidFormatException
- If Element
has an invalid format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |