Package adams.gui.tools.previewbrowser
Class AbstractSerializedObjectViewer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.previewbrowser.AbstractSerializedObjectViewer
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,SerializedObjectViewer
,Serializable
,Comparable<SerializedObjectViewer>
- Direct Known Subclasses:
DefaultSerializedObjectViewer
,GraphSource
,GraphVisualizer
,InterQuartileRangeViewer
,ObjectInspectionViewer
,TreeVisualizer
public abstract class AbstractSerializedObjectViewer extends AbstractOptionHandler implements SerializedObjectViewer
Ancestor for all serialized object viewers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractSerializedObjectViewer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(SerializedObjectViewer o)
Compares this object with the specified object for order.protected abstract PreviewPanel
createPreview(Object obj)
Creates the actual preview.boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one.JPanel
getPreview(Object obj)
Creates aPreviewPanel
for the given object.static String[]
getViewers()
Returns a list with classnames of handlers.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.gui.tools.previewbrowser.SerializedObjectViewer
handles
-
-
-
-
Method Detail
-
createPreview
protected abstract PreviewPanel createPreview(Object obj)
Creates the actual preview.- Parameters:
obj
- the object to create the preview for- Returns:
- the preview, null if failed to generate preview
-
getPreview
public JPanel getPreview(Object obj)
Creates aPreviewPanel
for the given object.- Specified by:
getPreview
in interfaceSerializedObjectViewer
- Parameters:
obj
- the object to create a preview for- Returns:
- the preview, null if failed to generate
-
compareTo
public int compareTo(SerializedObjectViewer o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Only compares the commandlines of the two objects.- Specified by:
compareTo
in interfaceComparable<SerializedObjectViewer>
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException
- if the specified object's type prevents it from being compared to this object.
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
Uses the commandline for comparison.
-
getViewers
public static String[] getViewers()
Returns a list with classnames of handlers.- Returns:
- the handler classnames
-
-