Package de.espirit.firstspirit.module
Interface Configuration<E extends ServerEnvironment>
public interface Configuration<E extends ServerEnvironment>
Interface for configurable
components
.
Could provide a configuration graphical user environment.- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionReturns ComponentEnvironment@Nullable JComponent
Returns the configuration gui.
Do not use the provided frame instance as parent when opening a new window or dialog, this will result in invalid parent hierarchy and unreachable windows.@Nullable String
getParameter
(String name) Returns a specific parameter ornull
if it's not available.Returns all parameter names.boolean
hasGui()
Returnstrue
if this component has a gui to show and change it's configuration.void
Initializes this component with the givenenvironment
.void
load()
Loads the current configuration from appropriateconf directory
.void
store()
Stores the current configuration.
-
Method Details
-
hasGui
boolean hasGui()Returnstrue
if this component has a gui to show and change it's configuration.- Returns:
true
if this component has a gui to show and change it's configuration.- Since:
- 4.1
-
getGui
Returns the configuration gui.
Do not use the provided frame instance as parent when opening a new window or dialog, this will result in invalid parent hierarchy and unreachable windows. Get the active window instead, e.g. by requestingjava.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow()
.- Parameters:
applicationFrame
- Do not use, provided for compatibility reasons.- Returns:
- Configuration gui or
null
. - Since:
- 4.1
-
load
void load()Loads the current configuration from appropriateconf directory
. This should be done without any ui.- Since:
- 4.1
-
store
void store()Stores the current configuration.- Since:
- 4.1
-
getParameterNames
Returns all parameter names.- Returns:
- all parameter names.
- Since:
- 4.1
-
getParameter
Returns a specific parameter ornull
if it's not available.- Parameters:
name
- parameter name.- Returns:
- parameter or
null
. - Since:
- 4.1
-
init
Initializes this component with the givenenvironment
. This method is called before the instance is used.- Parameters:
moduleName
- module namecomponentName
- component nameenv
- useful environment information for this component.- Since:
- 4.1
-
getEnvironment
E getEnvironment()Returns ComponentEnvironment- Returns:
- ComponentEnvironment
- Since:
- 4.1
-