Java 8 EventListenerList - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 EventListenerList class.

This code example shows how to use the following methods:
package org.drools.examples.sudoku.swing; 
 
import javax.swing.event.EventListenerList;
 
public abstract class AbstractSudokuGridModel { 
   private EventListenerList listenerList = new EventListenerList();
 
   public void addSudokuGridListener(SudokuGridListener l){
      listenerList.add(SudokuGridListener.class, l);
   } 
    
   public void removeSudokuGridListener(SudokuGridListener l){
      listenerList.remove(SudokuGridListener.class, l);
   } 
 
   private void forwardEvent(SudokuGridEvent ev){
       // Guaranteed to return a non-null array 
       Object[] listeners = listenerList.getListenerList();
       // Process the listeners last to first, notifying 
       // those that are interested in this event 
6
CodeRank
This code example shows how to use the following methods:
    } 
 
    /** 
     * The list of event listeners for this component. 
     */ 
    protected EventListenerList listenerList = new EventListenerList();
 
    public PaneMenu() { 
        Dimension d = new Dimension(103, 21);
        setMinimumSize(d);
        setMaximumSize(d);
        setPreferredSize(d);
        setEnabled(true); 
    } 
 
    @Override 
    public void setEnabled(boolean enabled) {
        super.setEnabled(enabled);
        if (enabled) {
            addMouseListener(this);
6
CodeRank
This code example shows how to use the following methods:
   * Initializes the <code>CloseableTabbedPane</code> 
   * @param horizontalTextPosition the horizontal position of the text (e.g. 
   * SwingUtilities.TRAILING or SwingUtilities.LEFT) 
   */ 
  private void init(int horizontalTextPosition) {
    listenerList = new EventListenerList();
    addMouseListener(this);
    addMouseMotionListener(this);
  
    //setUI(new AquaCloseableTabbedPaneUI(horizontalTextPosition)); 
    if (getUI() instanceof MetalTabbedPaneUI)
      setUI(new CloseableMetalTabbedPaneUI(horizontalTextPosition));
    /* 
    else 
      setUI(new CloseableTabbedPaneUI(horizontalTextPosition)); 
   */ 
  } 
  
  /** 
   * Allows setting own closeicons. 
6
CodeRank
This code example shows how to use the following methods:add
     */ 
    @Override 
    public void addFigureChangeListener(FigureChangeListener listener) {
        if (listener != null) {
            if (_listenerList == null) {
                _listenerList = new EventListenerList();
            } 
            _listenerList.add(FigureChangeListener.class, listener);
        } 
    } 
 
    /** 
     * Removes a listener for this figure. 
     * 
     * @param listener the listener to be removed 
     */ 
    @Override 
    public void removeFigureChangeListener(FigureChangeListener listener) {
        if (listener != null && _listenerList != null) {
            _listenerList.remove(FigureChangeListener.class, listener);
5
CodeRank
This code example shows how to use the following methods:
 
    /** 
     * Default constructor. 
     */ 
    public AbstractOverlay() { 
        this.changeListeners = new EventListenerList();
    } 
 
    /** 
     * Registers an object for notification of changes to the overlay. 
     * 
     * @param listener  the listener (<code>null</code> not permitted). 
     * 
     * @see #removeChangeListener(OverlayChangeListener) 
     */ 
    public void addChangeListener(OverlayChangeListener listener) {
        if (listener == null) {
            throw new IllegalArgumentException("Null 'listener' argument.");
        } 
        this.changeListeners.add(OverlayChangeListener.class, listener);
6
CodeRank
This code example shows how to use the following methods:
    /** 
     * Creates a new instance. 
     */ 
    protected AbstractDialLayer() { 
        this.visible = true;
        this.listenerList = new EventListenerList();
    } 
 
    /** 
     * Returns <code>true</code> if this layer is visible (should be displayed), 
     * and <code>false</code> otherwise. 
     * 
     * @return A boolean. 
     * 
     * @see #setVisible(boolean) 
     */ 
    public boolean isVisible() { 
        return this.visible;
    } 
 
5
CodeRank
This code example shows how to use the following methods:
     * Constructs a dataset. By default, the dataset is assigned to its own 
     * group. 
     */ 
    protected AbstractDataset() { 
        this.group = new DatasetGroup();
        this.listenerList = new EventListenerList();
    } 
 
    /** 
     * Returns the dataset group for the dataset. 
     * 
     * @return The group (never <code>null</code>). 
     * 
     * @see #setGroup(DatasetGroup) 
     */ 
    public DatasetGroup getGroup() { 
        return this.group;
    } 
 
    /** 
5
CodeRank
This code example shows how to use the following methods:
 * 
 * @author  rogan 
 */ 
public abstract class AbstractUrlModel implements UrlModel { 
     
    private EventListenerList _listenerList = new EventListenerList();
     
    private Logger _logger = Logger.getLogger(getClass().getName());
     
    /** Creates a new instance of AbstractUrlModel */ 
    public AbstractUrlModel() { 
    } 
     
    public abstract int getChildCount(HttpUrl parent);
     
    public abstract int getIndexOf(HttpUrl url);
     
    public abstract HttpUrl getChildAt(HttpUrl parent, int index);
     
    public abstract Sync readLock(); 
5
CodeRank
This code example shows how to use the following methods:
        if (key == null) {
            throw new IllegalArgumentException("Null 'key' argument.");
        } 
        this.key = key;
        this.description = description;
        this.listeners = new EventListenerList();
        this.propertyChangeSupport = new PropertyChangeSupport(this);
        this.notify = true;
    } 
 
    /** 
     * Returns the key for the series. 
     * 
     * @return The series key (never <code>null</code>). 
     * 
     * @see #setKey(Comparable) 
     */ 
    public Comparable getKey() {
        return this.key;
    } 
5
CodeRank
This code example shows how to use the following methods:
public abstract class ColumnDataModel<T> { 
     
    /** 
     * Maintains the list of listeners 
     */ 
    protected EventListenerList _listenerList = new EventListenerList();
     
    private String name = null;
    private Class<?> clazz = Object.class;
     
    /** 
     * Creates a new ColumnDataModel 
     */ 
    protected ColumnDataModel(String name, Class<?> clazz) {
    	this.name = name;
    	this.clazz = clazz;
    } 
    /** 
     * Used by the "composing" table model to determine what the class of the 
     * column objects is. 
5
CodeRank
See Code Examples for Java 8 EventListenerList Methods: