Package net.sourceforge.jiu.gui.awt
Class AwtOperationProcessor
- java.lang.Object
-
- net.sourceforge.jiu.apps.OperationProcessor
-
- net.sourceforge.jiu.gui.awt.AwtOperationProcessor
-
- All Implemented Interfaces:
MenuIndexConstants
public class AwtOperationProcessor extends OperationProcessor
Performs operations specified by parent classOperationProcessor, uses various AWT dialogs to get parameters from user in a GUI application.- Since:
- 0.8.0
- Author:
- Marco Schmidt
-
-
Field Summary
Fields Modifier and Type Field Description private JiuAwtFrameframe-
Fields 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
Constructors Constructor Description AwtOperationProcessor(EditorState editorState, JiuAwtFrame awtFrame)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcolorAdjustBrightness()Adjust the brightness of the current image.voidcolorAdjustContrast()Adjust the contrast of the current image.voidcolorAdjustGamma()Adjust the gamma value of the current image.voidcolorAdjustHueSaturationValue()Adjust hue, saturation and value of the current image.voidcolorConvertToMinimumColorType()voidcolorHistogramCountColorsUsed()Count the number of colors used in the current image.voidcolorHistogramEqualize()voidcolorHistogramNormalize()voidcolorHistogramSaveCoOccurrenceFrequencyMatrixAs()voidcolorHistogramSaveCoOccurrenceMatrixAs()voidcolorHistogramSaveHistogramAs()voidcolorHistogramTextureProperties()voidcolorInvert()voidcolorPaletteSaveAs()voidcolorPromotePromoteToGray16()voidcolorPromotePromoteToGray8()voidcolorPromotePromoteToPaletted()voidcolorPromotePromoteToRgb24()voidcolorPromotePromoteToRgb48()voidcolorReduceConvertToGrayscale()voidcolorReduceMapToArbitraryPalette()voidcolorReduceMedianCut()voidcolorReduceOctree()voidcolorReduceReduceNumberOfShadesOfGray()voidcolorReduceReduceToBilevelThreshold()voidcolorReduceUniformPalette()private intconvertUniformToErrorDiffusion(int utype)voideditRedo()voideditUndo()voidfileClose()If there is an image loaded in the application, remove the image.voidfileExit()Terminate the application.voidfileOpen(String uri)Load an image in the application.voidfileSaveAsBmp()Save the current image as a Windows BMP file.voidfileSaveAsGif()Save the current image as a GIF file.voidfileSaveAsPalm()Save the current image as a Palm image file.voidfileSaveAsPbm()Save the current image as a Portable Bitmap file.voidfileSaveAsPgm()Save the current image as a Portable Graymap file.voidfileSaveAsPng()Save the current image as a Portable Network Graphics file.private voidfileSaveAsPnm()voidfileSaveAsPpm()Save the current image as a Portable Pixmap file.voidfileSaveAsRas()Save the current image as a Sun Raster file.voidfilterConvolutionFilter(int type)voidfiltersBlur()voidfiltersEdgeDetection()voidfiltersEmboss()voidfiltersHorizontalPrewitt()voidfiltersHorizontalSobel()voidfiltersLithograph()voidfiltersMaximum()voidfiltersMean()voidfiltersMedian()voidfiltersMinimum()voidfiltersOil()voidfiltersPsychedelicDistillation()voidfiltersSharpen()voidfiltersVerticalPrewitt()voidfiltersVerticalSobel()StringgetUserFileName(String extension, int titleIndex, int fileDialogType)StringgetUserSaveAsFileName(String extension, int titleIndex)voidhelpAbout()Display information about the application: name, version, feedback email address, website.voidhelpSystemInformation()Display information on the system this application is currently running on.voidprocess(ImageToImageOperation op)This method can be called for ImageToImageOperation objects.voidsetImage(PixelImage newImage, boolean newModified)voidtransformationsCrop()voidtransformationsFlip()voidtransformationsMirror()voidtransformationsRotate180()voidtransformationsRotate90Left()voidtransformationsRotate90Right()voidtransformationsScale()voidtransformationsShear()voidupdateFrame(PixelImage image)voidviewInterpolationTypeBicubic()voidviewInterpolationTypeBilinear()voidviewInterpolationTypeNearestNeighbor()voidviewSetOriginalSize()voidviewZoomIn()voidviewZoomOut()-
Methods inherited from class net.sourceforge.jiu.apps.OperationProcessor
getEditorState, isAvailable, process
-
-
-
-
Field Detail
-
frame
private JiuAwtFrame frame
-
-
Constructor Detail
-
AwtOperationProcessor
public AwtOperationProcessor(EditorState editorState, JiuAwtFrame awtFrame)
-
-
Method Detail
-
colorAdjustBrightness
public void colorAdjustBrightness()
Description copied from class:OperationProcessorAdjust the brightness of the current image.- Specified by:
colorAdjustBrightnessin classOperationProcessor
-
colorAdjustContrast
public void colorAdjustContrast()
Description copied from class:OperationProcessorAdjust the contrast of the current image.- Specified by:
colorAdjustContrastin classOperationProcessor
-
colorAdjustGamma
public void colorAdjustGamma()
Description copied from class:OperationProcessorAdjust the gamma value of the current image.- Specified by:
colorAdjustGammain classOperationProcessor
-
colorAdjustHueSaturationValue
public void colorAdjustHueSaturationValue()
Description copied from class:OperationProcessorAdjust hue, saturation and value of the current image.- Specified by:
colorAdjustHueSaturationValuein classOperationProcessor
-
colorHistogramCountColorsUsed
public void colorHistogramCountColorsUsed()
Description copied from class:OperationProcessorCount the number of colors used in the current image.- Specified by:
colorHistogramCountColorsUsedin classOperationProcessor
-
colorHistogramEqualize
public void colorHistogramEqualize()
- Specified by:
colorHistogramEqualizein classOperationProcessor
-
colorHistogramNormalize
public void colorHistogramNormalize()
- Specified by:
colorHistogramNormalizein classOperationProcessor
-
colorHistogramTextureProperties
public void colorHistogramTextureProperties()
- Specified by:
colorHistogramTexturePropertiesin classOperationProcessor
-
colorHistogramSaveHistogramAs
public void colorHistogramSaveHistogramAs()
- Specified by:
colorHistogramSaveHistogramAsin classOperationProcessor
-
colorHistogramSaveCoOccurrenceMatrixAs
public void colorHistogramSaveCoOccurrenceMatrixAs()
- Specified by:
colorHistogramSaveCoOccurrenceMatrixAsin classOperationProcessor
-
colorHistogramSaveCoOccurrenceFrequencyMatrixAs
public void colorHistogramSaveCoOccurrenceFrequencyMatrixAs()
- Specified by:
colorHistogramSaveCoOccurrenceFrequencyMatrixAsin classOperationProcessor
-
colorPaletteSaveAs
public void colorPaletteSaveAs()
- Specified by:
colorPaletteSaveAsin classOperationProcessor
-
colorPromotePromoteToPaletted
public void colorPromotePromoteToPaletted()
- Specified by:
colorPromotePromoteToPalettedin classOperationProcessor
-
colorPromotePromoteToGray8
public void colorPromotePromoteToGray8()
- Specified by:
colorPromotePromoteToGray8in classOperationProcessor
-
colorPromotePromoteToGray16
public void colorPromotePromoteToGray16()
- Specified by:
colorPromotePromoteToGray16in classOperationProcessor
-
colorPromotePromoteToRgb24
public void colorPromotePromoteToRgb24()
- Specified by:
colorPromotePromoteToRgb24in classOperationProcessor
-
colorPromotePromoteToRgb48
public void colorPromotePromoteToRgb48()
- Specified by:
colorPromotePromoteToRgb48in classOperationProcessor
-
colorReduceReduceNumberOfShadesOfGray
public void colorReduceReduceNumberOfShadesOfGray()
- Specified by:
colorReduceReduceNumberOfShadesOfGrayin classOperationProcessor
-
colorReduceConvertToGrayscale
public void colorReduceConvertToGrayscale()
- Specified by:
colorReduceConvertToGrayscalein classOperationProcessor
-
colorReduceMedianCut
public void colorReduceMedianCut()
- Specified by:
colorReduceMedianCutin classOperationProcessor
-
colorInvert
public void colorInvert()
- Specified by:
colorInvertin classOperationProcessor
-
colorConvertToMinimumColorType
public void colorConvertToMinimumColorType()
- Specified by:
colorConvertToMinimumColorTypein classOperationProcessor
-
colorReduceOctree
public void colorReduceOctree()
- Specified by:
colorReduceOctreein classOperationProcessor
-
colorReduceReduceToBilevelThreshold
public void colorReduceReduceToBilevelThreshold()
- Specified by:
colorReduceReduceToBilevelThresholdin classOperationProcessor
-
convertUniformToErrorDiffusion
private int convertUniformToErrorDiffusion(int utype)
-
colorReduceUniformPalette
public void colorReduceUniformPalette()
- Specified by:
colorReduceUniformPalettein classOperationProcessor
-
colorReduceMapToArbitraryPalette
public void colorReduceMapToArbitraryPalette()
- Specified by:
colorReduceMapToArbitraryPalettein classOperationProcessor
-
editRedo
public void editRedo()
- Specified by:
editRedoin classOperationProcessor
-
editUndo
public void editUndo()
- Specified by:
editUndoin classOperationProcessor
-
fileClose
public void fileClose()
Description copied from class:OperationProcessorIf there is an image loaded in the application, remove the image.- Specified by:
fileClosein classOperationProcessor
-
fileExit
public void fileExit()
Description copied from class:OperationProcessorTerminate the application. If changes were not saved, the user should be asked whether these changes should be discarded.- Specified by:
fileExitin classOperationProcessor
-
fileOpen
public void fileOpen(String uri)
Description copied from class:OperationProcessorLoad an image in the application.- Specified by:
fileOpenin classOperationProcessor
-
fileSaveAsBmp
public void fileSaveAsBmp()
Description copied from class:OperationProcessorSave the current image as a Windows BMP file.- Specified by:
fileSaveAsBmpin classOperationProcessor
-
fileSaveAsGif
public void fileSaveAsGif()
Description copied from class:OperationProcessorSave the current image as a GIF file.- Specified by:
fileSaveAsGifin classOperationProcessor
-
fileSaveAsPalm
public void fileSaveAsPalm()
Description copied from class:OperationProcessorSave the current image as a Palm image file.- Specified by:
fileSaveAsPalmin classOperationProcessor
-
fileSaveAsPbm
public void fileSaveAsPbm()
Description copied from class:OperationProcessorSave the current image as a Portable Bitmap file.- Specified by:
fileSaveAsPbmin classOperationProcessor
-
fileSaveAsPgm
public void fileSaveAsPgm()
Description copied from class:OperationProcessorSave the current image as a Portable Graymap file.- Specified by:
fileSaveAsPgmin classOperationProcessor
-
fileSaveAsPng
public void fileSaveAsPng()
Description copied from class:OperationProcessorSave the current image as a Portable Network Graphics file.- Specified by:
fileSaveAsPngin classOperationProcessor
-
fileSaveAsPnm
private void fileSaveAsPnm()
-
fileSaveAsPpm
public void fileSaveAsPpm()
Description copied from class:OperationProcessorSave the current image as a Portable Pixmap file.- Specified by:
fileSaveAsPpmin classOperationProcessor
-
fileSaveAsRas
public void fileSaveAsRas()
Description copied from class:OperationProcessorSave the current image as a Sun Raster file.- Specified by:
fileSaveAsRasin classOperationProcessor
-
filterConvolutionFilter
public void filterConvolutionFilter(int type)
-
filtersBlur
public void filtersBlur()
- Specified by:
filtersBlurin classOperationProcessor
-
filtersSharpen
public void filtersSharpen()
- Specified by:
filtersSharpenin classOperationProcessor
-
filtersEdgeDetection
public void filtersEdgeDetection()
- Specified by:
filtersEdgeDetectionin classOperationProcessor
-
filtersEmboss
public void filtersEmboss()
- Specified by:
filtersEmbossin classOperationProcessor
-
filtersPsychedelicDistillation
public void filtersPsychedelicDistillation()
- Specified by:
filtersPsychedelicDistillationin classOperationProcessor
-
filtersLithograph
public void filtersLithograph()
- Specified by:
filtersLithographin classOperationProcessor
-
filtersHorizontalSobel
public void filtersHorizontalSobel()
- Specified by:
filtersHorizontalSobelin classOperationProcessor
-
filtersVerticalSobel
public void filtersVerticalSobel()
- Specified by:
filtersVerticalSobelin classOperationProcessor
-
filtersHorizontalPrewitt
public void filtersHorizontalPrewitt()
- Specified by:
filtersHorizontalPrewittin classOperationProcessor
-
filtersVerticalPrewitt
public void filtersVerticalPrewitt()
- Specified by:
filtersVerticalPrewittin classOperationProcessor
-
filtersMaximum
public void filtersMaximum()
- Specified by:
filtersMaximumin classOperationProcessor
-
filtersMedian
public void filtersMedian()
- Specified by:
filtersMedianin classOperationProcessor
-
filtersMean
public void filtersMean()
- Specified by:
filtersMeanin classOperationProcessor
-
filtersMinimum
public void filtersMinimum()
- Specified by:
filtersMinimumin classOperationProcessor
-
filtersOil
public void filtersOil()
- Specified by:
filtersOilin classOperationProcessor
-
getUserFileName
public String getUserFileName(String extension, int titleIndex, int fileDialogType)
-
helpAbout
public void helpAbout()
Description copied from class:OperationProcessorDisplay information about the application: name, version, feedback email address, website.- Specified by:
helpAboutin classOperationProcessor
-
helpSystemInformation
public void helpSystemInformation()
Description copied from class:OperationProcessorDisplay information on the system this application is currently running on.- Specified by:
helpSystemInformationin classOperationProcessor
-
process
public void process(ImageToImageOperation op)
This method can be called for ImageToImageOperation objects.
-
setImage
public void setImage(PixelImage newImage, boolean newModified)
-
transformationsFlip
public void transformationsFlip()
- Specified by:
transformationsFlipin classOperationProcessor
-
transformationsMirror
public void transformationsMirror()
- Specified by:
transformationsMirrorin classOperationProcessor
-
transformationsRotate90Left
public void transformationsRotate90Left()
- Specified by:
transformationsRotate90Leftin classOperationProcessor
-
transformationsRotate90Right
public void transformationsRotate90Right()
- Specified by:
transformationsRotate90Rightin classOperationProcessor
-
transformationsRotate180
public void transformationsRotate180()
- Specified by:
transformationsRotate180in classOperationProcessor
-
transformationsCrop
public void transformationsCrop()
- Specified by:
transformationsCropin classOperationProcessor
-
transformationsShear
public void transformationsShear()
- Specified by:
transformationsShearin classOperationProcessor
-
transformationsScale
public void transformationsScale()
- Specified by:
transformationsScalein classOperationProcessor
-
updateFrame
public void updateFrame(PixelImage image)
-
viewInterpolationTypeBicubic
public void viewInterpolationTypeBicubic()
- Specified by:
viewInterpolationTypeBicubicin classOperationProcessor
-
viewInterpolationTypeBilinear
public void viewInterpolationTypeBilinear()
- Specified by:
viewInterpolationTypeBilinearin classOperationProcessor
-
viewInterpolationTypeNearestNeighbor
public void viewInterpolationTypeNearestNeighbor()
- Specified by:
viewInterpolationTypeNearestNeighborin classOperationProcessor
-
viewZoomIn
public void viewZoomIn()
- Specified by:
viewZoomInin classOperationProcessor
-
viewZoomOut
public void viewZoomOut()
- Specified by:
viewZoomOutin classOperationProcessor
-
viewSetOriginalSize
public void viewSetOriginalSize()
- Specified by:
viewSetOriginalSizein classOperationProcessor
-
-