Class FromFile
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Watermark,Serializable
public class FromFile extends AbstractImageWatermark
Uses the specified image file as watermark.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderFilem_ImageFilethe image file.-
Fields inherited from class adams.gui.visualization.watermark.AbstractImageWatermark
m_Alpha, m_Image, m_Initialized, m_Location, m_Padding, m_Scale, m_X, m_Y
-
Fields inherited from class adams.gui.visualization.watermark.AbstractWatermark
m_Enabled
-
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 FromFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.PlaceholderFilegetImageFile()Returns the image to load, ignored if pointing to a directory.StringglobalInfo()Returns a string describing the object.StringimageFileTipText()Returns the tip text for this property.protected ImageloadImage()Loads the image.voidsetImageFile(PlaceholderFile value)Sets the image to load, ignored if pointing to a directory.-
Methods inherited from class adams.gui.visualization.watermark.AbstractImageWatermark
alphaTipText, canApplyWatermark, doApplyWatermark, getAlpha, getDefaultAlpha, getDefaultLocation, getDefaultPadding, getDefaultScale, getDefaultX, getDefaultY, getLocation, getPadding, getScale, getX, getY, initializeImage, locationTipText, paddingTipText, reset, scaleTipText, setAlpha, setLocation, setPadding, setScale, setX, setY, XTipText, YTipText
-
Methods inherited from class adams.gui.visualization.watermark.AbstractWatermark
applyWatermark, enabledTipText, getEnabled, setEnabled
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, 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
-
-
-
-
Field Detail
-
m_ImageFile
protected PlaceholderFile m_ImageFile
the image file.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractImageWatermark
-
setImageFile
public void setImageFile(PlaceholderFile value)
Sets the image to load, ignored if pointing to a directory.- Parameters:
value- the file
-
getImageFile
public PlaceholderFile getImageFile()
Returns the image to load, ignored if pointing to a directory.- Returns:
- the file
-
imageFileTipText
public String imageFileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
loadImage
protected Image loadImage()
Loads the image.- Specified by:
loadImagein classAbstractImageWatermark- Returns:
- the image, null if failed to load
-
-