Examples of MouseInputAdapter


Examples of javax.swing.event.MouseInputAdapter

    setMinimumSize( new Dimension( 64, 64 ));
    setPreferredSize( new Dimension( 128, 128 ));
    setBorder( BorderFactory.createEmptyBorder( insets.left, insets.top, insets.bottom, insets.right ));
//    setBorder( BorderFactory.createMatteBorder( insets.left, insets.top, insets.bottom, insets.right, Color.green ));

    MouseInputAdapter  mia  = new MouseInputAdapter() {
      public void mousePressed( MouseEvent e )
      {
        final Point2D mousePt  = getVirtualMousePos( e );
        isDragging        = true;
        processDrag( mousePt, !e.isControlDown() );
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

    updateCursorFormat();

// ----- afr export -----
    final JButton ggExportAFR = new JButton( getResourceString( "buttonDragRegion" ), new ImageIcon( getClass().getResource( "dragicon.png" )));
    ggExportAFR.setTransferHandler( new AFRTransferHandler() );
    final MouseInputAdapter expAFRmia = new MouseInputAdapter() {
      private MouseEvent dndInit = null;
      private boolean dndStarted = false;

      public void mousePressed( MouseEvent e )
      {
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

//    if( prefs != null ) {
//      new DynamicAncestorAdapter( new DynamicPrefChangeManager( prefs, KEYS, this )).addTo( this );
//    }

    MouseInputAdapter  mia  = new MouseInputAdapter() {
      private boolean didThemDragga = false;
   
      public void mousePressed( MouseEvent e )
      {
        Point2D  mousePt = getVirtualMousePos( e );
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        catch(Exception e) {
        }
        final JFrame frame = new JFrame("Shaped Window Demo");
        MouseInputAdapter handler = new MouseInputAdapter() {
            private Point offset;
            private void showPopup(MouseEvent e) {
                final JPopupMenu m = new JPopupMenu();
                m.add(new AbstractAction("Hide") {
                    public void actionPerformed(ActionEvent e) {
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

    public void run() {
        // Must find a graphics configuration with a depth of 32 bits
        GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();
        frame = new JFrame("Alpha Mask Demo");
        alphaWindow = new JWindow(frame, gconfig);
        MouseInputAdapter handler = new MouseInputAdapter() {
            private Point offset;
            public void mousePressed(MouseEvent e) {
                if (SwingUtilities.isLeftMouseButton(e))
                    offset = e.getPoint();
            }
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

        quit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
        MouseInputAdapter handler = new MouseInputAdapter() {
            private Point offset;

            public void mousePressed(MouseEvent e) {
                if (SwingUtilities.isLeftMouseButton(e))
                    offset = e.getPoint();
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

        }
        );

      // add mouse listener

      MouseInputAdapter mia = new MouseInputAdapter()
        {
            // mouse clicked event

            public void mouseClicked(MouseEvent e)
            {
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

   
    public GradientPreviewPanel() {
        start = new Point2D.Float(10,10);
        end = new Point2D.Float(80,10);
        checker_texture = ColorUtil.getCheckerPaint();
        MouseInputAdapter ma = new GradientMouseHandler();
        this.addMouseListener(ma);
        this.addMouseMotionListener(ma);
    }
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

    /**
     * Creates new EyeDropperColorChooserPanel
     */
    public EyeDropperColorChooserPanel() {
        initComponents();
        MouseInputAdapter mia = new MouseInputAdapter() {
            @Override
            public void mousePressed(MouseEvent evt) {
            }
            @Override
            public void mouseDragged(MouseEvent evt) {
View Full Code Here

Examples of javax.swing.event.MouseInputAdapter

                                                  null, recentSwatchSize);
        right.add(BorderLayout.CENTER, new JLabel(UIManager.getString("ColorChooser.swatchesRecentText")));
        right.add(BorderLayout.SOUTH, recentPanel);

        swatchPanel = new SwatchPanel(MAIN_SWATCH_COLORS, recentPanel, swatchSize);
        MouseInputAdapter swatchMouseAdapter = new MouseInputAdapter() {
            public void mouseClicked(MouseEvent e) {
                getColorSelectionModel().setSelectedColor(swatchPanel.getColorAtLocation(e.getX(), e.getY(), true));
            }
            public void mouseMoved(MouseEvent e) {
                Color color = swatchPanel.getColorAtLocation(e.getX(), e.getY(), false);
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.