EventListenerList getListeners - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for EventListenerList getListeners method.

This code example shows how to use the following methods:getListeners
   * <code>SearchPane</code> with addSearchListener(). 
   * @return all of the <code>SearchListener</code>s added or an empty array if 
   * no listeners have been added 
   */ 
  public CloseableTabbedPaneListener[] getCloseableTabbedPaneListener() { 
    return listenerList.getListeners(CloseableTabbedPaneListener.class);
  } 
  
  /** 
   * Notifies all listeners that have registered interest for notification on 
   * this event type. 
   * @param tabIndexToClose the index of the tab which should be closed 
   * @return true if the tab can be closed, false otherwise 
   */ 
  protected boolean fireCloseTab(int tabIndexToClose) {
    boolean closeit = true;
    // Guaranteed to return a non-null array 
    Object[] listeners = listenerList.getListenerList();
    for (Object i : listeners) { 
      if (i instanceof CloseableTabbedPaneListener) { 
5
CodeRank
This code example shows how to use the following methods:getListeners
				((ViewTransformerListener) listeners[i + 1]).transformerChanged(e);
			} 
		} 
	} 
    public EventListener[] getListeners(Class listenerType) {
    	return listenerList.getListeners(listenerType);
       } 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
CodeRank
This code example shows how to use the following methods:getListeners
 				((FieldArrayListener) listeners[i + 1]).fieldArrayChanged(e);
 			} 
 		} 
 	} 
     public EventListener[] getFieldArrayListeners(Class listenerType) { 
     	return listenerList.getListeners(listenerType); 
      } 
 
	 
	 
 
} 
3
CodeRank
This code example shows how to use the following methods:getListeners
     * @return An array of listeners. 
     */ 
    public EventListener[] getListeners(Class listenerType) {
        if (listenerType == ChartMouseListener.class) {
            // fetch listeners from local storage 
            return this.chartMouseListeners.getListeners(listenerType);
        } 
        else { 
            return super.getListeners(listenerType);
        } 
    } 
 
    /** 
     * Creates a popup menu for the panel. 
     * 
     * @param properties  include a menu item for the chart property editor. 
     * @param save  include a menu item for saving the chart. 
     * @param print  include a menu item for printing the chart. 
     * @param zoom  include menu items for zooming. 
     * 
2
CodeRank
This code example shows how to use the following methods:getListeners
		} 
 
 
 
    public EventListener[] getListeners(Class listenerType) { 
    	return listenerList.getListeners(listenerType); 
       } 
	 
    public boolean isReadOnly(){ 
    	NodeModel nodeModel=cache.getModel();
    	return !nodeModel.isLocal()&&!nodeModel.isMaster()&&!Environment.getStandAlone();
    } 
	 
 
	 
} 
3
CodeRank
This code example shows how to use the following methods:getListeners
	} 
	public JobQueueListener[] getListeners() { 
		return (JobQueueListener[]) queueListenerList.getListeners(JobQueueListener.class);
	} 
    public EventListener[] getListeners(Class listenerType) {
    	return queueListenerList.getListeners(listenerType);
    } 
 
 	protected void fireProgressChanged(Object source,float progress) {
		Object[] listeners = queueListenerList.getListenerList();
		JobQueueEvent e = null;
		for (int i = listeners.length - 2; i >= 0; i -= 2) {
			if (listeners[i] == JobQueueListener.class) {
				if (e == null) {
					e = new JobQueueEvent(source,progress);
				} 
				((JobQueueListener) listeners[i + 1]).progressChanged(e);
 
			} 
		} 
3
CodeRank
This code example shows how to use the following methods:getListeners
				((NetworkLayoutListener) listeners[i + 1]).layoutChanged(e);
			} 
		} 
	} 
    public EventListener[] getListeners(Class listenerType) { 
    	return listenerList.getListeners(listenerType); 
       } 
 
	 
} 
3
CodeRank
This code example shows how to use the following methods:getListeners
     *         array if no listeners have been added 
     * @since 1.4 
     */ 
    public ActionListener[] getActionListeners()
    { 
        return listenerList.getListeners(ActionListener.class);
    } 
 
    private void initialize() 
    { 
        GridBagLayout gridBagLayout = new GridBagLayout();
        gridBagLayout.columnWidths = new int[] {0, 0, 0, 0};
        gridBagLayout.rowHeights = new int[] {0, 0, 0, 0};
        gridBagLayout.columnWeights = new double[] {0.0, 0.0, 0.0, Double.MIN_VALUE};
        gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, Double.MIN_VALUE};
        setLayout(gridBagLayout);
 
        topLeftBox = new PositionBox();
        topLeftBox.setToolTipText("Align content to top left");
        GridBagConstraints gbc_topLeftBox = new GridBagConstraints();
3
CodeRank
This code example shows how to use the following methods:getListeners
     * @return The array of listeners. 
     * 
     * @since 1.0.3 
     */ 
    public EventListener[] getListeners(Class listenerType) {
        return this.listenerList.getListeners(listenerType);
    } 
 
    /** 
     * Tests the marker for equality with an arbitrary object. 
     * 
     * @param obj  the object (<code>null</code> permitted). 
     * 
     * @return A boolean. 
     */ 
    public boolean equals(Object obj) { 
        if (obj == this) {
            return true; 
        } 
        if (!(obj instanceof Marker)) { 
4
CodeRank
This code example shows how to use the following methods:getListeners
		} 
 
 
 
    public EventListener[] getListeners(Class listenerType) { 
    	return listenerList.getListeners(listenerType); 
       } 
 
     
    public String toString(){
    	return "VisibleNodes:"+super.toString(); 
    } 
 
} 
3
CodeRank
getListeners Method Overview
Return an array of all the listeners of the given type.
See Code Examples for other Java 8 EventListenerList Methods: