Package java.beans

Examples of java.beans.PropertyChangeEvent


                listeners.size());
        synchronized (listeners) {
            copy.addAll(listeners);
        }

        PropertyChangeEvent changeAllEvent = new PropertyChangeEvent(source,
                null, null, null);
        for (Iterator<PropertyChangeListener> listenersItr = copy.iterator(); listenersItr
                .hasNext();) {
            PropertyChangeListener listna = listenersItr.next();
            listna.propertyChange(changeAllEvent);
View Full Code Here


            // TODO for the future we should deliver a messagebox when two different sorting modes have been applied to one field
            int iduplicate = JavaTools.getDuplicateFieldIndex(SortDescriptions);
            if (iduplicate != -1) {
                String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames[iduplicate][0], "<FIELDNAME>");
                CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, sLocSortCriteriaisduplicate);
                CurUnoDialog.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2)));
                CurUnoDialog.setFocus("lstSort" + (iduplicate + 1));
                return new String[][] {
                };
            }
            else
View Full Code Here

    }

    public void setLookAndFeel(LookAndFeelInfo lookAndFeelInfo) throws Exception {
        UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
        UIManager.getLookAndFeelDefaults().put("Slider.paintValue", false);
        PropertyChangeEvent changeEvent = new PropertyChangeEvent(UIManager.getLookAndFeelDefaults(), "Slider.paintValue", true, false);
        PropertyChangeListener[] propertyChangeListeners = UIManager.getLookAndFeel().getDefaults().getPropertyChangeListeners();
        for (PropertyChangeListener propertyChangeListener : propertyChangeListeners) {
            propertyChangeListener.propertyChange(changeEvent);
        }
        for (JCheckBoxMenuItem jCheckBoxMenuItem : menusLnF) {
View Full Code Here

     * If there is no listener then this call is a no-op
     */
    public void raiseInternalPropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue) {
        ObjectChangeListener listener = (ObjectChangeListener)((ChangeTracker)source)._persistence_getPropertyChangeListener();
        if (listener != null) {
            listener.internalPropertyChange(new PropertyChangeEvent(source, propertyName, oldValue, newValue));
        }
    }
View Full Code Here

    public void setAttributeValueInObject(Object object, Object value) {
        if(isChangeTracking) {
            Object oldValue = getAttributeValueFromObject(object);
            PropertyChangeListener listener = ((ChangeTracker)object)._persistence_getPropertyChangeListener();
            if(listener != null) {
                listener.propertyChange(new PropertyChangeEvent(object, oxmAccessor.getAttributeName(), value, oldValue));
            }
        }
        if(isValueHolderProperty) {
            ValueHolderInterface vh = (ValueHolderInterface)ormAccessor.getAttributeValueFromObject(object);
            if(vh == null) {
View Full Code Here

        }

        public Object put(Object key, Object value)
        {
            Object oldValue = super.put(key, value);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, null, value);
            listener.propertyChange(event);
            return oldValue;
        }
View Full Code Here

        }

        public Object remove(Object key)
        {
            Object value = super.remove(key);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, value, null);
            listener.propertyChange(event);
            return value;
        }
View Full Code Here

        }

        public Object put(Object key, Object value)
        {
            Object oldValue = super.put(key, value);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, null, value);
            listener.propertyChange(event);
            return oldValue;
        }
View Full Code Here

        }

        public Object remove(Object key)
        {
            Object value = super.remove(key);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, value, null);
            listener.propertyChange(event);
            return value;
        }
View Full Code Here

    harness.check(label.getHorizontalAlignment(), JLabel.LEADING);
    label.addPropertyChangeListener(this);
    label.setHorizontalAlignment(JLabel.RIGHT);
    harness.check(label.getHorizontalAlignment(), JLabel.RIGHT);
    harness.check(events.size(), 1);
    PropertyChangeEvent e0 = (PropertyChangeEvent) events.get(0);
    harness.check(e0.getSource(), label);
    harness.check(e0.getPropertyName(), "horizontalAlignment");
    harness.check(e0.getOldValue(), new Integer(JLabel.LEADING));
    harness.check(e0.getNewValue(), new Integer(JLabel.RIGHT));
   
    // try a bad value
    boolean pass = false;
    try
    {
View Full Code Here

TOP

Related Classes of java.beans.PropertyChangeEvent

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.