|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.objectwave.templateMerge.gui.TemplateGuiModel
The behavior of the core TemplateGui screen. This class could easily be used as a nonvisual component integrated into any system.
TemplateGuiVIF,
TemplateGui| Constructor Summary | |
TemplateGuiModel()
KnownTemplates is a collection of known MergeTemplates. |
|
TemplateGuiModel(KnownTemplates known)
|
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add yourself to be notified of property changes. |
protected void |
createTreeModel()
Using the KnownMergeTemplates found in 'workingTemplates', create a TreeModel. |
void |
dumpToText(java.io.BufferedWriter buff)
Write ascii code to the buffer containing the MergeTemplate definitions. |
void |
dumpToXML(java.io.BufferedWriter buff)
Write the templates into the the buffer of an XML file. |
java.lang.String |
getBufferForTemplate(java.lang.String selection,
boolean fullView)
Useful when displaying the way a template will look. |
java.lang.String |
getSelectedTemplateName()
The currently selected template. |
protected MergeTemplate |
getTemplateNamed(java.lang.String name)
Find the template object with the given name. |
javax.swing.tree.TreeModel |
getTemplateTreeModel()
Return the TreeModel. |
TokenProvider |
getTokenProvider()
The tokenProvider contains all of the information tokens that can used in the templates. |
KnownTemplates |
getWorkingTemplates()
|
void |
importFromText(java.io.BufferedReader buff)
Read ascii code from the buffer containing the MergeTemplate definitions. |
void |
importFromXML(java.io.Reader xmlFile)
Read ascii code from the buffer containing the MergeTemplate definitions. |
void |
loadModel()
Load the model from an ObjectStream. |
static void |
main(java.lang.String[] args)
Used to generate serialized files from text template definitions. |
void |
newModel()
Change the workingTemplatesInstance. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Only called when our knownSourceTemplates have been modified. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
No longer listen for property change events. |
void |
requestNewTemplate()
Create a new template. |
void |
requestTemplateDelete()
Edit the selected template. |
void |
requestTemplateEdit()
Edit the selected template. |
void |
saveCurrentModel()
Using serialization, save the current templates. |
void |
setSelectedTemplateName(java.lang.String val)
Other operations will be selection dependent. |
void |
setTemplateGui(java.awt.Frame gui)
Sets the TemplateGui attribute of the TemplateGuiVIF object |
protected void |
setTemplateTreeModel(javax.swing.tree.TreeModel mod)
Used internally to change the model. |
void |
setTokenProvider(TokenProvider p)
A token provider is the source of the InformationToken objects. |
void |
setWorkingTemplates(KnownTemplates workingTemplates)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TemplateGuiModel()
public TemplateGuiModel(KnownTemplates known)
known - KnownTemplates is a collection of known MergeTemplates.| Method Detail |
public static void main(java.lang.String[] args)
args - The command line argumentspublic void setSelectedTemplateName(java.lang.String val)
setSelectedTemplateName in interface TemplateGuiVIFval - The new SelectedTemplateName valuerequestTemplateEdit()public void setTemplateGui(java.awt.Frame gui)
TemplateGuiVIF
setTemplateGui in interface TemplateGuiVIFgui - The new TemplateGui valuepublic void setTokenProvider(TokenProvider p)
setTokenProvider in interface TemplateGuiVIFp - The new TokenProvider valuepublic void setWorkingTemplates(KnownTemplates workingTemplates)
workingTemplates - The new WorkingTemplates valueprotected void setTemplateTreeModel(javax.swing.tree.TreeModel mod)
mod - The new TemplateTreeModel value
public java.lang.String getBufferForTemplate(java.lang.String selection,
boolean fullView)
getBufferForTemplate in interface TemplateGuiVIFselection - The name of a known template.fullView - Should subtemplates be expanded?
public java.lang.String getSelectedTemplateName()
getSelectedTemplateName in interface TemplateGuiVIFpublic javax.swing.tree.TreeModel getTemplateTreeModel()
getTemplateTreeModel in interface TemplateGuiVIFcreateTreeModel()public TokenProvider getTokenProvider()
getTokenProvider in interface TemplateGuiVIFpublic KnownTemplates getWorkingTemplates()
protected MergeTemplate getTemplateNamed(java.lang.String name)
name -
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in interface TemplateGuiVIFl - The feature to be added to the PropertyChangeListener attributesetTemplateTreeModel(javax.swing.tree.TreeModel)
public void dumpToText(java.io.BufferedWriter buff)
throws java.io.IOException
dumpToText in interface TemplateGuiVIFbuff - The output buffer upon which to write the ascii version of the
templates.
java.io.IOException - Any exceptions related to writing to the parameter.
public void dumpToXML(java.io.BufferedWriter buff)
throws ConfigurationException
dumpToXML in interface TemplateGuiVIFbuff - BufferedWriter The output buffer of an XML file
ConfigurationException - Receive the exception from
MergeTemplateWriter
public void importFromText(java.io.BufferedReader buff)
throws java.io.IOException
importFromText in interface TemplateGuiVIFbuff -
java.io.IOExceptiondumpToText
public void importFromXML(java.io.Reader xmlFile)
throws ConfigurationException
importFromXML in interface TemplateGuiVIFxmlFile - FileReader The input stream of XML file
ConfigurationException - If any error happens in the XML file
processingdumpToTextpublic void loadModel()
loadModel in interface TemplateGuiVIFpublic void newModel()
newModel in interface TemplateGuiVIFpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerevt - public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in interface TemplateGuiVIFl - public void requestNewTemplate()
requestNewTemplate in interface TemplateGuiVIFpublic void requestTemplateDelete()
requestTemplateDelete in interface TemplateGuiVIFpublic void requestTemplateEdit()
requestTemplateEdit in interface TemplateGuiVIFpublic void saveCurrentModel()
saveCurrentModel in interface TemplateGuiVIFprotected void createTreeModel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||