Class Brightness
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.plugin.AbstractToolPlugin<ImagePanel>
-
- adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
-
- adams.gui.visualization.image.plugins.AbstractImageViewerPluginWithRestore
-
- adams.gui.visualization.image.plugins.Brightness
-
- All Implemented Interfaces:
LoggingSupporter,SizeOfHandler,Serializable
public class Brightness extends AbstractImageViewerPluginWithRestore
Allows the user to change the brightness of an image.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBrightness.BrightnessDialogDialog that allows user to change brightness of image (and preview it).
-
Field Summary
Fields Modifier and Type Field Description protected Brightnessm_Brightnessthe current setup for changing the brightness.-
Fields inherited from class adams.gui.visualization.image.plugins.AbstractImageViewerPluginWithRestore
m_Backup
-
Fields inherited from class adams.gui.plugin.AbstractToolPlugin
m_CanceledByUser, m_CurrentPanel, m_LastSetup
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Brightness()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringapply(Brightness brightness)Applies the brightness setup to the current image.booleancanExecute(ImagePanel panel)Checks whether the plugin can be executed given the specified image panel.protected StringcreateLogEntry()Creates the log message.protected StringdoInteract()The actual interaction with the user.StringgetCaption()Returns the text for the menu item to create.StringgetIconName()Returns the icon name.StringgetMenu()Returns the text for the menu to place the plugin beneath.-
Methods inherited from class adams.gui.visualization.image.plugins.AbstractImageViewerPluginWithRestore
backup, doExecute, getBackup, restore
-
Methods inherited from class adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
doLog
-
Methods inherited from class adams.gui.plugin.AbstractToolPlugin
execute, getCanceledByUser, getIcon, getLastSetup, hasLastSetup, log, setLastSetup
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Brightness
protected Brightness m_Brightness
the current setup for changing the brightness.
-
-
Method Detail
-
getMenu
public String getMenu()
Returns the text for the menu to place the plugin beneath.- Overrides:
getMenuin classAbstractToolPlugin<ImagePanel>- Returns:
- the menu
-
getCaption
public String getCaption()
Returns the text for the menu item to create.- Specified by:
getCaptionin classAbstractToolPlugin<ImagePanel>- Returns:
- the text
-
getIconName
public String getIconName()
Returns the icon name.- Overrides:
getIconNamein classAbstractToolPlugin<ImagePanel>- Returns:
- the name, null if none available
-
canExecute
public boolean canExecute(ImagePanel panel)
Checks whether the plugin can be executed given the specified image panel.- Specified by:
canExecutein classAbstractToolPlugin<ImagePanel>- Parameters:
panel- the panel to use as basis for decision- Returns:
- true if plugin can be executed
-
createLogEntry
protected String createLogEntry()
Creates the log message.- Specified by:
createLogEntryin classAbstractToolPlugin<ImagePanel>- Returns:
- the message, null if none available
-
apply
protected String apply(Brightness brightness)
Applies the brightness setup to the current image.- Parameters:
brightness- the setup to apply- Returns:
- null if successful, otherwise error message
-
doInteract
protected String doInteract()
The actual interaction with the user.- Specified by:
doInteractin classAbstractImageViewerPluginWithRestore- Returns:
- null if OK, otherwise error message
-
-