Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.fudaa.ebli.palette
Class BPaletteCouleurSimplePropertyEditor  view BPaletteCouleurSimplePropertyEditor download BPaletteCouleurSimplePropertyEditor.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.fudaa.ebli.palette.BPaletteCouleurSimplePropertyEditor
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyEditor, java.io.Serializable

public class BPaletteCouleurSimplePropertyEditor
extends javax.swing.JComponent
implements java.beans.PropertyEditor

Un editeur de palette de couleur simple.

Version:
$Revision: 1.4 $ $Date: 2001/09/11 15:29:21 $ by $Author: deniger $

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.beans.PropertyChangeSupport changeListeners
           
private  BPaletteCouleurSimple objet_
           
 
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.Container
 
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
BPaletteCouleurSimplePropertyEditor()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a property change listener to this PropertyEditor.
protected  void firePropertyChange(java.lang.String _dsc, java.lang.Object _avant, java.lang.Object _apres)
          Report a change in a bound property to any registered property listeners.
 java.lang.String getAsText()
          Get the value of this property in String format.
 java.awt.Component getCustomEditor()
          The RAD tool calls this to grab the component that can edit this type.
 java.lang.String getJavaInitializationString()
          Get a Java language-specific String which could be used to create an Object of the specified type.
 java.lang.String[] getTags()
          Get a list of possible Strings which this property type can have.
 java.lang.Object getValue()
          Accessor method to get the current value the PropertyEditor is working with.
 boolean isPaintable()
          The RAD tool calls this to find out whether the PropertyEditor can paint itself.
 void paintValue(java.awt.Graphics _gfx, java.awt.Rectangle _box)
          The RAD tool calls this to paint the actual value of the property.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a property change listener from this PropertyEditor.
 void setAsText(java.lang.String _texte)
          Set the value of this property using a String.
 void setValue(java.lang.Object _value)
          Called by the RAD tool to set the value of this property for the PropertyEditor.
 boolean supportsCustomEditor()
          The RAD tool calls this to find out whether the PropertyEditor supports a custom component to edit and display itself.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

objet_

private BPaletteCouleurSimple objet_

changeListeners

private java.beans.PropertyChangeSupport changeListeners
Constructor Detail

BPaletteCouleurSimplePropertyEditor

public BPaletteCouleurSimplePropertyEditor()
Method Detail

setValue

public void setValue(java.lang.Object _value)
Description copied from interface: java.beans.PropertyEditor
Called by the RAD tool to set the value of this property for the PropertyEditor. If the property type is native, it should be wrapped in the appropriate wrapper type.

Specified by:
setValue in interface java.beans.PropertyEditor

getValue

public java.lang.Object getValue()
Description copied from interface: java.beans.PropertyEditor
Accessor method to get the current value the PropertyEditor is working with. If the property type is native, it will be wrapped in the appropriate wrapper type.

Specified by:
getValue in interface java.beans.PropertyEditor

isPaintable

public boolean isPaintable()
Description copied from interface: java.beans.PropertyEditor
The RAD tool calls this to find out whether the PropertyEditor can paint itself.

Specified by:
isPaintable in interface java.beans.PropertyEditor

paintValue

public void paintValue(java.awt.Graphics _gfx,
                       java.awt.Rectangle _box)
Description copied from interface: java.beans.PropertyEditor
The RAD tool calls this to paint the actual value of the property. The Graphics context will have the same current font, color, etc. as the parent Container. You may safely change the font, color, etc. and not change them back.

This method should do a silent no-op if isPaintable() is false.

Specified by:
paintValue in interface java.beans.PropertyEditor

getJavaInitializationString

public java.lang.String getJavaInitializationString()
Description copied from interface: java.beans.PropertyEditor
Get a Java language-specific String which could be used to create an Object of the specified type. Every PropertyEditor must support this.

The reason for this is that while most RAD tools will serialize the Beans and deserialize them at runtime, some RAD tools will generate code that creates the Beans. Examples of Java initialization strings would be:

  1. 2
  2. "I am a String"
  3. new MyObject(2, "String", new StringBuffer())

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor

getAsText

public java.lang.String getAsText()
Description copied from interface: java.beans.PropertyEditor
Get the value of this property in String format. Many times this can simply use Object.toString().

Return null if you do not support getAsText()/setAsText(). setAsText(getAsText()) should be valid; i.e. the stuff you spit out in getAsText() should be able to go into setAsText().

Specified by:
getAsText in interface java.beans.PropertyEditor

setAsText

public void setAsText(java.lang.String _texte)
               throws java.lang.IllegalArgumentException
Description copied from interface: java.beans.PropertyEditor
Set the value of this property using a String. Whether or not this PropertyEditor is editing a String type, this converts the String into the type of the PropertyEditor.

Specified by:
setAsText in interface java.beans.PropertyEditor

getTags

public java.lang.String[] getTags()
Description copied from interface: java.beans.PropertyEditor
Get a list of possible Strings which this property type can have. The value of these will be used by the RAD tool to construct some sort of list box or to check text box input, and the resulting String passed to setAsText() should be one of these. Note, however, that like most things with this mammoth, unwieldy interface, this is not guaranteed. Thus, you must check the value in setAsText() anyway.

Specified by:
getTags in interface java.beans.PropertyEditor

getCustomEditor

public java.awt.Component getCustomEditor()
Description copied from interface: java.beans.PropertyEditor
The RAD tool calls this to grab the component that can edit this type. The component may be painted anywhere the RAD tool wants to paint it-- even in its own window.

The component must hook up with the PropertyEditor and, whenever a change to the value is made, fire a PropertyChangeEvent to the source.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor

supportsCustomEditor

public boolean supportsCustomEditor()
Description copied from interface: java.beans.PropertyEditor
The RAD tool calls this to find out whether the PropertyEditor supports a custom component to edit and display itself.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: java.beans.PropertyEditor
Adds a property change listener to this PropertyEditor.

Specified by:
addPropertyChangeListener in interface java.beans.PropertyEditor

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: java.beans.PropertyEditor
Removes a property change listener from this PropertyEditor.

Specified by:
removePropertyChangeListener in interface java.beans.PropertyEditor

firePropertyChange

protected void firePropertyChange(java.lang.String _dsc,
                                  java.lang.Object _avant,
                                  java.lang.Object _apres)
Description copied from class: java.awt.Component
Report a change in a bound property to any registered property listeners.