Code example for Set

Methods: size, toArray

0
    } 
     
    private void checkMouseMotionListeners() { 
        if(mouseMotionListeners == null){
            mouseMotionListeners = (MouseMotionListener[])
            mouseMotionPluginList.toArray(new MouseMotionListener[mouseMotionPluginList.size()]);
        }  
    } 
     
    private void checkMouseWheelListeners() { 
        if(mouseWheelListeners == null) {
            mouseWheelListeners = (MouseWheelListener[])
            mouseWheelPluginList.toArray(new MouseWheelListener[mouseWheelPluginList.size()]);
        } 
    } 
 
    public void mouseClicked(MouseEvent e) {
        checkMouseListeners(); 
        for(int i=0; i<mouseListeners.length; i++) {
            mouseListeners[i].mouseClicked(e);
            if(e.isConsumed()) break;