Package adams.flow.sink.logview
Class AbstractLogEntryDialog
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.sink.logview.AbstractLogEntryDialog
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractLogEntryDialog>
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
DefaultLogEntryDialog
public abstract class AbstractLogEntryDialog extends AbstractOptionHandler implements ShallowCopySupporter<AbstractLogEntryDialog>
Ancestor for dialogs that view aLogEntry
.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Height
the height of the dialog.protected int
m_Width
the width of the dialog.-
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 AbstractLogEntryDialog()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BaseDialog
create(LogViewer parent, LogEntry entry)
Displays the dialog with the given entry.protected abstract BaseDialog
createDialog(LogEntry entry)
Creates the dialog.protected String
createTitle(LogEntry entry)
Generates a title for the entry.void
defineOptions()
Adds options to the internal list of options.protected int
getDefaultHeight()
Returns the default height for the dialog.protected String
getDefaultTitle()
Returns the default title for the dialog.protected int
getDefaultWidth()
Returns the default width for the dialog.int
getHeight()
Returns the currently set height of the dialog.int
getWidth()
Returns the currently set width of the dialog.String
heightTipText()
Returns the tip text for this property.protected void
postCreateDialog(LogViewer parent, LogEntry entry)
Hook method after the dialog gets created.protected void
preCreateDialog(LogViewer parent, LogEntry entry)
Hook method before the dialog gets created.void
setHeight(int value)
Sets the height of the dialog.void
setWidth(int value)
Sets the width of the dialog.AbstractLogEntryDialog
shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.AbstractLogEntryDialog
shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options.protected String
toString(LogEntry entry)
Turns the content into a string.String
widthTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
getDefaultWidth
protected int getDefaultWidth()
Returns the default width for the dialog.- Returns:
- the default width
-
getDefaultHeight
protected int getDefaultHeight()
Returns the default height for the dialog.- Returns:
- the default height
-
setWidth
public void setWidth(int value)
Sets the width of the dialog.- Parameters:
value
- the width
-
getWidth
public int getWidth()
Returns the currently set width of the dialog.- Returns:
- the width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHeight
public void setHeight(int value)
Sets the height of the dialog.- Parameters:
value
- the height
-
getHeight
public int getHeight()
Returns the currently set height of the dialog.- Returns:
- the height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultTitle
protected String getDefaultTitle()
Returns the default title for the dialog.- Returns:
- the title
-
toString
protected String toString(LogEntry entry)
Turns the content into a string.- Parameters:
entry
- the entry to turn into a string- Returns:
- the string representation
-
createTitle
protected String createTitle(LogEntry entry)
Generates a title for the entry.- Parameters:
entry
- the entry to create the title for- Returns:
- the title
-
preCreateDialog
protected void preCreateDialog(LogViewer parent, LogEntry entry)
Hook method before the dialog gets created.
Default implementation does nothing.- Parameters:
parent
- the parent actorentry
- the entry to display
-
createDialog
protected abstract BaseDialog createDialog(LogEntry entry)
Creates the dialog.- Parameters:
entry
- the entry to display- Returns:
- the dialog
-
postCreateDialog
protected void postCreateDialog(LogViewer parent, LogEntry entry)
Hook method after the dialog gets created.
Default implementation does nothing.- Parameters:
parent
- the parent actorentry
- the entry to display
-
create
public BaseDialog create(LogViewer parent, LogEntry entry)
Displays the dialog with the given entry.- Parameters:
parent
- the parent actorentry
- the entry to display- Returns:
- the dialog
-
shallowCopy
public AbstractLogEntryDialog shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopy
in interfaceShallowCopySupporter<AbstractLogEntryDialog>
- Returns:
- the shallow copy
-
shallowCopy
public AbstractLogEntryDialog shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopy
in interfaceShallowCopySupporter<AbstractLogEntryDialog>
- Parameters:
expand
- whether to expand variables to their current values- Returns:
- the shallow copy
-
-