Package java.beans

Examples of java.beans.PropertyVetoException


        BeanContext oldValue = beanContext;
        BeanContext newValue = bc;

        if (!rejectedSetBCOnce) {
            if (rejectedSetBCOnce = !validatePendingSetBeanContext(bc)) {
                throw new PropertyVetoException(
                    "setBeanContext() change rejected:",
                    new PropertyChangeEvent(beanContextChildPeer, "beanContext", oldValue, newValue)
                );
            }
View Full Code Here


            } catch (IllegalArgumentException ex) {
                final String fmt = localStrings.getLocalString("valueTypeMismatch",
                        "Cannot assign value {0} to an env-entry of type {1}",
                        candidateFinalValue, candidateFinalType);
                final String valueOrType = (value != null ? "--value" : "--type");
                throw new PropertyVetoException(fmt + " - " + ex.getLocalizedMessage(),
                        new PropertyChangeEvent(envEntry, valueOrType,
                            envEntry.getEnvEntryType(), envEntryType));
            }
        }
View Full Code Here

            //
            if (!(beanContext instanceof ControlBeanContext))
            {
                PropertyChangeEvent pce = new PropertyChangeEvent(_bean, "beanContext",
                                                                  getBeanContext(), beanContext);
                throw new PropertyVetoException("Context does not support nesting controls: " +
                                                beanContext.getClass(), pce);
            }

            cbcs = (ControlBeanContext)beanContext;
        }
View Full Code Here

            } catch (IllegalArgumentException ex) {
                final String fmt = localStrings.getLocalString("valueTypeMismatch",
                        "Cannot assign value {0} to an env-entry of type {1}",
                        candidateFinalValue, candidateFinalType);
                final String valueOrType = (value != null ? "--value" : "--type");
                throw new PropertyVetoException(fmt + " - " + ex.getLocalizedMessage(),
                        new PropertyChangeEvent(envEntry, valueOrType,
                            envEntry.getEnvEntryType(), envEntryType));
            }
        }
View Full Code Here

        if(args==null || args.length==0) {
            // getter
            return getter(p, method.getGenericReturnType());
        } else {
            throw new PropertyVetoException("Instance of " + typeName() + " named '" + getKey() +
                    "' is not locked for writing when invoking method " + method.getName()
                    + " you must use transaction semantics to access it.", null);
        }
    }
View Full Code Here

                    "that does not belong to this collection.");
        }
        // check if the new series name already exists for another series
        Comparable key = (Comparable) e.getNewValue();
        if (this.getSeries(key) != null) {
            throw new PropertyVetoException("Duplicate key2", e);
        }
    }
View Full Code Here

                    "that does not belong to this collection.");
        }
        // check if the new series name already exists for another series
        Comparable key = (Comparable) e.getNewValue();
        if (getSeriesIndex(key) >= 0) {
            throw new PropertyVetoException("Duplicate key2", e);
        }
    }
View Full Code Here

   
    public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
        if (ExplorerManager.PROP_SELECTED_NODES.equals (evt.getPropertyName())) {
            Node[] nodes = (Node[]) evt.getNewValue();
            if (nodes.length>1) {
                throw new PropertyVetoException ("Invalid length",evt);   //NOI18N
            }          
        }
    }
View Full Code Here

            //
            if (!(beanContext instanceof ControlBeanContext))
            {
                PropertyChangeEvent pce = new PropertyChangeEvent(_bean, "beanContext",
                                                                  getBeanContext(), beanContext);
                throw new PropertyVetoException("Context does not support nesting controls: " +
                                                beanContext.getClass(), pce);
            }

            cbcs = (ControlBeanContext)beanContext;
        }
View Full Code Here

            public void vetoableChange( PropertyChangeEvent evt )
                    throws PropertyVetoException
            {
                if ( evt.getNewValue() == CircuitBreaker.Status.on ) {
                    throw new PropertyVetoException( "Service is down", evt );
                }
            }

        } );
View Full Code Here

TOP

Related Classes of java.beans.PropertyVetoException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.