All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.extjs.gxt.ui.client.data.ChangeEventSource Maven / Gradle / Ivy

There is a newer version: 2.3.1-gwt22
Show newest version
/*
 * Ext GWT - Ext for GWT
 * Copyright(c) 2007, 2008, Ext JS, LLC.
 * [email protected]
 * 
 * http://extjs.com/license
 */
package com.extjs.gxt.ui.client.data;

/**
 * Interface for object that notify listeners when changed.
 */
public interface ChangeEventSource {

  /**
   * Fired when a child object is added to the model (value is 10).
   */
  public static final int Add = 10;

  /**
   * Fired when a child object is removed from the model (value is 30).
   */
  public static final int Remove = 30;

  /**
   * Fired when the model has beed updated (value is 40).
   */
  public static final int Update = 40;

  /**
   * Adds a change listener to the model.
   * 
   * @param listener the listener to add
   */
  public void addChangeListener(ChangeListener... listener);

  /**
   * Removes a change listener.
   * 
   * @param listener the listener to remove
   */
  public void removeChangeListener(ChangeListener... listener);

  /**
   * Removes all change listeners.
   */
  public void removeChangeListeners();

  /**
   * Sets whether change events are fired.
   * 
   * @param silent true to disable change event, otherwise false
   */
  public void setSilent(boolean silent);

  /**
   * Notifies listeners of the given change event.
   * 
   * @param event the change event
   */
  public void notify(ChangeEvent event);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy