Package adams.gui.tools.previewbrowser
Interface ObjectContentHandler
-
- All Superinterfaces:
ContentHandler
,Destroyable
,OptionHandler
- All Known Implementing Classes:
AbstractObjectContentHandler
,ObjectAnnotationsReportHandler
,PlainTextHandler
,ReportHandler
public interface ObjectContentHandler extends ContentHandler
Interface for content handlers that can generate previews from objects as well, not just files.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
-
Fields inherited from interface adams.gui.tools.previewbrowser.ContentHandler
MATCH_ALL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canHandle(Class cls)
Checks whether the class is handled by this content handler.boolean
canHandle(Object obj)
Checks whether the object is handled by this content handler.PreviewPanel
createPreview(Object obj)
Creates the actual preview.PreviewPanel
getPreview(Object obj)
Returns the preview for the specified object.PreviewPanel
reusePreview(Object obj, PreviewPanel lastPreview)
Reuses the last preview, if possible.-
Methods inherited from interface adams.gui.tools.previewbrowser.ContentHandler
createPreview, getExtensions, getPreview, reusePreview
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
canHandle
boolean canHandle(Object obj)
Checks whether the object is handled by this content handler.- Parameters:
obj
- the object to check- Returns:
- true if handled
-
canHandle
boolean canHandle(Class cls)
Checks whether the class is handled by this content handler.- Parameters:
cls
- the class to check- Returns:
- true if handled
-
reusePreview
PreviewPanel reusePreview(Object obj, PreviewPanel lastPreview)
Reuses the last preview, if possible.- Parameters:
obj
- the object to create the view for- Returns:
- the preview
-
createPreview
PreviewPanel createPreview(Object obj)
Creates the actual preview.- Parameters:
obj
- the object to create the view for- Returns:
- the preview
-
getPreview
PreviewPanel getPreview(Object obj)
Returns the preview for the specified object.- Parameters:
obj
- the object to create the view for- Returns:
- the preview, NoPreviewAvailablePanel in case of an error
- See Also:
NoPreviewAvailablePanel
-
-