Class Crop
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.selection.AbstractSelectionProcessor
-
- adams.gui.visualization.image.selection.Crop
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<SelectionProcessor>,SizeOfHandler,ImagePanelSelectionListener,SelectionProcessor,Serializable,EventListener
public class Crop extends AbstractSelectionProcessor
Crops the image to the current selection and stores crop information in the report (prefix: Crop.). Offers undo/redo.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_HEIGHTthe height key.static StringKEY_WIDTHthe width key.static StringKEY_Xthe x key.static StringKEY_Ythe y key.static StringPREFIXthe prefix for the crop coordinates.-
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 Crop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoProcessSelection(ImagePanel panel, Point topLeft, Point bottomRight, List<Point> trace, int modifiersEx)Process the selection that occurred in the image panel.StringglobalInfo()Returns a string describing the object.-
Methods inherited from class adams.gui.visualization.image.selection.AbstractSelectionProcessor
check, doImageChanged, imageChanged, processSelection, selected, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
the prefix for the crop coordinates.- See Also:
- Constant Field Values
-
KEY_X
public static final String KEY_X
the x key.- See Also:
- Constant Field Values
-
KEY_Y
public static final String KEY_Y
the y key.- See Also:
- Constant Field Values
-
KEY_WIDTH
public static final String KEY_WIDTH
the width key.- See Also:
- Constant Field Values
-
KEY_HEIGHT
public static final String KEY_HEIGHT
the height key.- See Also:
- Constant Field Values
-
-
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
-
doProcessSelection
protected void doProcessSelection(ImagePanel panel, Point topLeft, Point bottomRight, List<Point> trace, int modifiersEx)
Process the selection that occurred in the image panel.- Specified by:
doProcessSelectionin classAbstractSelectionProcessor- Parameters:
panel- the origintopLeft- the top-left position of the selectionbottomRight- the bottom-right position of the selectiontrace- the trace from the selectionmodifiersEx- the associated modifiers
-
-