Package net.sourceforge.jiu.apps
Class OperationProcessor
java.lang.Object
net.sourceforge.jiu.apps.OperationProcessor
- All Implemented Interfaces:
MenuIndexConstants
- Direct Known Subclasses:
AwtOperationProcessor
Abstract base class for performing JIU operations in combination
with an
EditorState
.- Author:
- Marco Schmidt
-
Field Summary
FieldsFields inherited from interface net.sourceforge.jiu.apps.MenuIndexConstants
COLOR, COLOR_ADJUST, COLOR_ADJUST_BRIGHTNESS, COLOR_ADJUST_CONTRAST, COLOR_ADJUST_GAMMA, COLOR_ADJUST_HUESATURATIONVALUE, COLOR_CONVERTTOMINIMUMCOLORTYPE, COLOR_HISTOGRAM, COLOR_HISTOGRAM_COUNTCOLORSUSED, COLOR_HISTOGRAM_EQUALIZE, COLOR_HISTOGRAM_NORMALIZE, COLOR_HISTOGRAM_SAVECOOCCURRENCEFREQUENCYMATRIXAS, COLOR_HISTOGRAM_SAVECOOCCURRENCEMATRIXAS, COLOR_HISTOGRAM_SAVEHISTOGRAMAS, COLOR_HISTOGRAM_TEXTUREPROPERTIES, COLOR_INVERT, COLOR_PALETTE, COLOR_PALETTE_SAVEAS, COLOR_PROMOTE, COLOR_PROMOTE_PROMOTETOGRAY16, COLOR_PROMOTE_PROMOTETOGRAY8, COLOR_PROMOTE_PROMOTETOPALETTED, COLOR_PROMOTE_PROMOTETORGB24, COLOR_PROMOTE_PROMOTETORGB48, COLOR_REDUCE, COLOR_REDUCE_CONVERTTOGRAYSCALE, COLOR_REDUCE_MAPTOARBITRARYPALETTE, COLOR_REDUCE_MEDIANCUT, COLOR_REDUCE_OCTREE, COLOR_REDUCE_REDUCENUMBEROFSHADESOFGRAY, COLOR_REDUCE_REDUCETOBILEVELTHRESHOLD, COLOR_REDUCE_UNIFORMPALETTE, EDIT, EDIT_REDO, EDIT_UNDO, FILE, FILE_CLOSE, FILE_EXIT, FILE_IMAGE_1, FILE_OPEN, FILE_SAVEAS, FILE_SAVEAS_GIF, FILE_SAVEAS_PALM, FILE_SAVEAS_PBM, FILE_SAVEAS_PGM, FILE_SAVEAS_PNG, FILE_SAVEAS_PPM, FILE_SAVEAS_SUNRASTER, FILE_SAVEAS_WINDOWSBMP, FILTERS, FILTERS_BLUR, FILTERS_EDGEDETECTION, FILTERS_EMBOSS, FILTERS_HORIZONTALPREWITT, FILTERS_HORIZONTALSOBEL, FILTERS_LITHOGRAPH, FILTERS_MAXIMUM, FILTERS_MEAN, FILTERS_MEDIAN, FILTERS_MINIMUM, FILTERS_OIL, FILTERS_PSYCHEDELICDISTILLATION, FILTERS_SHARPEN, FILTERS_VERTICALPREWITT, FILTERS_VERTICALSOBEL, HELP, HELP_ABOUT, HELP_SYSTEMINFORMATION, NUM_CONSTANTS, TRANSFORMATIONS, TRANSFORMATIONS_CROP, TRANSFORMATIONS_FLIP, TRANSFORMATIONS_MIRROR, TRANSFORMATIONS_ROTATE180, TRANSFORMATIONS_ROTATELEFT90, TRANSFORMATIONS_ROTATERIGHT90, TRANSFORMATIONS_SCALE, TRANSFORMATIONS_SHEAR, VIEW, VIEW_INTERPOLATIONTYPE, VIEW_INTERPOLATIONTYPE_BICUBIC, VIEW_INTERPOLATIONTYPE_BILINEAR, VIEW_INTERPOLATIONTYPE_NEARESTNEIGHBOR, VIEW_SETORIGINALSIZE, VIEW_ZOOMIN, VIEW_ZOOMOUT
-
Constructor Summary
ConstructorsConstructorDescriptionOperationProcessor
(EditorState editorState) Create an object of this class, storing the state argument for later use. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Adjust the brightness of the current image.abstract void
Adjust the contrast of the current image.abstract void
Adjust the gamma value of the current image.abstract void
Adjust hue, saturation and value of the current image.abstract void
abstract void
Count the number of colors used in the current image.abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
editRedo()
abstract void
editUndo()
abstract void
If there is an image loaded in the application, remove the image.abstract void
fileExit()
Terminate the application.abstract void
Load an image in the application.abstract void
Save the current image as a Windows BMP file.abstract void
Save the current image as a GIF file.abstract void
Save the current image as a Palm image file.abstract void
Save the current image as a Portable Bitmap file.abstract void
Save the current image as a Portable Graymap file.abstract void
Save the current image as a Portable Network Graphics file.abstract void
Save the current image as a Portable Pixmap file.abstract void
Save the current image as a Sun Raster file.abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
Returns the EditorState object given to this object's constructor.abstract void
Display information about the application: name, version, feedback email address, website.abstract void
Display information on the system this application is currently running on.boolean
isAvailable
(int menuIndex) Returns if the operation given by the menu index (fromMenuIndexConstants
is available regarding the current editor state.void
process
(int menuIndex) abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
abstract void
-
Field Details
-
state
-
-
Constructor Details
-
OperationProcessor
Create an object of this class, storing the state argument for later use.- Parameters:
editorState
- EditorState object to be used for processing
-
-
Method Details
-
colorAdjustBrightness
public abstract void colorAdjustBrightness()Adjust the brightness of the current image. -
colorAdjustContrast
public abstract void colorAdjustContrast()Adjust the contrast of the current image. -
colorAdjustGamma
public abstract void colorAdjustGamma()Adjust the gamma value of the current image. -
colorAdjustHueSaturationValue
public abstract void colorAdjustHueSaturationValue()Adjust hue, saturation and value of the current image. -
colorHistogramCountColorsUsed
public abstract void colorHistogramCountColorsUsed()Count the number of colors used in the current image. -
colorHistogramEqualize
public abstract void colorHistogramEqualize() -
colorHistogramNormalize
public abstract void colorHistogramNormalize() -
colorHistogramTextureProperties
public abstract void colorHistogramTextureProperties() -
colorHistogramSaveHistogramAs
public abstract void colorHistogramSaveHistogramAs() -
colorHistogramSaveCoOccurrenceMatrixAs
public abstract void colorHistogramSaveCoOccurrenceMatrixAs() -
colorHistogramSaveCoOccurrenceFrequencyMatrixAs
public abstract void colorHistogramSaveCoOccurrenceFrequencyMatrixAs() -
colorPaletteSaveAs
public abstract void colorPaletteSaveAs() -
colorPromotePromoteToPaletted
public abstract void colorPromotePromoteToPaletted() -
colorPromotePromoteToGray8
public abstract void colorPromotePromoteToGray8() -
colorPromotePromoteToGray16
public abstract void colorPromotePromoteToGray16() -
colorPromotePromoteToRgb24
public abstract void colorPromotePromoteToRgb24() -
colorPromotePromoteToRgb48
public abstract void colorPromotePromoteToRgb48() -
colorReduceReduceNumberOfShadesOfGray
public abstract void colorReduceReduceNumberOfShadesOfGray() -
colorReduceConvertToGrayscale
public abstract void colorReduceConvertToGrayscale() -
colorReduceMedianCut
public abstract void colorReduceMedianCut() -
colorReduceOctree
public abstract void colorReduceOctree() -
colorReduceReduceToBilevelThreshold
public abstract void colorReduceReduceToBilevelThreshold() -
colorReduceUniformPalette
public abstract void colorReduceUniformPalette() -
colorReduceMapToArbitraryPalette
public abstract void colorReduceMapToArbitraryPalette() -
colorConvertToMinimumColorType
public abstract void colorConvertToMinimumColorType() -
colorInvert
public abstract void colorInvert() -
editRedo
public abstract void editRedo() -
editUndo
public abstract void editUndo() -
filtersBlur
public abstract void filtersBlur() -
filtersSharpen
public abstract void filtersSharpen() -
filtersEdgeDetection
public abstract void filtersEdgeDetection() -
filtersEmboss
public abstract void filtersEmboss() -
filtersPsychedelicDistillation
public abstract void filtersPsychedelicDistillation() -
filtersLithograph
public abstract void filtersLithograph() -
filtersHorizontalSobel
public abstract void filtersHorizontalSobel() -
filtersVerticalSobel
public abstract void filtersVerticalSobel() -
filtersHorizontalPrewitt
public abstract void filtersHorizontalPrewitt() -
filtersVerticalPrewitt
public abstract void filtersVerticalPrewitt() -
filtersMaximum
public abstract void filtersMaximum() -
filtersMedian
public abstract void filtersMedian() -
filtersMean
public abstract void filtersMean() -
filtersMinimum
public abstract void filtersMinimum() -
filtersOil
public abstract void filtersOil() -
transformationsFlip
public abstract void transformationsFlip() -
transformationsMirror
public abstract void transformationsMirror() -
transformationsRotate90Left
public abstract void transformationsRotate90Left() -
transformationsRotate90Right
public abstract void transformationsRotate90Right() -
transformationsRotate180
public abstract void transformationsRotate180() -
transformationsCrop
public abstract void transformationsCrop() -
transformationsShear
public abstract void transformationsShear() -
transformationsScale
public abstract void transformationsScale() -
viewInterpolationTypeBicubic
public abstract void viewInterpolationTypeBicubic() -
viewInterpolationTypeBilinear
public abstract void viewInterpolationTypeBilinear() -
viewInterpolationTypeNearestNeighbor
public abstract void viewInterpolationTypeNearestNeighbor() -
viewZoomIn
public abstract void viewZoomIn() -
viewZoomOut
public abstract void viewZoomOut() -
viewSetOriginalSize
public abstract void viewSetOriginalSize() -
fileClose
public abstract void fileClose()If there is an image loaded in the application, remove the image. -
fileExit
public abstract void fileExit()Terminate the application. If changes were not saved, the user should be asked whether these changes should be discarded. -
fileOpen
Load an image in the application. -
fileSaveAsBmp
public abstract void fileSaveAsBmp()Save the current image as a Windows BMP file. -
fileSaveAsGif
public abstract void fileSaveAsGif()Save the current image as a GIF file. -
fileSaveAsPalm
public abstract void fileSaveAsPalm()Save the current image as a Palm image file. -
fileSaveAsPbm
public abstract void fileSaveAsPbm()Save the current image as a Portable Bitmap file. -
fileSaveAsPgm
public abstract void fileSaveAsPgm()Save the current image as a Portable Graymap file. -
fileSaveAsPng
public abstract void fileSaveAsPng()Save the current image as a Portable Network Graphics file. -
fileSaveAsPpm
public abstract void fileSaveAsPpm()Save the current image as a Portable Pixmap file. -
fileSaveAsRas
public abstract void fileSaveAsRas()Save the current image as a Sun Raster file. -
getEditorState
Returns the EditorState object given to this object's constructor.- Returns:
- EditorState object used by this processor
-
helpAbout
public abstract void helpAbout()Display information about the application: name, version, feedback email address, website. -
helpSystemInformation
public abstract void helpSystemInformation()Display information on the system this application is currently running on. -
isAvailable
public boolean isAvailable(int menuIndex) Returns if the operation given by the menu index (fromMenuIndexConstants
is available regarding the current editor state. This method is used to update the enabled status of menu items so that they reflect what can be done in the current state of an application. Thus, things that cannot be done cannot be chosen in the menu because they are disabled. Example: the File | Save as... items are disabled as long as there is no image loaded, simply because there is nothing to save.- Parameters:
menuIndex
- index of menu item to be checked- Returns:
- whether the operation is available (if true, menu item should be enabled)
-
process
public void process(int menuIndex)
-