Package adams.gui.flow.tabhandler
Class RegisteredDisplaysHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.gui.flow.tabhandler.AbstractTabHandler
-
- adams.gui.flow.tabhandler.RegisteredDisplaysHandler
-
- All Implemented Interfaces:
CleanUpHandler,LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Serializable
public class RegisteredDisplaysHandler extends AbstractTabHandler
For managing registered displays.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class,HashMap<String,AbstractDisplay>>m_Displaysthe registered panels: class of panel - (name of panel - AbstractDisplay instance).-
Fields inherited from class adams.gui.flow.tabhandler.AbstractTabHandler
m_Owner
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RegisteredDisplaysHandler(FlowPanel owner)Initializes the tab handler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.voidclear()Removes all registered displays.AbstractDisplayderegister(Class cls, String name)Deregisters a display.voiddisplay()Gets called when the page changes.Map<Class,HashMap<String,AbstractDisplay>>getDisplays()Returns all currently registered displays.booleanhasDisplays()Returns whether there are any registered displays open.protected voidinitialize()Method for initializing member variables.AbstractDisplayregister(Class cls, String name, AbstractDisplay panel)Registers a display.protected voidupdate(boolean show)Notifies theRegisteredDisplaysTabinstance of a change.-
Methods inherited from class adams.gui.flow.tabhandler.AbstractTabHandler
getEditor, getMultiPage, getOwner
-
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Displays
protected Map<Class,HashMap<String,AbstractDisplay>> m_Displays
the registered panels: class of panel - (name of panel - AbstractDisplay instance).
-
-
Constructor Detail
-
RegisteredDisplaysHandler
public RegisteredDisplaysHandler(FlowPanel owner)
Initializes the tab handler- Parameters:
owner- the owning panel
-
-
Method Detail
-
initialize
protected void initialize()
Description copied from class:AbstractTabHandlerMethod for initializing member variables.- Overrides:
initializein classAbstractTabHandler
-
update
protected void update(boolean show)
Notifies theRegisteredDisplaysTabinstance of a change.- Parameters:
show- whether to show the tab or leave as is
-
register
public AbstractDisplay register(Class cls, String name, AbstractDisplay panel)
Registers a display.- Parameters:
cls- the class to register the display forname- the name of the displaypanel- the AbstractDisplay instance- Returns:
- the previously registered display, if any
-
deregister
public AbstractDisplay deregister(Class cls, String name)
Deregisters a display.- Parameters:
cls- the class to register the display forname- the name of the display- Returns:
- the deregistered display, if any
-
clear
public void clear()
Removes all registered displays.
-
getDisplays
public Map<Class,HashMap<String,AbstractDisplay>> getDisplays()
Returns all currently registered displays.- Returns:
- the displays
-
hasDisplays
public boolean hasDisplays()
Returns whether there are any registered displays open.- Returns:
- true if at least one open
-
display
public void display()
Gets called when the page changes.- Specified by:
displayin classAbstractTabHandler
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUpin interfaceCleanUpHandler- Specified by:
cleanUpin classAbstractTabHandler
-
-