C
- public class GenericComponentAddonUI<C extends Configuration> extends ComponentAddonUIAdapter<C>
Constructor and Description |
---|
GenericComponentAddonUI(java.lang.String typeIdentifier,
java.lang.Class<C> configurationClass,
java.lang.Class<? extends Component> componentInterface,
YouScopeClient client,
YouScopeServer server)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
commitChanges(C configuration)
Is called when the current state of all forms etc.
|
protected java.awt.Component |
createUI(C configuration)
Return a Component (typically a JPanel) containing the UI elements of the addon.
|
protected void |
initializeDefaultConfiguration(C configuration)
This function is called, and only called, if
AddonUIAdapter.toFrame() or AddonUIAdapter.toPanel(YouScopeFrame) is called without
calling before ComponentAddonUIAdapter.setConfiguration(Configuration) . |
addUIListener, closeAddon, createUI, getConfiguration, getConfigurationClass, removeUIListener, setConfiguration
addFrameListener, getAddonMetadata, getClient, getCloseButtonLabel, getContainingFrame, getMicroscope, getPreferredSize, getServer, getTitle, isInitialized, isMaximizable, isMaximize, isResizable, isSeparateFrame, isShowCloseButton, notifyLayoutChanged, removeFrameListener, sendErrorMessage, sendMessage, setCloseButtonLabel, setDescription, setMaximizable, setMaximize, setPreferredSize, setResizable, setShowCloseButton, setTitle, toFrame, toPanel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAddonMetadata
public GenericComponentAddonUI(java.lang.String typeIdentifier, java.lang.Class<C> configurationClass, java.lang.Class<? extends Component> componentInterface, YouScopeClient client, YouScopeServer server) throws AddonException
client
- Interface to the client.server
- Interface to the server.configurationClass
- the class of the configurations which should be configured.typeIdentifier
- The identifier of the configurations which should be configured. Must be the same as returned by configurationClass.getTypeIdentifier()
.componentInterface
- Interface of the component. Interface should be public.AddonException
protected java.awt.Component createUI(C configuration) throws AddonException
ComponentAddonUIAdapter
AddonUIAdapter.setShowCloseButton(boolean)
).createUI
in class ComponentAddonUIAdapter<C extends Configuration>
configuration
- The current configuration which should be loaded.AddonException
protected void commitChanges(C configuration)
ComponentAddonUIAdapter
commitChanges
in class ComponentAddonUIAdapter<C extends Configuration>
configuration
- The configuration in which changes should be saved.protected void initializeDefaultConfiguration(C configuration) throws AddonException
ComponentAddonUIAdapter
AddonUIAdapter.toFrame()
or AddonUIAdapter.toPanel(YouScopeFrame)
is called without
calling before ComponentAddonUIAdapter.setConfiguration(Configuration)
. The configuration should then be initialized to its default settings,
which may depend on the state of the microscope, etc.initializeDefaultConfiguration
in class ComponentAddonUIAdapter<C extends Configuration>
configuration
- Configuration to set to initial values.AddonException