fedora.client.objecteditor
Class ContentEditor

java.lang.Object
  extended by fedora.client.objecteditor.ContentViewer
      extended by fedora.client.objecteditor.ContentEditor
Direct Known Subclasses:
TextContentEditor

public abstract class ContentEditor
extends ContentViewer

Edit content of certain types in a JComponent.


Constructor Summary
ContentEditor()
           
 
Method Summary
abstract  void changesSaved()
          Called when the caller wants what is in the view to be considered "not dirty" because it's been saved that way.
abstract  java.io.InputStream getContent()
          Gets the content in its edited state.
abstract  boolean isDirty()
          Returns true if the content should be considered "dirty" (e.g.
 boolean isEditor()
          Always returns true.
abstract  void setContentChangeListener(java.awt.event.ActionListener listener)
          Sets the listener that this ContentEditor will notify via listener.actionPerformed(...) when any content-changing events occur that could potentially affect its "dirty state" (whether going from not dirty to dirty, or dirty to not dirty).
abstract  void undoChanges()
          Called when the caller wants to update the view back to the data was originally passed in.
 
Methods inherited from class fedora.client.objecteditor.ContentViewer
getComponent, getTypes, init, newInstance, setContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentEditor

public ContentEditor()
Method Detail

isEditor

public final boolean isEditor()
Always returns true.

Overrides:
isEditor in class ContentViewer

changesSaved

public abstract void changesSaved()
Called when the caller wants what is in the view to be considered "not dirty" because it's been saved that way.


undoChanges

public abstract void undoChanges()
Called when the caller wants to update the view back to the data was originally passed in.


isDirty

public abstract boolean isDirty()
Returns true if the content should be considered "dirty" (e.g. it has changed due to some form of editing).


setContentChangeListener

public abstract void setContentChangeListener(java.awt.event.ActionListener listener)
Sets the listener that this ContentEditor will notify via listener.actionPerformed(...) when any content-changing events occur that could potentially affect its "dirty state" (whether going from not dirty to dirty, or dirty to not dirty).


getContent

public abstract java.io.InputStream getContent()
                                        throws java.io.IOException
Gets the content in its edited state.

Throws:
java.io.IOException