Class AbstractWidget
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.gui.tools.spreadsheetprocessor.AbstractWidget
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Serializable,Comparable<AbstractWidget>
- Direct Known Subclasses:
AbstractProcessor,AbstractSource,AbstractTarget
public abstract class AbstractWidget extends CustomLoggingLevelObject implements Comparable<AbstractWidget>
Ancestor for widgets.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetProcessorPanelm_Ownerthe owner.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractWidget()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidassign(AbstractWidget other)Retrieves the values from the other widget, if possible.intcompareTo(AbstractWidget o)Compares the two widgets using their name.abstract voiddeserialize(Object data, MessageCollection errors)Deserializes the setup and maps it onto the widget.booleanequals(Object obj)Compares equality based on the widget name.abstract StringgetName()Returns the name of the widget.SpreadSheetProcessorPanelgetOwner()Returns the owner.abstract ComponentgetWidget()Returns the widget.protected voidnotifyOwner(SpreadSheetProcessorEvent.EventType type, String message)Notifies the owner.abstract Objectserialize()Serializes the setup from the widget.voidsetOwner(SpreadSheetProcessorPanel value)Sets the owner.StringtoString()Returns the name of the widget.abstract voidupdate()Updates the widget.-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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
-
-
-
-
Field Detail
-
m_Owner
protected SpreadSheetProcessorPanel m_Owner
the owner.
-
-
Method Detail
-
setOwner
public void setOwner(SpreadSheetProcessorPanel value)
Sets the owner.- Parameters:
value- the owner
-
getOwner
public SpreadSheetProcessorPanel getOwner()
Returns the owner.- Returns:
- the owner
-
getName
public abstract String getName()
Returns the name of the widget.- Returns:
- the name
-
getWidget
public abstract Component getWidget()
Returns the widget.- Returns:
- the widget
-
update
public abstract void update()
Updates the widget.
-
toString
public String toString()
Returns the name of the widget.
-
assign
public abstract void assign(AbstractWidget other)
Retrieves the values from the other widget, if possible.- Parameters:
other- the other widget to get the values from
-
serialize
public abstract Object serialize()
Serializes the setup from the widget.- Returns:
- the generated setup representation
-
deserialize
public abstract void deserialize(Object data, MessageCollection errors)
Deserializes the setup and maps it onto the widget.- Parameters:
data- the setup representation to useerrors- for collecting errors
-
notifyOwner
protected void notifyOwner(SpreadSheetProcessorEvent.EventType type, String message)
Notifies the owner.- Parameters:
type- the type of eventmessage- the optional message, can be null
-
compareTo
public int compareTo(AbstractWidget o)
Compares the two widgets using their name.- Specified by:
compareToin interfaceComparable<AbstractWidget>- Parameters:
o- the other widget- Returns:
- the result of the name comparison
-
-