ikbs.tools.imageButton
Class ImageButtonOld

java.lang.Object
  extended by java.awt.Component
      extended by ikbs.tools.imageButton.ImageButtonOld
All Implemented Interfaces:
ChoixComponent, ThumbReceiver, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

public class ImageButtonOld
extends java.awt.Component
implements ChoixComponent, java.awt.event.MouseListener, ThumbReceiver

See Also:
Serialized Form

Nested Class Summary
 
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
static int BOTTOM
          Bottom of the image
 int choix
           
static java.lang.String FONT
           
static int LEFT
          Left of the image
static int RIGHT
          Right of the image
static int TOP
          Top of the image
 
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
ImageButtonOld(java.awt.Image image, java.awt.event.ActionListener listener, int choix)
           
ImageButtonOld(java.awt.Image image, boolean modal, java.awt.event.ActionListener listener, int choix)
           
ImageButtonOld(java.awt.Image image, java.lang.String label, java.awt.event.ActionListener listener, int choix)
           
ImageButtonOld(java.awt.Image image, java.lang.String label, boolean modal, java.awt.event.ActionListener listener, int choix)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
           
protected  void afficherInfo()
           
 boolean getAffLabel()
           
 int getChoix()
           
 int getImageLabelGap()
           
 java.lang.String getInfo()
           
 java.lang.String getInfoSelect()
           
 java.lang.String getLabel()
           
 int getLabelPosition()
           
 InfoListener getListener()
           
 int getPadding()
           
 java.awt.Dimension getPreferredSize()
           
 void imageReady(java.awt.Image imgRed, java.lang.String nomFich, int index, boolean invalide)
          Lorsque l'image réduite arrive de manière asynchrone
 void imageReady2(java.awt.Image imgRed, java.lang.String nomFich, int index, boolean invalide)
           
 void initFont(java.lang.String nomFont)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
           
 void performAction(int action)
           
 void removeActionListener(java.awt.event.ActionListener listener)
           
protected  void repaintImage()
           
 boolean selected()
           
 boolean selection()
           
 void setAffLabel(boolean t)
           
 void setChoix(int c)
           
 void setCouleurFond(java.awt.Color c)
           
 void setDrawPushedIn(boolean b)
          Make the button "depress" when clicked?
 void setEnabled(boolean b)
          Active ou desactive le button
 void setFont(java.awt.Font f)
           
 void setImage(java.awt.Image i)
          The image to be shown.
 void setImageLabelGap(int g)
          Set the gap, in pixels, between the label, if any, and image.
 void setImageScale(double f)
          Scale the image to the given value (1.0 = 100%).
 void setImageScale(float pct)
          Scale the image to the given value (1.0 = 100%).
 void setInfo(java.lang.String i)
           
 void setInfoSelect(java.lang.String i)
           
 void setLabel(java.lang.String l)
           
 void setLabelPosition(int a)
          Set the position of the label in relation to the image: TOP, LEFT, RIGHT or BOTTOM.
 void setModal(boolean b)
           
 void setPadding(int p)
          Set the padding, in pixels, between the button border and its image.
 void setSelected(boolean b)
           
 void setShowBorder(boolean b)
          Show the border of the button?
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FONT

public static java.lang.String FONT

LEFT

public static final int LEFT
Left of the image

See Also:
Constant Field Values

TOP

public static final int TOP
Top of the image

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Right of the image

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Bottom of the image

See Also:
Constant Field Values

choix

public int choix
Constructor Detail

ImageButtonOld

public ImageButtonOld(java.awt.Image image,
                      java.awt.event.ActionListener listener,
                      int choix)

ImageButtonOld

public ImageButtonOld(java.awt.Image image,
                      boolean modal,
                      java.awt.event.ActionListener listener,
                      int choix)

ImageButtonOld

public ImageButtonOld(java.awt.Image image,
                      java.lang.String label,
                      boolean modal,
                      java.awt.event.ActionListener listener,
                      int choix)

ImageButtonOld

public ImageButtonOld(java.awt.Image image,
                      java.lang.String label,
                      java.awt.event.ActionListener listener,
                      int choix)
Method Detail

initFont

public void initFont(java.lang.String nomFont)

getListener

public InfoListener getListener()

getChoix

public int getChoix()
Specified by:
getChoix in interface ChoixComponent

setModal

public void setModal(boolean b)

setSelected

public void setSelected(boolean b)

selected

public boolean selected()

setInfo

public void setInfo(java.lang.String i)

getInfo

public java.lang.String getInfo()

setInfoSelect

public void setInfoSelect(java.lang.String i)

getInfoSelect

public java.lang.String getInfoSelect()

setFont

public void setFont(java.awt.Font f)
Overrides:
setFont in class java.awt.Component

setShowBorder

public void setShowBorder(boolean b)
Show the border of the button? Useful when you just want the image without the 3D button look around it.


setDrawPushedIn

public void setDrawPushedIn(boolean b)
Make the button "depress" when clicked? If false the button will behave normally, except when pushed it will give no visual feedback.


getLabelPosition

public int getLabelPosition()

setLabelPosition

public void setLabelPosition(int a)
Set the position of the label in relation to the image: TOP, LEFT, RIGHT or BOTTOM.


getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String l)

setPadding

public void setPadding(int p)
Set the padding, in pixels, between the button border and its image.


getPadding

public int getPadding()

setImageLabelGap

public void setImageLabelGap(int g)
Set the gap, in pixels, between the label, if any, and image.


getImageLabelGap

public int getImageLabelGap()

setImage

public void setImage(java.awt.Image i)
The image to be shown.


getAffLabel

public boolean getAffLabel()

setAffLabel

public void setAffLabel(boolean t)

setImageScale

public void setImageScale(double f)
Scale the image to the given value (1.0 = 100%).


setImageScale

public void setImageScale(float pct)
Scale the image to the given value (1.0 = 100%).


setEnabled

public void setEnabled(boolean b)
Active ou desactive le button

Overrides:
setEnabled in class java.awt.Component

selection

public boolean selection()

repaintImage

protected void repaintImage()

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)

setCouleurFond

public void setCouleurFond(java.awt.Color c)

setChoix

public void setChoix(int c)

afficherInfo

protected void afficherInfo()

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

performAction

public void performAction(int action)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

imageReady

public void imageReady(java.awt.Image imgRed,
                       java.lang.String nomFich,
                       int index,
                       boolean invalide)
Lorsque l'image réduite arrive de manière asynchrone

Specified by:
imageReady in interface ThumbReceiver

imageReady2

public void imageReady2(java.awt.Image imgRed,
                        java.lang.String nomFich,
                        int index,
                        boolean invalide)