fedora.client.objecteditor
Class ImageContentViewer

java.lang.Object
  extended by fedora.client.objecteditor.ContentViewer
      extended by fedora.client.objecteditor.ImageContentViewer

public class ImageContentViewer
extends ContentViewer

Views content of common image formats in a JComponent.


Constructor Summary
ImageContentViewer()
           
 
Method Summary
 javax.swing.JComponent getComponent()
          Get the JComponent.
 java.lang.String[] getTypes()
          Returns a list of content types that this component can handle.
 void init(java.lang.String type, java.io.InputStream data, boolean viewOnly)
          Initializes the handler.
 void setContent(java.io.InputStream data)
          Re-initializes the handler given new input data.
 
Methods inherited from class fedora.client.objecteditor.ContentViewer
isEditor, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageContentViewer

public ImageContentViewer()
Method Detail

getComponent

public javax.swing.JComponent getComponent()
Get the JComponent.

Specified by:
getComponent in class ContentViewer

getTypes

public java.lang.String[] getTypes()
Returns a list of content types that this component can handle. This will usually be a list of MIME Types, but may also include other notions of type known to be understood by the users of ContentHandlerFactory.

Specified by:
getTypes in class ContentViewer

init

public void init(java.lang.String type,
                 java.io.InputStream data,
                 boolean viewOnly)
          throws java.io.IOException
Initializes the handler. This should only be called once per instance, and is guaranteed to have been called when this component is provided by the ContentHandlerFactory. The viewOnly parameter signals to ContentEditor implementations that editing capabilities are not desired by the caller.

Specified by:
init in class ContentViewer
Throws:
java.io.IOException

setContent

public void setContent(java.io.InputStream data)
                throws java.io.IOException
Re-initializes the handler given new input data. The old data can be discarded.

Specified by:
setContent in class ContentViewer
Throws:
java.io.IOException