Package java.awt

Examples of java.awt.Component.addMouseListener()


      Component  c2;
     
      for( int i = 0; i < c.getComponentCount(); i++ ) {
        c2 = c.getComponent( i );
        collObservedComponents.add( c2 );
        c2.addMouseListener( this );
        c2.addMouseMotionListener( this );
        if( c2 instanceof Container ) addMouseListeners( (Container) c2 )// recurse
      }
    }
   
View Full Code Here


  MouseManager14(Viewer viewer, ActionManager actionManager) {
    this.viewer = viewer;
    this.actionManager = actionManager;
    Component display = viewer.getDisplay();
    display.addKeyListener(this);
    display.addMouseListener(this);
    display.addMouseMotionListener(this);
    display.addMouseWheelListener(this);
  }

  void clear() {
View Full Code Here

                                                          final AttributeSet attrs,
                                                          final FormView view) {
            final Component image = createImageComponent(model, attrs, view);

            // ActionPerformed
            image.addMouseListener(view.new MouseEventListener());

            return image;
        }

        public static Component createInputPasswordComponent(final Object model,
View Full Code Here

            @Override
            public void finished() {
                Component c = (Component) getValue();
                if (widget instanceof ConfigurableSnippetWidget)
                    c.addMouseListener(configurationButtonToggler);
                if (c instanceof JComponent) {
                    JComponent jc = (JComponent) c;
                    if (jc.getBorder() == null)
                        jc.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
                }
View Full Code Here

    }

    public void ancestorAdded(AncestorEvent event) {
      rootPane.getJMenuBar().setEnabled(false);
      final Component glassPane = rootPane.getRootPane().getGlassPane();
      glassPane.addMouseListener(mouseListener);
      glassPane.addMouseMotionListener(mouseListener);
      glassPane.setVisible(true);
      SwingUtilities.getWindowAncestor(rootPane).setFocusableWindowState(false);
    }
}
View Full Code Here

    protected void installListeners(Dockable dockable) {
        Set frameDraggers = getFrameDragSources(dockable);
        for(Iterator it=frameDraggers.iterator(); it.hasNext();) {
            Component frameDragSrc = (Component)it.next();
            frameDragSrc.addMouseListener(dragListener);
            frameDragSrc.addMouseMotionListener(dragListener);
        }

        dockable.addDockingListener(this);
    }
View Full Code Here

                }
            };
        }
        Component c = (Component) _mainImageDisplay;
        c.removeMouseListener(_pickObjectListener);
        c.addMouseListener(_pickObjectListener);
        c.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
        pickButton.setText(_I18N.getString("cancel"));
        _pickMode = true;
        _stats = null;
    }
View Full Code Here

      Component  c2;
     
      for( int i = 0; i < c.getComponentCount(); i++ ) {
        c2 = c.getComponent( i );
        collObservedComponents.add( c2 );
        c2.addMouseListener( this );
        c2.addMouseMotionListener( this );
        if( c2 instanceof Container ) addMouseListeners( (Container) c2 )// recurse
      }
    }
   
View Full Code Here

      Component[] component = c.getComponents();
      for (int i = 0 ; i < ncomponents ; i++) {
    Component comp = component[i];
    if(!comp.isVisible())
        continue;
    comp.addMouseListener(pma);
    comp.addMouseMotionListener(pma);
    if (on1dot4) {
        try {
      Class types[] = { Class.forName("java.awt.event.MouseWheelListener") };
      Object args[] = { pmwl };
View Full Code Here

    }

    private void addScrollPane( JScrollPane p )
    {
      final Component c = p.getViewport().getView();
      c.addMouseListener( this );
      c.addFocusListener( this );
      if( DEBUG ) System.err.println( "addFocus/MouseListener " + c.getClass().getName() + "(" + c.hashCode() + ")" );
    }

    private void removeScrollPane( JScrollPane p )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.