|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--sunw.demo.jelly.JellyBean
A simple bean with bound properties and one constrained property. The constrained property is "priceInCents". VetoablePropertyChange listeners can reject a proposed value for this property by throwing a PropertyVetoException.
Voter
, Serialized FormFields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
JellyBean()
Construct a smallish JellyBean. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
The specified PropertyChangeListeners propertyChange method will be called each time the value of any bound property is changed. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener l)
The specified VetoableChangeListeners vetoableChange method will be called each time the value of any constrained property is changed. |
java.awt.Color |
getColor()
Returns the color that the jelly bean is rendered with. |
java.awt.Dimension |
getPreferredSize()
|
int |
getPriceInCents()
Returns the current price. |
void |
paint(java.awt.Graphics g)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove this PropertyChangeListener from the JellyBeans internal list. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener l)
Remove this VetoableChangeListener from the JellyBeans internal list. |
void |
setColor(java.awt.Color newColor)
Sets the color that the jelly bean is rendered with. |
void |
setPriceInCents(int newPriceInCents)
Set the price in cents unless one of the VetoableChangeListeners throws a PropertyVetoException. |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addNotify,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
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,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
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 |
Constructor Detail |
public JellyBean()
Method Detail |
public void paint(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public java.awt.Color getColor()
setColor(java.awt.Color)
public void setColor(java.awt.Color newColor)
getColor()
public int getPriceInCents()
setPriceInCents(int)
public void setPriceInCents(int newPriceInCents) throws java.beans.PropertyVetoException
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the PropertyChangeListenerremovePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the PropertyChangeListeneraddPropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
l
- the VetoableChangeListenerremoveVetoableChangeListener(java.beans.VetoableChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
l
- the VetoableChangeListeneraddVetoableChangeListener(java.beans.VetoableChangeListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |