public interface DocumentsContainer extends java.lang.Iterable<Document>, Observable
Modifier and Type | Method and Description |
---|---|
void |
addDocument(Document document)
Adds a document to the project
|
Document |
createDocument(java.lang.String type) |
Document |
getActiveDocument() |
Document |
getActiveDocument(java.lang.Class<? extends Document> documentClass) |
Document |
getActiveDocument(java.lang.String documentTypeName) |
IWindow |
getActiveWindow(java.lang.Class<? extends Document> documentClass) |
Document |
getDocument(java.util.function.Predicate<Document> condition)
Returns the first document that fit the condition specified.
|
Document |
getDocument(java.lang.String name)
Returns the document with the name specified by name.
|
Document |
getDocument(java.lang.String name,
java.lang.String type)
Returns the document of the type indicated and the name specified by name.
|
java.util.List<Document> |
getDocuments()
Utility method that call getDocuments(Predicate
|
java.util.List<Document> |
getDocuments(java.lang.Class<? extends Document> documentClass)
Utility method that call getDocuments(Predicate
|
java.util.List<Document> |
getDocuments(java.util.function.Predicate<Document> filter)
Return a list of all the documents of the project that meet the
specified filter.The list of documents will be ordered
alphabetically by the name of the document.
|
java.util.List<Document> |
getDocuments(java.lang.String type)
Utility method that call getDocuments(Predicate
|
Document |
getFirstDocument(java.lang.Class<? extends Document> documentClass) |
java.util.List<Document> |
getOpenDocuments(java.lang.Class<? extends Document> documentClass)
Utility method that call getOpenDocuments(Predicate
|
java.util.List<Document> |
getOpenDocuments(java.util.function.Predicate<Document> filter)
Return a list of all open documents of the project that meet the
specified filter.The document list follows the same order as
the windows of these, being the first in case of complying with
the filter, the corresponding to the active window.
|
java.util.List<Document> |
getOpenDocuments(java.lang.String type)
Utility method that call getOpenDocuments(Predicate
|
boolean |
isEmpty() |
java.util.Iterator<Document> |
iterator() |
void |
removeDocument(Document document)
Remove a document of the project
|
addObserver, deleteObserver, deleteObservers
java.util.List<Document> getDocuments(java.util.function.Predicate<Document> filter)
filter
- that determines what documents should be returned.java.util.List<Document> getDocuments()
java.util.List<Document> getDocuments(java.lang.String type)
type
- of the documents that should return.java.util.List<Document> getDocuments(java.lang.Class<? extends Document> documentClass)
documentClass
- of the documents that should return.void addDocument(Document document)
document
- as Documentvoid removeDocument(Document document)
document
- as Documentjava.util.Iterator<Document> iterator()
iterator
in interface java.lang.Iterable<Document>
boolean isEmpty()
Document getDocument(java.lang.String name, java.lang.String type)
name
- name of the document to retrievetype
- name of the type of document to retrieveDocument getDocument(java.lang.String name)
name
- Document getDocument(java.util.function.Predicate<Document> condition)
condition
- Document getActiveDocument()
Document getActiveDocument(java.lang.String documentTypeName)
Document createDocument(java.lang.String type)
java.util.List<Document> getOpenDocuments(java.util.function.Predicate<Document> filter)
filter
- that determines what documents should be returned.java.util.List<Document> getOpenDocuments(java.lang.Class<? extends Document> documentClass)
documentClass
- of the documents that should return.java.util.List<Document> getOpenDocuments(java.lang.String type)
type
- of the documents that should return.