base
Class Rimage

java.lang.Object
  |
  +--java.awt.Component
        |
        +--base.Rimage

public class Rimage
extends java.awt.Component

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
static int BW
          valeur de type pour une image en noir et blanc.
static int COLOR
          valeur de type pour une image en couleurs.
 int colors
          Le nombre de composantes de couleurs de l'image.
static int GRAYSCALE
          valeur de type pour une image en niveaux de gris.
 int height
          La hauteur de l'image.
 short max
          La valeur la plus élevée dans le tableau des pixels.
 java.lang.String name
          Le nom de l'image.
 short[][][] pixel
          Le tableau contenant les points de l'image.
 int type
          Le type de l'image (Noir et Blanc, Niveaux de gris, Couleurs).
 int width
          La largeur de l'image.
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, 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, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
Rimage(int _width, int _height, int _type)
          Constructeur d'une image vide.
Rimage(short[][][] _graphic, java.lang.String _name)
          Constructeur à partir d'un tableau de pixels.
Rimage(java.lang.String _filename)
          Contructeur à partir d'un fichier.
Rimage(java.net.URL _url)
          Contructeur à partir d'une URL.
 
Method Summary
 com.sun.java.swing.ImageIcon getImageIcon()
          permet de récupérer un ImageIcon correspondant à l'image.
 Rimage negate()
          Renvoie l'inverse de l'image
 boolean writeFile(java.lang.String _filename)
          Ecrit l'image au format p?
 
Methods inherited from class java.awt.Component
, action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BW

public static final int BW
valeur de type pour une image en noir et blanc.

GRAYSCALE

public static final int GRAYSCALE
valeur de type pour une image en niveaux de gris.

COLOR

public static final int COLOR
valeur de type pour une image en couleurs.

name

public java.lang.String name
Le nom de l'image.

type

public int type
Le type de l'image (Noir et Blanc, Niveaux de gris, Couleurs).

height

public int height
La hauteur de l'image.

width

public int width
La largeur de l'image.

colors

public int colors
Le nombre de composantes de couleurs de l'image.

max

public short max
La valeur la plus élevée dans le tableau des pixels.

pixel

public short[][][] pixel
Le tableau contenant les points de l'image.
Constructor Detail

Rimage

public Rimage(java.lang.String _filename)
       throws java.io.FileNotFoundException,
              java.io.IOException
Contructeur à partir d'un fichier. Ce fichier doit être au format pbm ou pgm ou ppm.
Parameters:
String - le nom du fichier à lire.

Rimage

public Rimage(java.net.URL _url)
       throws java.net.MalformedURLException,
              java.io.IOException
Contructeur à partir d'une URL. Ce fichier doit être au format pbm ou pgm ou ppm.
Parameters:
URL - l'URL où aller chercher l'image.

Rimage

public Rimage(short[][][] _graphic,
              java.lang.String _name)
Constructeur à partir d'un tableau de pixels.
Parameters:
short[][][] - le tableau de pixel de l'image.

Rimage

public Rimage(int _width,
              int _height,
              int _type)
Constructeur d'une image vide.
Parameters:
int - width, la largeur de l'image.
int - height, la hauteur de l'image.
int - type, le type de l'image
Method Detail

writeFile

public boolean writeFile(java.lang.String _filename)
Ecrit l'image au format p?m correspondant dans un fichier.
Parameters:
le - nom du fichier où stocker l'image.

getImageIcon

public com.sun.java.swing.ImageIcon getImageIcon()
permet de récupérer un ImageIcon correspondant à l'image.
Returns:
com.sun.java.swing.ImageIcon l'icône correspondant à l'image.

negate

public Rimage negate()
Renvoie l'inverse de l'image
Returns:
la Rimage correspondant au négatif de l'image.