Search in sources :

Example 1 with UIPropertyChangeEvent

use of com.biglybt.pif.ui.components.UIPropertyChangeEvent in project BiglyBT by BiglySoftware.

the class UIComponentImpl method setProperty.

@Override
public void setProperty(final String property_type, final Object property_value) {
    final Object old_value = properties.get(property_type);
    properties.put(property_type, property_value);
    UIPropertyChangeEvent ev = new UIPropertyChangeEvent() {

        @Override
        public UIComponent getSource() {
            return (UIComponentImpl.this);
        }

        @Override
        public String getPropertyType() {
            return (property_type);
        }

        @Override
        public Object getNewPropertyValue() {
            return (property_value);
        }

        @Override
        public Object getOldPropertyValue() {
            return (old_value);
        }
    };
    for (UIPropertyChangeListener listener : listeners) {
        listener.propertyChanged(ev);
    }
}
Also used : UIPropertyChangeEvent(com.biglybt.pif.ui.components.UIPropertyChangeEvent) UIPropertyChangeListener(com.biglybt.pif.ui.components.UIPropertyChangeListener)

Aggregations

UIPropertyChangeEvent (com.biglybt.pif.ui.components.UIPropertyChangeEvent)1 UIPropertyChangeListener (com.biglybt.pif.ui.components.UIPropertyChangeListener)1