Demos and Usage of java.awt.Component.removeMouseListener(MouseListener l)


   1: import java.awt.event.*;
   2: import java.awt.Component;
   3: import java.util.ArrayList;
   4:         ...
   5: public class EventRecorder {
   6:     private Component _component;
   7: 
   8:         ...
   9: 
  10:     public EventRecorder(Component component) {
  11:         _component = component;
  12:         ...
  13:     public synchronized InputEvent[] stop() {
  14:         _component.removeMouseListener(_mouseRecorder);

View Full Code Here
   1:   }
   2:   protected void removeListener(Component c, EventListener e) {
   3:     if (c != null) {
   4:         ...
   5:       c.removeMouseListener( (MouseListener) e);
   6:       c.removeMouseMotionListener( (MouseMotionListener) e);
   7:         ...
   8:   }
   9:   protected void addListener(Component c, EventListener e) {
  10:     if (c != null) {
  11:         ...
  12:   }
  13:   protected void removeAllListeners(Component c) {

View Full Code Here
   1: 
   2: import java.awt.Component;
   3: import java.awt.event.ActionEvent;
   4:         ...
   5: 
   6:     private final Component     m_target;
   7:     private Listener            m_listener;
   8:         ...
   9:     
  10:     public MouseHoverer(Component target, int delay) {
  11:         if (target == null) {
  12:         ...
  13:         if (m_listener != null) {
  14:             m_target.removeMouseListener(m_listener);

View Full Code Here
   1: 
   2: import java.awt.Component;
   3: import java.awt.Cursor;
   4:         ...
   5:     protected void addMouseListener(
   6:         Component component,
   7:         MapContext context,
   8:         ...
   9:             for (int j=0;j<listeners.length;j++){
  10:                 component.removeMouseListener(listeners[j]);
  11:             }

View Full Code Here
   1: 
   2: import java.awt.Component;
   3: import java.awt.Graphics;
   4:         ...
   5: 
   6:    Component addedToComp;
   7:    
   8:         ...
   9: 
  10:    public void paintIcon(Component parent, Graphics g, int x, int y)
  11:    {
  12:         ...
  13:          {
  14:             addedToComp.removeMouseListener(this);

View Full Code Here
   1: import java.awt.Color;
   2: import java.awt.Component;
   3: import java.awt.event.ContainerEvent;
   4:         ...
   5:     public void mouseEntered(MouseEvent mouseEvent) {
   6:         effectsPanel.addEffect(new AlphaBurst((Component) mouseEvent.getComponent()));
   7:     }
   8:         ...
   9:     public void componentAdded(ContainerEvent containerEvent) {
  10:         Component component = containerEvent.getChild();
  11:         component.addMouseListener(this);
  12:         ...
  13:         Component component = (Component) containerEvent.getChild();
  14:         component.removeMouseListener(this);

View Full Code Here
   1:           if (SwingUtilities.isLeftMouseButton(e)) {
   2:             Component c = (Component) e.getSource();
   3:             Point p = SwingUtilities.convertPoint(c, e.getPoint(), scrollPane);
   4:         ...
   5:             scrollPane.setViewportView(list);
   6:             Component c = (Component) e.getSource();
   7:             show(c, 0, c.getHeight());
   8:         ...
   9:       AbstractButton c = (AbstractButton) getComponent(0);
  10:       c.removeMouseListener(popup.getMouseListener());
  11:       c.removeMouseMotionListener(popup.getMouseMotionListener());

View Full Code Here
   1: 
   2: import java.awt.Component;
   3: import java.awt.KeyEventDispatcher;
   4:         ...
   5: 
   6: public class DefaultComponentController<T extends Component> 
   7:                                 implements IComponentController<T> {
   8:         ...
   9:     
  10:     private void registerMouseListener(Component c) {
  11:         m_mouseListener = new MouseListenerImpl();
  12:         ...
  13:     private void unregisterMouseListener(Component c) {
  14:         c.removeMouseListener(m_mouseListener);

View Full Code Here
   1:         m_lines.clear();
   2:         Component[] components = getComponents();
   3:         for (int i = 0; i < components.length; i++)
   4:         ...
   5:         {
   6:             Component component = components[i];
   7:         ...
   8:             component.removeMouseListener(this);
   9:             component.removeMouseMotionListener(this);

View Full Code Here
   1:       else if (JInternalFrame.IS_SELECTED_PROPERTY.equals(prop)) {
   2:         Component glassPane = f.getGlassPane();
   3:         if (newValue == Boolean.TRUE && oldValue == Boolean.FALSE) {
   4:         ...
   5: 
   6:     private Component mouseEventTarget = null;
   7: 
   8:         ...
   9: 
  10:     private void setMouseTarget(Component target, MouseEvent e) {
  11:       if (mouseEventTarget != null) {

View Full Code Here
   1: 
   2:   protected Component dynamicDateStrut = null;
   3: 
   4:         ...
   5:       {
   6:         dynamicDateStrut.removeMouseListener(popupMouseListener);
   7:         remove(dynamicDateStrut);
   8:         ...
   9:     {
  10:       dynamicDateStrut.removeMouseListener(popupMouseListener);
  11:       remove(dynamicDateStrut);

View Full Code Here
   1: import java.util.Arrays;
   2: import java.awt.Component;
   3: import java.awt.Dimension;
   4:         ...
   5: 
   6:     public StatusBar(final Component mapPane) {
   7:         this();
   8:         ...
   9:                         BorderFactory.createLoweredBevelBorder(),
  10:     public void registerMapPane(final Component mapPane) {
  11:         mapPane.removeMouseMotionListener(this);
  12:         ...
  13:         mapPane.removeMouseListener(listener);

View Full Code Here
   1: import java.awt.Color;
   2: import java.awt.Component;
   3: import java.awt.Dimension;
   4:         ...
   5:     private LinkedList<MenuItem>    menuItems=new LinkedList<MenuItem>();
   6:     private Map<Component, MenuItem> menuMap = new HashMap<Component, MenuItem>();
   7:     private int lastSelection   = -1;
   8:         ...
   9:         menuMap.put(component, item);
  10:         component.removeMouseListener(carousel);
  11:         return component;
  12:         ...
  13:         menuModel.addElement(item);
  14:         comp.removeMouseListener(carousel);

View Full Code Here
   1: 
   2:   public final static void installRolloverListener(Component c)
   3:   {
   4:         ...
   5: 
   6:   public final static void uninstallRolloverListener(Component c)
   7:   {
   8:         ...
   9:     {
  10:       c.removeMouseListener(mouseListener);
  11:     }
  12:         ...
  13: 
  14:   public final static int getStatus(Component c)

View Full Code Here
   1: import java.awt.Color;
   2: import java.awt.Component;
   3: import java.awt.Cursor;
   4:         ...
   5: 
   6:         protected Component source;
   7: 
   8:         ...
   9:         protected Component destination;
  10: 
  11:         ...
  12:             if (source != null) {
  13:                 source.removeMouseListener(this);

View Full Code Here