|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.morpho.plugins.metadisplay.MetaDisplay
Top-level controller/Mediator class for an instance of a metadata display panel.
Field Summary | |
static java.lang.String |
BLANK_HTML_PAGE
|
Fields inherited from interface edu.ucsb.nceas.morpho.plugins.MetaDisplayInterface |
CLOSE_EVENT,
EDIT_BEGIN_EVENT,
HISTORY_BACK_EVENT,
NAVIGATION_EVENT |
Constructor Summary | |
MetaDisplay()
constructor |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Register a java.awt.event.ActionListener to listen for
events |
void |
addEditingCompleteListener(EditingCompleteListener listener)
Register an EditingCompleteListener to listen for editor
events |
void |
display(java.lang.String identifier)
method to display metadata in an existing instance of a visual component (metadata identified by the identifier parameter). |
void |
display(java.lang.String identifier,
java.io.Reader XMLDocument)
method to display metadata in an existing instance of a visual component (metadata is provided as a Reader (the "XMLDocument" parameter), and a required corresponding unique identifier parameter) that
can subsequently be used by this component to get the latest instance of
the same "XMLDocument" from the XMLFactoryInterface. |
void |
displayPrevious()
method to redisplay the previous metadata document from History, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it |
void |
editingCanceled(java.lang.String xmlString,
java.lang.String id,
java.lang.String location)
Required by EditingCompleteListener Interface:
this method handles canceled editing |
void |
editingCompleted(java.lang.String xmlString,
java.lang.String id,
java.lang.String location)
Required by EditingCompleteListener Interface:
This method is called when editing is complete |
protected void |
fireActionEvent(int descriptionInt,
java.lang.String commandStr)
Does callback to actionPerformed() method of each
java.awt.event.ActionListener in the list of registered
listeners. |
java.awt.Component |
getDisplayComponent(java.lang.String identifier,
XMLFactoryInterface factory,
java.awt.event.ActionListener listener)
method used to obtain a visual component (a descendent of java.awt.Component , which will display the XML resource
identified by the identifier parameter. |
java.awt.Component |
getDisplayComponent(XMLFactoryInterface factory,
java.awt.event.ActionListener listener)
method used to obtain a visual component (a descendent of java.awt.Component , which will subsequently display the XML
resources identified by unique string IDs. |
XMLFactoryInterface |
getFactory()
Get the current XML factory, used to resolve IDs into XML documents |
protected History |
getHistory()
|
java.lang.String |
getIdentifier()
Get the String identifier associated with the
currently-displayed metadata |
protected MetaDisplayUI |
getMetaDisplayUI()
|
java.lang.String |
getTransformerProperty(java.lang.String key)
method to get the transformer property value corresponding to the passed key |
void |
redisplay()
method to redisplay the current metadata, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it |
void |
removeActionListener(java.awt.event.ActionListener listener)
Remove this java.awt.event.ActionListener from the list of
registered listeners |
void |
removeEditingCompleteListener(EditingCompleteListener listener)
Remove this EditingCompleteListener from the list of
registered listeners |
void |
setFactory(XMLFactoryInterface factory)
Set the current XML factory, used to resolve IDs into XML documents |
void |
setTitle(java.lang.String title)
Set the title in the titlebar |
void |
useTransformerProperty(java.lang.String key,
java.lang.String value)
method to add a key/value transformer property pair to the properties that will be passed onto the XSL Transformation Engine, and will then be made available to the actual XSL stylesheets as |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String BLANK_HTML_PAGE
Constructor Detail |
public MetaDisplay()
Method Detail |
public java.awt.Component getDisplayComponent(java.lang.String identifier, XMLFactoryInterface factory, java.awt.event.ActionListener listener) throws NullArgumentException, DocumentNotFoundException
java.awt.Component
, which will display the XML resource
identified by the identifier
parameter.identifier
- a unique identifier used to determine what resource
to returnfactory
- an instance of a class that implements
XMLFactoryInterface
to enable this obj
to obtain the actual XML document to display, given
the identifier
parameterlistener
- an ActionListener
to be notified of all
events generated by this objjava.awt.Component
, which will display
the XML resource identified by the
identifier
parameter.public java.awt.Component getDisplayComponent(XMLFactoryInterface factory, java.awt.event.ActionListener listener) throws NullArgumentException
java.awt.Component
, which will subsequently display the XML
resources identified by unique string IDs. However, the initial
instance of the component returned by this method will be blank.factory
- an instance of a class that implements
XMLFactoryInterface
to enable this obj
to obtain the actual XML document to display, given
unique identifier
parameterslistener
- an ActionListener
to be notified of all
events generated by this objjava.awt.Component
, which is currently
blank, but can subsequently be used to display the
XML resources identified by unique
identifier
parameters.public void display(java.lang.String identifier) throws DocumentNotFoundException
identifier
parameter).identifier
- a unique identifier used to determine what resource
to returnpublic void display(java.lang.String identifier, java.io.Reader XMLDocument) throws NullArgumentException, DocumentNotFoundException
identifier
parameter) that
can subsequently be used by this component to get the latest instance of
the same "XMLDocument" from the XMLFactoryInterface.identifier
- a unique identifier that can subsequently be used by
this component to get the latest instance of the
same "XMLDocument" from the XMLFactoryInterfaceXMLDocument
- a Reader for the character-based XML documentpublic void displayPrevious() throws DocumentNotFoundException
public void redisplay() throws DocumentNotFoundException
public void addActionListener(java.awt.event.ActionListener listener)
java.awt.event.ActionListener
to listen for
eventslistener
- public void removeActionListener(java.awt.event.ActionListener listener)
java.awt.event.ActionListener
from the list of
registered listenerslistener
- protected void fireActionEvent(int descriptionInt, java.lang.String commandStr)
actionPerformed()
method of each
java.awt.event.ActionListener
in the list of registered
listeners.descriptionInt
- integer describing the type of event; eg:
descriptionInt
- String description of the event that will allow
listeners to determine specific information
about the action and act accordingly. Could be
any unique string identifierMetaDisplayInterface
public void addEditingCompleteListener(EditingCompleteListener listener)
EditingCompleteListener
to listen for editor
eventslistener
- public void removeEditingCompleteListener(EditingCompleteListener listener)
EditingCompleteListener
from the list of
registered listenerslistener
- public void editingCompleted(java.lang.String xmlString, java.lang.String id, java.lang.String location)
EditingCompleteListener
Interface:
This method is called when editing is completexmlString
- is the edited XML in String formatpublic void editingCanceled(java.lang.String xmlString, java.lang.String id, java.lang.String location)
EditingCompleteListener
Interface:
this method handles canceled editingpublic XMLFactoryInterface getFactory()
XMLFactoryInterface
to enable this obj
to obtain the actual XML document to display, given
the identifier
parameterpublic void setFactory(XMLFactoryInterface factory) throws NullArgumentException
factory
- an instance of a class that implements
XMLFactoryInterface
to enable this obj
to obtain the actual XML document to display, given
the identifier
parameterprotected History getHistory()
public java.lang.String getIdentifier()
String
identifier associated with the
currently-displayed metadataString
identifier associated with the
currently-displayed metadatapublic void useTransformerProperty(java.lang.String key, java.lang.String value)
key
- value
- public java.lang.String getTransformerProperty(java.lang.String key)
key
- String
value associated with the passed keyprotected MetaDisplayUI getMetaDisplayUI()
public void setTitle(java.lang.String title)
identifier
- String
title to be set in the titlebar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |