net.aerith.misao.gui
Class MonoImageComponent

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--net.aerith.misao.gui.ImageComponent
                                |
                                +--net.aerith.misao.gui.MonoImageComponent

public class MonoImageComponent
extends ImageComponent
implements LevelAdjustable

The MonoImageComponent represents a GUI component to show an image, with level adjustment function of pixel values.

See Also:
Serialized Form

Inner Class Summary
protected  class MonoImageComponent.CancelBloomingListener
          The CancelBloomingListener is a listener class of menu selection to cancel blooming.
protected  class MonoImageComponent.CancelStreakListener
          The CancelStreakListener is a listener class of menu selection to cancel streaks.
protected  class MonoImageComponent.EqualizeListener
          The EqualizeListener is a listener class of menu selection to equalize the image.
protected  class MonoImageComponent.FillDarkRowAndColumnListener
          The FillDarkRowAndColumnListener is a listener class of menu selection to fill dark rows and columns.
protected  class MonoImageComponent.FillIllegalRowAndColumnListener
          The FillIllegalRowAndColumnListener is a listener class of menu selection to fill illegal rows and columns.
protected  class MonoImageComponent.FlattenBackgroundListener
          The FlattenBackgroundListener is a listener class of menu selection to flatten the background.
protected  class MonoImageComponent.InverseImageListener
          The InverseImageListener is a listener class of menu selection to inverse white and black.
protected  class MonoImageComponent.LevelAdjustmentListener
          The LevelAdjustmentListener is a listener class of menu selection for level adjustment of pixel values.
protected  class MonoImageComponent.MedianFilterListener
          The MedianFilterListener is a listener class of menu selection to apply median filter.
protected  class MonoImageComponent.RemoveLatticePatternListener
          The RemoveLatticePatternListener is a listener class of menu selection to remove lattice pattern.
protected  class MonoImageComponent.RescaleSTImageListener
          The RescaleSTImageListener is a listener class of menu selection to rescale an ST-4/6 image.
protected  class MonoImageComponent.ReverseImageListener
          The ReverseImageListener is a listener class of menu selection to reverse upside down.
protected  class MonoImageComponent.SaveListener
          The SaveListener is a listener class of menu selection to save the image.
protected  class MonoImageComponent.SmoothFilterListener
          The SmoothFilterListener is a listener class of menu selection to apply smoothing filter.
protected  class MonoImageComponent.TransformMeridianImageListener
          The TransformMeridianImageListener is a listener class of menu selection to transform a meridian image.
 
Inner classes inherited from class net.aerith.misao.gui.ImageComponent
ImageComponent.ZoomInListener, ImageComponent.ZoomOutListener
 
Inner classes inherited from class javax.swing.JLabel
javax.swing.JLabel.AccessibleJLabel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardBinding, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
private  MonoImageComponent component
          This component.
protected  boolean processible
          True if the image processing popup menus are available.
private  LevelAdjustmentSet stat
          The image level and statistics.
 
Fields inherited from class net.aerith.misao.gui.ImageComponent
dimension, image, image_content, markup_position, pane, popup, zoom_level
 
Fields inherited from class javax.swing.JLabel
defaultIcon, disabledIcon, disabledIconSet, horizontalAlignment, horizontalTextPosition, iconTextGap, LABELED_BY_PROPERTY, labelFor, mnemonic, text, uiClassID, verticalAlignment, verticalTextPosition
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, alignmentX, alignmentY, ANCESTOR_USING_BUFFER, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, flags, HAS_FOCUS, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, paintingChild, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, uiClassID, UNDEFINED_CONDITION, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
MonoImageComponent()
          Constructs an empty MonoImageComponent.
MonoImageComponent(MonoImage initial_image)
          Constructs a ImageComponent with an image.
 
Method Summary
 void adjustLevel(double minimum, double maximum)
          Adjusts the level of image and repaints the view.
 void adjustLevelAll(double minimum, double maximum)
          Adjusts the level of all images.
 javax.swing.JMenuItem[] createImageProcessingMenus()
          Returns an array of JMenuItem which consists of image processing menus.
 javax.swing.JMenuItem[] createLevelAdjustmentMenus()
          Returns an array of JMenuItem which consists of level adjustment menus of pixel values.
 javax.swing.JMenuItem[] createSaveMenus()
          Returns an array of JMenuItem which consists of save menus.
 javax.swing.JMenuItem[] createSuperiorImageProcessingMenus()
          Returns an array of JMenuItem which consists of superior image processing menus.
 void disableImageProcessing()
          Disables the image processing operations.
 void enableImageProcessing()
          Enables the image processing operations.
 LevelAdjustmentSet getCurrentLevel()
          Gets the current image level and statistics.
protected  void initPopupMenu()
          Initializes a popup menu.
 void replaceImage(ImageContent new_image)
          Replaces the image content.
 void save(Format format)
          Saves the content image.
 
Methods inherited from class net.aerith.misao.gui.ImageComponent
clearMark, convertToImagePosition, convertToScreenPoint, createZoomMenus, finalize, getImageContent, getPreferredSize, markUp, markUpCenter, paint, processMouseEvent, update, zoomIn, zoomOut
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI, writeObject
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, , addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, bindingForKeyStroke, checkIfChildObscuredBySibling, computeVisibleRect, computeVisibleRect, contains, createToolTip, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, keyboardBindings, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, readObject, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setCursor, setFocusOwner, setLayout, transferFocus, updateCursor, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocale, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

stat

private LevelAdjustmentSet stat
The image level and statistics.

component

private MonoImageComponent component
This component.

processible

protected boolean processible
True if the image processing popup menus are available.
Constructor Detail

MonoImageComponent

public MonoImageComponent()
Constructs an empty MonoImageComponent.

MonoImageComponent

public MonoImageComponent(MonoImage initial_image)
Constructs a ImageComponent with an image.
Parameters:
initial_image - the image to view.
Method Detail

initPopupMenu

protected void initPopupMenu()
Initializes a popup menu. A popup must be created previously.
Overrides:
initPopupMenu in class ImageComponent

createSaveMenus

public javax.swing.JMenuItem[] createSaveMenus()
Returns an array of JMenuItem which consists of save menus. Items are newly created when invoked.
Overrides:
createSaveMenus in class ImageComponent
Returns:
an array of menu items.

createLevelAdjustmentMenus

public javax.swing.JMenuItem[] createLevelAdjustmentMenus()
Returns an array of JMenuItem which consists of level adjustment menus of pixel values. Items are newly created when invoked.
Returns:
an array of menu items.

createSuperiorImageProcessingMenus

public javax.swing.JMenuItem[] createSuperiorImageProcessingMenus()
Returns an array of JMenuItem which consists of superior image processing menus. Items are newly created when invoked.
Returns:
an array of menu items.

createImageProcessingMenus

public javax.swing.JMenuItem[] createImageProcessingMenus()
Returns an array of JMenuItem which consists of image processing menus. Items are newly created when invoked.
Returns:
an array of menu items.

enableImageProcessing

public void enableImageProcessing()
Enables the image processing operations.

disableImageProcessing

public void disableImageProcessing()
Disables the image processing operations.

getCurrentLevel

public LevelAdjustmentSet getCurrentLevel()
Gets the current image level and statistics.
Returns:
the current image level and statistics.

adjustLevel

public void adjustLevel(double minimum,
                        double maximum)
Adjusts the level of image and repaints the view.
Specified by:
adjustLevel in interface LevelAdjustable
Parameters:
minimum - the minimum level.
maximum - the maximum level.

adjustLevelAll

public void adjustLevelAll(double minimum,
                           double maximum)
Adjusts the level of all images.
Specified by:
adjustLevelAll in interface LevelAdjustable
Parameters:
minimum - the minimum level.
maximum - the maximum level.

replaceImage

public void replaceImage(ImageContent new_image)
Replaces the image content.
Overrides:
replaceImage in class ImageComponent
Parameters:
new_image - the new image.

save

public void save(Format format)
          throws java.io.IOException,
                 UnsupportedBufferTypeException,
                 UnsupportedFileTypeException
Saves the content image.
Parameters:
format - the image file format.
Throws:
java.io.IOException - if I/O error occurs.
UnsupportedBufferTypeException - if the data type is unsupported.
UnsupportedFileTypeException - if the file type is unsupported.