diagapplet.utils
Class ImageJPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by diagapplet.utils.ImageJPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class ImageJPanel
extends javax.swing.JPanel

Swing JPanel that displays an image inside a scrollpane.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 diagapplet.utils.ImagePainter img_painter
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ImageJPanel()
          Creates new form ImageJPanel
 
Method Summary
 void AddMark(byte red, byte green, byte blue, int x, int y)
           
 void AddPaintablePanelMouseListener(java.awt.event.MouseListener ml)
           
 void AddPaintablePanelMouseMotionListener(java.awt.event.MouseMotionListener mml)
           
 void AddRunOnSelecteRectChange(java.lang.Runnable r)
           
 void ClearCenterPosition()
           
 void ClearImage()
           
 void ClearMarks()
           
 void CombineByteArray(byte[] ba, int x, int y, int w, int h)
           
 java.io.File get_last_saved_image_file()
           
 double get_scale()
           
 java.awt.Rectangle get_selected_scaled_rect()
           
 int get_xstart()
           
 int get_ystart()
           
 java.awt.image.BufferedImage GetByteArrayImage()
           
 java.awt.image.BufferedImage getImage()
           
 void LoadByteArray(byte[] ba, int w, int h)
           
 void LoadImage(java.awt.image.BufferedImage _img)
           
 void LoadImage(java.lang.String s)
           
 void LoadImageF(java.io.File f)
           
 void refresh()
           
 void Scroll_To_XY(int x, int y)
           
 void set_hide_byte_array(boolean _hide_byte_array)
           
 void set_record_images(boolean _b)
           
 void set_show_selected_rect(boolean _show)
           
 void SetCenterPosition(int x, int y)
           
 void SetFit(boolean f)
           
 void SetStartPos(int x, int y)
           
 void setSub_painter(PainterInterface sub_painter)
           
 void SetZoom(int z)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

img_painter

public diagapplet.utils.ImagePainter img_painter
Constructor Detail

ImageJPanel

public ImageJPanel()
Creates new form ImageJPanel

Method Detail

AddRunOnSelecteRectChange

public void AddRunOnSelecteRectChange(java.lang.Runnable r)

setSub_painter

public void setSub_painter(PainterInterface sub_painter)

refresh

public void refresh()

get_xstart

public int get_xstart()

get_ystart

public int get_ystart()

get_scale

public double get_scale()

SetFit

public void SetFit(boolean f)

SetZoom

public void SetZoom(int z)

LoadByteArray

public void LoadByteArray(byte[] ba,
                          int w,
                          int h)

LoadImage

public void LoadImage(java.lang.String s)

LoadImageF

public void LoadImageF(java.io.File f)

LoadImage

public void LoadImage(java.awt.image.BufferedImage _img)

ClearImage

public void ClearImage()

SetStartPos

public void SetStartPos(int x,
                        int y)

CombineByteArray

public void CombineByteArray(byte[] ba,
                             int x,
                             int y,
                             int w,
                             int h)

ClearMarks

public void ClearMarks()

AddMark

public void AddMark(byte red,
                    byte green,
                    byte blue,
                    int x,
                    int y)

get_last_saved_image_file

public java.io.File get_last_saved_image_file()

SetCenterPosition

public void SetCenterPosition(int x,
                              int y)

ClearCenterPosition

public void ClearCenterPosition()

set_show_selected_rect

public void set_show_selected_rect(boolean _show)

set_record_images

public void set_record_images(boolean _b)

AddPaintablePanelMouseListener

public void AddPaintablePanelMouseListener(java.awt.event.MouseListener ml)

AddPaintablePanelMouseMotionListener

public void AddPaintablePanelMouseMotionListener(java.awt.event.MouseMotionListener mml)

Scroll_To_XY

public void Scroll_To_XY(int x,
                         int y)

get_selected_scaled_rect

public java.awt.Rectangle get_selected_scaled_rect()

set_hide_byte_array

public void set_hide_byte_array(boolean _hide_byte_array)

GetByteArrayImage

public java.awt.image.BufferedImage GetByteArrayImage()

getImage

public java.awt.image.BufferedImage getImage()