IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

AWT/Swing Java Discussion :

[JLayerPane] glasspane et probleme de drag'n drop


Sujet :

AWT/Swing Java

  1. #1
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut [JLayerPane] glasspane et probleme de drag'n drop
    Je voulais faire un composant capable d'afficher une vue zoomee de l'interface graphique sous-jacente (utile pour aller verifier des rendus). Plutot que de bidouille le glasspane de la JFrame, j'ai prefere faire quelque chose base sur le JLayeredPane qui soit capable de fonctionner dans des sous-regions de l'interface et d'etre plus facilement reutilisable.
    Egalement c'etait une bonne excuse pour aller mettre en pratique et tester certaines choses vue dans le bouquin de Gfx

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
     
    package test;
     
    import java.awt.*;
    import java.beans.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.net.*;
    import java.lang.ref.*;
    import javax.imageio.*;
    import javax.swing.*;
    import javax.swing.event.*;
     
    /**
     * <p>Title: </p>
     *
     * <p>Description: </p>
     *
     * <p>Copyright: Copyright (c) 2006</p>
     *
     * <p>Company: </p>
     *
     * @author not attributable
     * @version 1.0
     */
    public class ZoomPane<T extends JComponent> extends JComponent {
    	/**
             * 
             */
    	private static final long serialVersionUID = 1L;
     
    	private JLayeredPane delegated = new JLayeredPane();
     
    	private WeakReference<T> target;
     
    	private ContentPane contentPane;
     
    	private ZoomWindow zoomWindow;
     
    	/** Creates a new instance.
             * @param target The target component.
             */
    	public ZoomPane(T target) {
    		super();
    		InnerListener innerListener = new InnerListener();
    		this.target = new WeakReference<T>(target);
    		///////////////////////////////////////
    		contentPane = new ContentPane();
    		contentPane.add(target, BorderLayout.CENTER);
    		zoomWindow = new ZoomWindow(contentPane);
    		delegated.addComponentListener(innerListener);
    		delegated.add(contentPane, JLayeredPane.DEFAULT_LAYER);
    		delegated.add(zoomWindow, JLayeredPane.PALETTE_LAYER);
    		///////////////////////////////////////
    		setLayout(new BorderLayout());
    		add(delegated, BorderLayout.CENTER);
    	}
     
    	public T getTarget() {
    		return target.get();
    	}
     
    	/** Self-test main.
             * @param args Arguments from the command-line.
             * @throws Exception In case of error.
             */
    	public static void main(String... args) throws Exception {
    		System.out.println(System.getProperty("java.version"));
    		try {
    			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    		}
    		catch (Exception e) {
    			e.printStackTrace();
    		}
    		SwingUtilities.invokeLater(new Runnable() {
    			public void run() {
    				JComponent lensPanel = new DefaultLensRenderer<JComponent>(null);
    				JToolBar toolBar = new JToolBar();
    				toolBar.add(new JButton("Test 1"));
    				toolBar.add(new JButton("Test 2"));
    				toolBar.add(new JButton("Test 3"));
    				JPanel target = new JPanel();
    				target.setLayout(new BorderLayout());
    				target.add(new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(new JTree()), lensPanel), BorderLayout.CENTER);
    				target.add(toolBar, BorderLayout.NORTH);
    				target.add(new JProgressBar(), BorderLayout.SOUTH);
    				//JComponent target = new DefaultLensRenderer<JComponent>(null);
    				// Cause the component is translucent.
    				//JPanel panel = new JPanel();
    				//panel.setLayout(new BorderLayout());
    				//panel.add(target);
    				//TrackingPane<JPanel> trackingPane = new TrackingPane<JPanel>(panel);
    				ZoomPane<JPanel> trackingPane = new ZoomPane<JPanel>(target);
    				JFrame frame = new JFrame("Test ");
    				frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    				frame.setLayout(new BorderLayout());
    				frame.add(trackingPane, BorderLayout.CENTER);
    				frame.setSize(700, 700);
    				frame.setLocationRelativeTo(null);
    				frame.setVisible(true);
    			}
    		});
     
    	}
     
    	/** Default container.
             * @author fabriceb
             */
    	private static class ContentPane extends JComponent {
    		/**
                     * 
                     */
    		private static final long serialVersionUID = 1L;
     
    		/** Creates a new instance.
                     */
    		public ContentPane() {
    			super();
    			setLayout(new BorderLayout());
    		}
     
    		/** {@inheritDoc}
                     */
    		@Override protected void paintComponent(Graphics graphics) {
    			//graphics.setColor(Color.BLACK);
    			//graphics.drawString("This is the content pane ! " + getSize(), 100, 200);
    		}
    	}
     
    	/** Zoom layer.
             * @author fabriceb
             */
    	private static class ZoomWindow extends JComponent implements ActionListener, PropertyChangeListener, MouseListener, MouseMotionListener, MouseWheelListener {
     
    		/**
                     * 
                     */
    		private static final long serialVersionUID = 1L;
     
    		private JComponent contentPane;
     
    		private Corner corner = Corner.BOTTOM_RIGHT;
     
    		private Timer timer = new Timer(750, this);
     
    		private boolean render = true;
     
    		private int currentX;
     
    		private int currentY;
     
    		private DefaultLensRenderer<JComponent> renderer;
     
    		public ZoomWindow(JComponent contentPane) {
    			super();
    			//
    			this.contentPane = contentPane;
    			renderer = new DefaultLensRenderer<JComponent>(contentPane);
    			//
    			setLayout(null);
    			add(renderer);
    			//
    			addMouseListener(this);
    			addMouseMotionListener(this);
    			addMouseWheelListener(this);
    			contentPane.addPropertyChangeListener(this);
    			//Very slow if activated.
    			//enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
    			//enableEvents(AWTEvent.MOUSE_EVENT_MASK);
    			// Alternate solution.
    			//setSize(new Dimension(windowArea, windowArea));
    			timer.setRepeats(true);
    			timer.start();
    		}
     
    		void updateLens() {
    			if ((render) && (contentPane != null)) {
    				int lensWidth = renderer.getWidth();
    				int lensHeight = renderer.getHeight();
    				repaint(renderer.getX(), renderer.getY(), lensWidth, lensHeight);
    				corner = Corner.getCorner(currentX + lensWidth / 2f, currentY + lensHeight / 2f, 0.92f * lensWidth / 2f, contentPane.getWidth(), contentPane.getHeight());
    				//
    				renderer.setCorner(corner);
    				renderer.setCurrentPosition(currentX, currentY);
    				switch (corner) {
    					case TOP_LEFT: {
    						renderer.setLocation(currentX - lensWidth, currentY - lensHeight);
    					}
    						break;
    					case TOP_RIGHT: {
    						renderer.setLocation(currentX, currentY - lensHeight);
    					}
    						break;
    					case BOTTOM_LEFT: {
    						renderer.setLocation(currentX - lensWidth, currentY);
    					}
    						break;
    					case BOTTOM_RIGHT:
    					default: {
    						renderer.setLocation(currentX, currentY);
    					}
    						repaint(renderer.getX(), renderer.getY(), lensWidth, lensHeight);
    				}
    			}
    		}
     
    		///////////////////////
    		// Event management. //
    		///////////////////////
     
    		/** {@inheritDoc}
                     */
    		public void actionPerformed(ActionEvent event) {
    			if (isVisible()) {
    				renderer.refreshDisplay();
    			}
    		}
     
    		/** {@inheritDoc}
                     */
    		public void propertyChange(PropertyChangeEvent event) {
    			System.out.println("Received : " + event.getPropertyName());
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseClicked(MouseEvent event) {
    			redispatchMouseEvent(event);
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mousePressed(MouseEvent event) {
    			redispatchMouseEvent(event);
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseReleased(MouseEvent event) {
    			redispatchMouseEvent(event);
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseEntered(MouseEvent event) {
    			//setVisible(true);
    			render = true;
    			redispatchMouseEvent(event);
    			repaint();
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseExited(MouseEvent event) {
    			// Hides but cannot be made visible after.
    			//setVisible(false);			
    			render = false;
    			redispatchMouseEvent(event);
    			repaint();
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseDragged(MouseEvent event) {
    			mouseMoved(event);
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseMoved(MouseEvent event) {
    			if ((event.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != MouseEvent.CTRL_DOWN_MASK) {
    				currentX = event.getX();
    				currentY = event.getY();
    				redispatchMouseEvent(event);
    				updateLens();
    			}
    		}
     
    		/** {@inheritDoc}
                     */
    		public void mouseWheelMoved(MouseWheelEvent event) {
    			//System.out.println("Received mouse wheel event. " + event);
    			if (event.getWheelRotation() < 0) {
    				renderer.zoomIn();
    			} else {
    				renderer.zoomOut();
    			}
    			redispatchMouseWheelEvent(event);
    			updateLens();
    		}
     
    		/** As seen on  http://weblogs.java.net/blog/joshy/archive/2003/10/swing_hack_4_th.html
                     * @param event The MouseEvent to forward.
                     */
    		private void redispatchMouseEvent(MouseEvent event) {
    			// get the mouse click point relative to the content pane
    			Point containerPoint = SwingUtilities.convertPoint(this, event.getPoint(), contentPane);
    			// find the component that under this point
    			Component component = SwingUtilities.getDeepestComponentAt(contentPane, containerPoint.x, containerPoint.y);
    			// return if nothing was found
    			if (component == null) {
    				return;
    			}
    			// convert point relative to the target component
    			Point componentPoint = SwingUtilities.convertPoint(this, event.getPoint(), component);
    			// redispatch the event
    			component.dispatchEvent(new MouseEvent(component, event.getID(), event.getWhen(), event.getModifiers(), componentPoint.x, componentPoint.y, event.getClickCount(), event.isPopupTrigger()));
    		}
     
    		/** Adapted from previous method. 
                     * @param event The MouseEvent to forward.
                     */
    		private void redispatchMouseWheelEvent(MouseWheelEvent event) {
    			// get the mouse click point relative to the content pane
    			Point containerPoint = SwingUtilities.convertPoint(this, event.getPoint(), contentPane);
    			// find the component that under this point
    			Component component = SwingUtilities.getDeepestComponentAt(contentPane, containerPoint.x, containerPoint.y);
    			// return if nothing was found
    			if (component == null) {
    				return;
    			}
    			// convert point relative to the target component
    			Point componentPoint = SwingUtilities.convertPoint(this, event.getPoint(), component);
    			// redispatch the event
    			component.dispatchEvent(new MouseWheelEvent(component, event.getID(), event.getWhen(), event.getModifiers(), componentPoint.x, componentPoint.y, event.getClickCount(), event.isPopupTrigger(), event.getScrollType(), event.getScrollAmount(), event.getWheelRotation()));
    		}
    	}
     
    	///////////////////////
    	// Event management. //
    	///////////////////////
     
    	private class InnerListener implements ComponentListener {
    		/** {@inheritDoc}
                     */
    		public void componentResized(ComponentEvent event) {
    			Object source = event.getSource();
    			if (source == delegated) {
    				int width = delegated.getWidth();
    				int height = delegated.getHeight();
    				contentPane.setBounds(0, 0, width, height);
    				contentPane.revalidate();
    				zoomWindow.setBounds(0, 0, width, height);
    				zoomWindow.revalidate();
    			}
    			repaint();
    		}
     
    		/** {@inheritDoc}
                     */
    		public void componentMoved(ComponentEvent event) {
    		}
     
    		/** {@inheritDoc}
                     */
    		public void componentShown(ComponentEvent event) {
    		}
     
    		/** {@inheritDoc}
                     */
    		public void componentHidden(ComponentEvent event) {
    		}
    	}
    }
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
     
    /**
     * 
     */
    package test;
     
    /**
     * @author fabriceb
     *
     */
    /** Lens positions.
     * @author fabriceb
     */
    public enum Corner {
    	BOTTOM_RIGHT, BOTTOM_LEFT, TOP_RIGHT, TOP_LEFT;
     
    	public static Corner getCorner(float x, float y, float margin, float width, float height) {
    		Corner result = BOTTOM_RIGHT;
    		if (x + margin >= width) {
    			result = BOTTOM_LEFT;
    		}
    		if (y + margin >= height) {
    			result = (result == BOTTOM_RIGHT) ? TOP_RIGHT : TOP_LEFT;
    		}
    		return result;
    	}
    }
    Note 1 : je poste la 3ieme classe apres car le message est trop gros.

    Note 2 : le code est pas tres propre car toujours entrain d'etre bidouille et certaines classes ou methodes donnees dans le livre et les exemples dispo sont necessaires a la compilation (flou gaussien, composites avancees). Ah oui et les boutons ne font rien pour le moment, faudra que j'en fasse des composants separes ulterieurement (faut zoomer avec la roulette de la souris).

    Bon ca marche et c'est meme rapide faut qu'il y a un probleme quand j'essaie de dragger la toolbar/la barre de separation du splitpane. Dans les deux cas ca la fenetre temporaire de la toolbar/effet de drap de la barre de separation apparait puis se fige et refuse categoriquement de continuer a se deplacer. Et ca reste indefiniment sur l'ecran tant qu'on a pas re-cliquer sur la toolbar/la barre de separation. Evidement si on rend le "glasspane" (zoomlayer) invisible au debut du drag, ca fonctionne mais apres bien sur, impossible de le rendre a nouveau visible puisqu'il ne detecte plus d'evenements. Des idees ?
    Images attachées Images attachées   
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  2. #2
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Code du rendu de la loupe :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
     
    /**
     * 
     */
    package test;
     
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.lang.ref.*;
    import java.text.*;
     
    import javax.swing.*;
     
    import composite.*;
     
    /**
     * @author fabriceb
     *
     */
    public class DefaultLensRenderer<T extends JComponent> extends JComponent {
    	private static final long serialVersionUID = 1L;
     
    	public static final float MIN_ZOOM_FACTOR = 0.125f;
     
    	public static final float MAX_ZOOM_FACTOR = 64;
     
    	private static Stroke SOLID_STROKE_1 = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
     
    	private static Stroke SOLID_STROKE_1_5 = new BasicStroke(1.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
     
    	private static Stroke SOLID_STROKE_3 = new BasicStroke(3f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
     
    	private static Font FONT_DIALOG_BOLD_12 = new Font("Dialog", Font.BOLD, 12);
     
    	private static Font FONT_DIALOG_BOLD_31 = FONT_DIALOG_BOLD_12.deriveFont(31f);
     
    	private Shape lensShape;
     
    	private Paint lensBackground;
     
    	private Paint lensForeground1;
     
    	private Paint lensForeground2;
     
    	private Paint buttonEnabledBackground;
     
    	private Paint buttonEnabledForeground1;
     
    	private Paint buttonEnabledForeground2;
     
    	private Paint buttonDisabledBackground;
     
    	private Paint buttonDisabledForeground1;
     
    	private Paint buttonDisabledForeground2;
     
    	private Paint lensLightBackground;
     
    	private Paint buttonLightBackground;
     
    	private Paint buttonEnabledLightBackground;
     
    	private Paint labelEnabledBackground;
     
    	private Paint labelEnabledForeground;
     
    	private Paint labelDisabledBackground;
     
    	private Paint labelDisabledForeground;
     
    	private int lensSize = 150;
     
    	private int lensInset = 8;
     
    	float lensCenterX = lensSize / 2f;
     
    	float lensCenterY = lensCenterX;
     
    	float lensRadius = 0.9f * lensSize / 2f;
     
    	float button1CenterX = (float) (lensCenterX + (1.1 * lensRadius) * Math.cos(Math.PI / 4f));
     
    	float button1CenterY = (float) (lensCenterY - (1.1 * lensRadius) * Math.sin(Math.PI / 4f));
     
    	float button2CenterX = button1CenterX;
     
    	float button2CenterY = (float) (lensCenterY + (1.1 * lensRadius) * Math.sin(Math.PI / 4f));
     
    	float buttonShapeRadius = 15;
     
    	float buttonRadius = 3f / 4f * buttonShapeRadius;
     
    	private Ellipse2D.Float ellipse = new Ellipse2D.Float();
     
    	private Shape buttonShape;
     
    	private Shape plusSign;
     
    	private Shape minusSign;
     
    	private BufferedImage lensImage;
     
    	private BufferedImage zoomedImage;
     
    	private BlendComposite dodgeComposite = BlendComposite.ColorDodge;
     
    	private Corner corner = Corner.BOTTOM_RIGHT;
     
    	private float zoomFactor = 8f;
     
    	private int currentX;
     
    	private int currentY;
     
    	private WeakReference<T> target;
     
    	NumberFormat format;
     
    	public DefaultLensRenderer(T target) {
    		this.target = new WeakReference<T>(target);
    		format = NumberFormat.getPercentInstance();
    		format.setMinimumFractionDigits(0);
    		format.setMaximumFractionDigits(1);
    		System.out.println("Radius is " + lensRadius);
    		setMinimumSize(new Dimension(lensSize, lensSize));
    		setSize(new Dimension(lensSize, lensSize));
    		setPreferredSize(new Dimension(lensSize, lensSize));
    	}
     
    	private void createPaints() {
    		float dist[] = { 0f, 0.4999f, 0.5f, 1f };
    		Color[] lensBackgroundColors = { new Color(98, 108, 136), new Color(63, 71, 86), new Color(21, 21, 22), new Color(60, 71, 111) };
    		Color[] lensForegroundColors = { new Color(123, 130, 150), new Color(91, 95, 105), new Color(64, 64, 63), new Color(100, 108, 137) };
    		lensBackground = new LinearGradientPaint(0, lensCenterY - lensRadius, 0, lensCenterY + lensRadius, dist, lensBackgroundColors);
    		lensForeground1 = new LinearGradientPaint(0, lensCenterY - lensRadius, 0, lensCenterY + lensRadius, dist, lensForegroundColors);
    		lensForeground2 = Color.BLACK;
    		Color[] buttonEnabledBackgroundColors = { new Color(168, 181, 228), new Color(92, 117, 198), new Color(0, 29, 145), new Color(83, 215, 255) };
    		Color[] buttonEnabledForegroundColors = { new Color(191, 206, 243), new Color(129, 163, 242), new Color(27, 47, 185), new Color(141, 255, 255) };
    		buttonEnabledBackground = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, buttonEnabledBackgroundColors);
    		buttonEnabledForeground1 = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, buttonEnabledForegroundColors);
    		buttonEnabledForeground2 = Color.BLUE;
    		Color[] buttonDisabledBackgroundColors = lensBackgroundColors;
    		Color[] buttonDisabledForegroundColors = lensForegroundColors;
    		buttonDisabledBackground = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, buttonDisabledBackgroundColors);
    		buttonDisabledForeground1 = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, buttonDisabledForegroundColors);
    		buttonDisabledForeground2 = lensForeground2;
    		//Color[] labelEnabledBackgroundColors = { new Color(254, 254, 255), new Color(249, 251, 255), new Color(211, 216, 223), new Color(230, 235, 242) };
    		Color[] labelEnabledBackgroundColors = { new Color(254, 254, 255), new Color(249, 251, 255), new Color(141, 146, 153), new Color(160, 165, 172) };
    		Color[] labeldDisabledBackgroundColors = { new Color(156, 161, 168), new Color(146, 151, 158), new Color(98, 103, 110), new Color(94, 99, 106) };
    		labelEnabledBackground = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, labelEnabledBackgroundColors);
    		labelEnabledForeground = buttonDisabledForeground1;
    		labelDisabledBackground = new LinearGradientPaint(0, 0, 0, 2 * buttonRadius, dist, labeldDisabledBackgroundColors);
    		labelDisabledForeground = buttonDisabledForeground1;
    		dist = new float[] { 0f, 0.02f, 0.95f, 1f };
    		Color[] lightColor = { new Color(127, 127, 127, 127), new Color(127, 127, 127, 0), new Color(127, 127, 127, 0), new Color(127, 127, 127, 127) };
    		lensLightBackground = new LinearGradientPaint(0, lensCenterY - lensRadius, 0, lensCenterY + lensRadius, dist, lightColor);
    		dist = new float[] { 0.5f, 0.95f };
    		lightColor = new Color[] { new Color(0, 0, 0, 0), new Color(100, 100, 100, 100) };
    		buttonLightBackground = new RadialGradientPaint(buttonRadius, buttonRadius, buttonRadius, dist, lightColor);
    		dist = new float[] { 0f, 0.75f };
    		lightColor = new Color[] { new Color(0, 0, 0, 0), new Color(127, 127, 127, 127) };
    		buttonEnabledLightBackground = new RadialGradientPaint(buttonRadius, 2 / 3f * buttonRadius, 4 / 3f * buttonRadius, dist, lightColor);
    	}
     
    	private void createShapes(Graphics2D g2d) {
    		// Lens.
    		RoundRectangle2D.Float rectangle = new RoundRectangle2D.Float();
    		switch (corner) {
    			case TOP_LEFT: {
    				rectangle.setRoundRect(lensCenterX, lensCenterY, lensRadius, lensRadius, lensInset, lensInset);
    			}
    				break;
    			case TOP_RIGHT: {
    				rectangle.setRoundRect(lensCenterX - lensRadius, lensCenterY, lensRadius, lensRadius, lensInset, lensInset);
    			}
    				break;
    			case BOTTOM_LEFT: {
    				rectangle.setRoundRect(lensCenterX, lensCenterY - lensRadius, lensRadius, lensRadius, lensInset, lensInset);
    			}
    				break;
    			case BOTTOM_RIGHT:
    			default: {
    				rectangle.setRoundRect(lensCenterX - lensRadius, lensCenterY - lensRadius, lensRadius, lensRadius, lensInset, lensInset);
    			}
    		}
     
    		Area area = new Area(rectangle);
    		switch (corner) {
    			case TOP_LEFT: {
    				rectangle.setRoundRect(lensCenterX + lensInset, lensCenterY + lensInset, lensRadius - 2 * lensInset, lensRadius - 2 * lensInset, lensInset / 2f, lensInset / 2f);
    			}
    				break;
    			case TOP_RIGHT: {
    				rectangle.setRoundRect(lensCenterX - lensRadius + lensInset, lensCenterY + lensInset, lensRadius - 2 * lensInset, lensRadius - 2 * lensInset, lensInset / 2f, lensInset / 2f);
    			}
    				break;
    			case BOTTOM_LEFT: {
    				rectangle.setRoundRect(lensCenterX + lensInset, lensCenterY - lensRadius + lensInset, lensRadius - 2 * lensInset, lensRadius - 2 * lensInset, lensInset / 2f, lensInset / 2f);
    			}
    				break;
    			case BOTTOM_RIGHT:
    			default: {
    				rectangle.setRoundRect(lensCenterX - lensRadius + lensInset, lensCenterY - lensRadius + lensInset, lensRadius - 2 * lensInset, lensRadius - 2 * lensInset, lensInset / 2f, lensInset / 2f);
    			}
    		}
    		area.subtract(new Area(rectangle));
    		rectangle.setRoundRect(lensCenterX - lensRadius, lensCenterY + lensRadius - 20, lensRadius, 20, lensInset / 2f, lensInset / 2f);
    		area.add(new Area(rectangle));
    		ellipse.setFrameFromCenter(lensCenterX, lensCenterY, lensCenterX + lensRadius, lensCenterY + lensRadius);
    		area.add(new Area(ellipse));
    		ellipse.setFrameFromCenter(button1CenterX, button1CenterY, button1CenterX + 15, button1CenterY + 15);
    		area.add(new Area(ellipse));
    		ellipse.setFrameFromCenter(button2CenterX, button2CenterY, button2CenterX + 15, button2CenterY + 15);
    		area.add(new Area(ellipse));
    		area.subtract(new Area(getZoomAreaShape()));
    		lensShape = area;
    		// Button shape
    		buttonShape = new Ellipse2D.Float(0, 0, buttonRadius * 2, buttonRadius * 2);
    		Font font = FONT_DIALOG_BOLD_31;
    		// Plus sign.
    		plusSign = font.createGlyphVector(g2d.getFontRenderContext(), "+").getGlyphOutline(0);
    		Rectangle2D plusBounds = plusSign.getBounds();
    		plusSign = AffineTransform.getTranslateInstance(buttonRadius - plusBounds.getX() - plusBounds.getWidth() / 2f, buttonRadius - plusBounds.getY() - plusBounds.getHeight() / 2f).createTransformedShape(plusSign);
    		// Minus sign.
    		minusSign = font.createGlyphVector(g2d.getFontRenderContext(), "-").getGlyphOutline(0);
    		Rectangle2D minusBounds = minusSign.getBounds();
    		minusSign = AffineTransform.getTranslateInstance(buttonRadius - minusBounds.getX() - minusBounds.getWidth() / 2f, buttonRadius - minusBounds.getY() - minusBounds.getHeight() / 2f).createTransformedShape(minusSign);
    	}
     
    	/** Clear the content of the image (all pixels are made fully transparent).
             * @param image The image to be cleared.
             */
    	private void clearImageContent(BufferedImage image) {
    		int width = image.getWidth();
    		int height = image.getHeight();
    		Graphics2D g2d = image.createGraphics();
    		try {
    			//g2d.fillRect(0, 0, width, height);
    			//g2d.setColor(Color.BLACK);
    			//g2d.setComposite(AlphaComposite.SrcIn);
    			g2d.setComposite(AlphaComposite.Src);
    			g2d.setColor(new Color(0, 0, 0, 0));
    			g2d.fillRect(0, 0, width, height);
    			//g2d.setComposite(AlphaComposite.SrcOver);
    		}
    		finally {
    			g2d.dispose();
    		}
    	}
     
    	protected BufferedImage createLensDodgeImage(BufferedImage image) {
    		if (image == null) {
    			image = getGraphicsConfiguration().createCompatibleImage(lensSize, lensSize, Transparency.TRANSLUCENT);
    		}
    		clearImageContent(image);
    		Graphics2D g2d = image.createGraphics();
    		try {
    			g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    			// Render Lens.
    			g2d.setPaint(lensLightBackground);
    			g2d.fill(lensShape);
    		}
    		finally {
    			g2d.dispose();
    		}
    		// Blur.
    		BufferedImageOp filter = BlurUtils.getGaussianBlurFilter(8, true);
    		image = filter.filter(image, null);
    		filter = BlurUtils.getGaussianBlurFilter(8, false);
    		image = filter.filter(image, null);
    		return image;
    	}
     
    	protected BufferedImage createButtonDodgeImage(BufferedImage image, boolean enabled) {
    		if (image == null) {
    			image = getGraphicsConfiguration().createCompatibleImage((int) (2 * buttonRadius), (int) (2 * buttonRadius), Transparency.TRANSLUCENT);
    		}
    		clearImageContent(image);
    		Graphics2D g2d = image.createGraphics();
    		try {
    			g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    			// Render Lens.
    			g2d.setPaint(buttonLightBackground);
    			g2d.fill(buttonShape);
    			if (enabled) {
    				ellipse.setFrame(0.5f * buttonRadius, 2 / 3f * buttonRadius, buttonRadius, 4 / 3f * buttonRadius);
    				g2d.setPaint(buttonEnabledLightBackground);
    				g2d.fill(ellipse);
    			}
    		}
    		finally {
    			g2d.dispose();
    		}
    		//Blur
    		BufferedImageOp filter = BlurUtils.getGaussianBlurFilter(4, true);
    		image = filter.filter(image, null);
    		filter = BlurUtils.getGaussianBlurFilter(4, false);
    		image = filter.filter(image, null);
    		return image;
    	}
     
    	protected BufferedImage createLensImage(BufferedImage image) {
    		if (image == null) {
    			image = getGraphicsConfiguration().createCompatibleImage(lensSize, lensSize, Transparency.TRANSLUCENT);
    		}
    		clearImageContent(image);
    		Graphics2D g2d = image.createGraphics();
    		try {
    			g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    			g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    			if (lensShape == null) {
    				createShapes(g2d);
    				createPaints();
    			}
    			// Draw guides (debug).
    			/*
    			 g2d.setStroke(SOLID_STROKE_1);
    			 g2d.setColor(Color.CYAN);
    			 RoundRectangle2D.Float rectangle = new RoundRectangle2D.Float(lensCenterX - lensRadius, lensCenterY - lensRadius, lensRadius * 2, lensRadius * 2, lensInset, lensInset);
    			 g2d.draw(rectangle);
    			 rectangle.setRoundRect(lensCenterX - lensRadius + lensInset, lensCenterY - lensRadius + lensInset, 2 * lensRadius - 2 * lensInset, 2 * lensRadius - 2 * lensInset, lensInset / 2f, lensInset / 2f);
    			 g2d.draw(rectangle);
    			 */
    			// Draw axis.
    			g2d.setColor(Color.BLACK);
    			g2d.drawLine((int) (lensCenterX), (int) (lensCenterY - lensRadius + lensInset), (int) (lensCenterX), (int) (lensCenterY + lensRadius - lensInset));
    			g2d.drawLine((int) (lensCenterX - lensRadius + lensInset), (int) (lensCenterY), (int) (lensCenterX + lensRadius - lensInset), (int) (lensCenterY));
    			// Render Lens.
    			g2d.setStroke(SOLID_STROKE_3);
    			g2d.setPaint(lensForeground2);
    			g2d.draw(lensShape);
    			g2d.setPaint(lensBackground);
    			g2d.fill(lensShape);
    			// Apply dodge image.
    			BufferedImage lensDodgeImage = createLensDodgeImage(null);
    			g2d.setComposite(dodgeComposite);
    			g2d.drawImage(lensDodgeImage, 0, 0, null);
    			g2d.setComposite(AlphaComposite.SrcOver);
    			g2d.setStroke(SOLID_STROKE_1_5);
    			g2d.setPaint(lensForeground1);
    			g2d.draw(lensShape);
    			// Render buttons.
    			/** @todo Delegate to buttons. */
    			// Top button.
    			{
    				float dx = button1CenterX - buttonRadius;
    				float dy = button1CenterY - buttonRadius;
    				g2d.translate(dx, dy);
    				g2d.setStroke(SOLID_STROKE_3);
    				g2d.setPaint(buttonEnabledForeground2);
    				g2d.draw(buttonShape);
    				g2d.setPaint(buttonEnabledBackground);
    				g2d.fill(buttonShape);
    				g2d.setPaint(labelEnabledBackground);
    				g2d.fill(plusSign);
    				g2d.setStroke(SOLID_STROKE_1);
    				g2d.setPaint(labelEnabledForeground);
    				g2d.draw(plusSign);
    				// Apply dodge image.
    				BufferedImage buttonDodgeImage = createButtonDodgeImage(null, true);
    				g2d.setComposite(dodgeComposite);
    				g2d.drawImage(buttonDodgeImage, 0, 0, null);
    				g2d.setComposite(AlphaComposite.SrcOver);
    				g2d.setStroke(SOLID_STROKE_1_5);
    				g2d.setPaint(buttonEnabledForeground1);
    				g2d.draw(buttonShape);
    				g2d.translate(-dx, -dy);
    			}
    			// Bottom button.
    			{
    				float dx = button2CenterX - buttonRadius;
    				float dy = button2CenterY - buttonRadius;
    				g2d.translate(dx, dy);
    				g2d.setStroke(SOLID_STROKE_3);
    				g2d.setPaint(buttonDisabledForeground2);
    				g2d.draw(buttonShape);
    				g2d.setPaint(buttonDisabledBackground);
    				g2d.fill(buttonShape);
    				g2d.setPaint(labelDisabledBackground);
    				g2d.fill(minusSign);
    				g2d.setStroke(SOLID_STROKE_1);
    				g2d.setPaint(labelDisabledForeground);
    				g2d.draw(minusSign);
    				// Apply dodge image.
    				BufferedImage buttonDodgeImage = createButtonDodgeImage(null, false);
    				g2d.setComposite(dodgeComposite);
    				g2d.drawImage(buttonDodgeImage, 0, 0, null);
    				g2d.setComposite(AlphaComposite.SrcOver);
    				g2d.setStroke(SOLID_STROKE_1_5);
    				g2d.setPaint(buttonDisabledForeground1);
    				g2d.draw(buttonShape);
    				g2d.translate(-dx, -dy);
    			}
    		}
    		finally {
    			g2d.dispose();
    		}
    		return image;
    	}
     
    	public void refreshDisplay() {
    		renderZoomedImage();
    		repaint();
    	}
     
    	private void renderZoomedImage() {
    		T target = getTarget();
    		if (target != null) {
    			if (zoomedImage == null) {
    				zoomedImage = getGraphicsConfiguration().createCompatibleImage(lensSize, lensSize, Transparency.TRANSLUCENT);
    			}
    			clearImageContent(zoomedImage);
    			Graphics2D g2d = zoomedImage.createGraphics();
    			try {
    				g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    				g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
    				// Render image.
    				g2d.setColor(Color.BLACK);
    				Shape lensShape = getZoomAreaShape();
    				g2d.fill(lensShape);
    				float dx = -currentX;
    				float dy = -currentY;
    				float sx = zoomFactor;
    				g2d.translate(lensCenterX, lensCenterY);
    				g2d.scale(sx, sx);
    				g2d.translate(dx, dy);
    				g2d.setComposite(AlphaComposite.SrcIn);
    				target.paint(g2d);
    			}
    			finally {
    				g2d.dispose();
    			}
    		}
    	}
     
    	@Override protected void paintComponent(Graphics graphics) {
    		Graphics2D g2d = (Graphics2D) graphics.create();
    		try {
    			g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    			if (zoomedImage == null) {
    				renderZoomedImage();
    			}
    			g2d.drawImage(zoomedImage, 0, 0, null);
    			if (lensImage == null) {
    				lensImage = createLensImage(lensImage);
    			}
    			g2d.drawImage(lensImage, 0, 0, null);
    			g2d.setColor(Color.WHITE);
    			String label = format.format(getZoomFactor());
    			Font font = FONT_DIALOG_BOLD_12;
    			LineMetrics lineMetrics = font.getLineMetrics(label, g2d.getFontRenderContext());
    			g2d.setFont(font);
    			g2d.drawString(label, lensCenterX - lensRadius + 2, lensCenterY + lensRadius - 20 + 3 + lineMetrics.getAscent());
    		}
    		finally {
    			g2d.dispose();
    		}
    	}
     
    	/** Self-test main.
             * @param args Arguments from the command-line.
             */
    	public static void main(String... args) {
    		// TODO Auto-generated method stub
    		SwingUtilities.invokeLater(new Runnable() {
    			public void run() {
    				DefaultLensRenderer<JComponent> test = new DefaultLensRenderer<JComponent>(null);
    				JFrame frame = new JFrame("Test ");
    				frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    				frame.setLayout(new BorderLayout());
    				frame.add(test, BorderLayout.CENTER);
    				frame.setSize(700, 700);
    				frame.setLocationRelativeTo(null);
    				frame.setVisible(true);
    			}
    		});
    	}
     
    	///////////////////////
    	// Gettters/Setters. //
    	///////////////////////
     
    	public T getTarget() {
    		return target.get();
    	}
     
    	/** Gets the shape of the zoomed area.
             * @return A <code>Shape</code>.
             */
    	public Shape getZoomAreaShape() {
    		Ellipse2D.Float result = new Ellipse2D.Float();
    		result.setFrameFromCenter(lensCenterX, lensCenterY, lensCenterX + lensRadius - lensInset, lensCenterY + lensRadius - lensInset);
    		return result;
    	}
     
    	/* {@inheritDoc}
    	 */
    	public void setCorner(Corner value) {
    		if (value != null && !corner.equals(value)) {
    			corner = value;
    			lensShape = null;
    			lensImage = null;
    			repaint();
    		}
    	}
     
    	/* {@inheritDoc}
    	 */
    	public Corner getCorner() {
    		return corner;
    	}
     
    	public void zoomIn() {
    		setZoomFactor(getZoomFactor() * 2f);
    	}
     
    	public void zoomOut() {
    		setZoomFactor(getZoomFactor() / 2f);
    	}
     
    	public void setZoomFactor(float value) {
    		value = Math.max(value, MIN_ZOOM_FACTOR);
    		value = Math.min(value, MAX_ZOOM_FACTOR);
    		if (value != zoomFactor) {
    			zoomFactor = value;
    			renderZoomedImage();
    			repaint();
    		}
    	}
     
    	public float getZoomFactor() {
    		return zoomFactor;
    	}
     
    	public void setCurrentPosition(int x, int y) {
    		if ((x != currentX) || (y != currentY)) {
    			currentX = x;
    			currentY = y;
    			renderZoomedImage();
    			repaint();
    		}
    	}
    }
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  3. #3
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Au lieu de bouffer les évènements à coup de listeners divers pour ta loupe, pourquoi ne pas essayer de passer par un AWTEventListener qui lui ne consomme pas les évènements?
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  4. #4
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Tu parles de ca ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    //Very slow if activated.
    //enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
    //enableEvents(AWTEvent.MOUSE_EVENT_MASK);
    Le resultat n'etait pas top du tout genre tres lent et tres saccade. Ceci dit je suis peu habitue a manipuler les evenement de maniere globale (sans listener specialise) donc, je m'y suis peut-etre mal pris.
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  5. #5
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Je pensais plutôt à un truc dans ce style ('tain faisait un moment que j'avais pas lancé eclipse à la casa, surtout à cette heure là , vais encore me faire chambrer au taf demain matin sur la position de ma tête):


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
     
    import java.awt.AWTEvent;
    import java.awt.BorderLayout;
    import java.awt.Graphics;
    import java.awt.Toolkit;
    import java.awt.event.AWTEventListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
     
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JSplitPane;
    import javax.swing.JToolBar;
     
     
    public class TestAwtListener extends JComponent {
     
        private int crossX;
        private int crossY;
        private MyListener list;
     
     
        public TestAwtListener() {
            super();
            list = new MyListener();
            list.install();
     
        }
        private class MyListener implements AWTEventListener {
     
            public void install() {
                Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.MOUSE_MOTION_EVENT_MASK);            
            }
     
            public void uninstall() {
                Toolkit.getDefaultToolkit().removeAWTEventListener(this);            
            }
     
            @Override
            public void eventDispatched(AWTEvent event) {
                if(event instanceof MouseEvent) {
                    MouseEvent me = (MouseEvent) event;
                    int tempx=me.getXOnScreen();
                    int tempy = me.getYOnScreen();
     
     
                    crossX = TestAwtListener.this.getLocationOnScreen().x<tempx? tempx - TestAwtListener.this.getLocationOnScreen().x : 0;
                    crossY = TestAwtListener.this.getLocationOnScreen().y<tempy? tempy - TestAwtListener.this.getLocationOnScreen().y : 0;                
                    TestAwtListener.this.repaint();
                }
     
            }
     
        }
     
     
        /* (non-Javadoc)
         * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
         */
        @Override
        protected void paintComponent(Graphics g) {
     
            g.drawLine(0, crossY, getWidth(), crossY);
            g.drawLine(crossX, 0, crossX, getHeight());
            super.paintComponent(g);
        }
     
     
     
        public static void main(String[] args) {
            final JFrame f = new JFrame();
            JSplitPane split  = new JSplitPane();
            JButton b1 = new JButton("button 1");
            JButton b2 = new JButton("button 2");
            JButton b3 = new JButton("button 3");
            split.add(b1,JSplitPane.LEFT);
            split.add(b2,JSplitPane.RIGHT);
            b1.addActionListener(new ActionListener() {
     
                @Override
                public void actionPerformed(ActionEvent e) {
                    JOptionPane.showMessageDialog(f, "hello 1");
     
                }
     
            });
            b2.addActionListener(new ActionListener() {
     
                @Override
                public void actionPerformed(ActionEvent e) {
                    JOptionPane.showMessageDialog(f, "hello 2");
     
                }
     
            });        
            b3.addActionListener(new ActionListener() {
     
                @Override
                public void actionPerformed(ActionEvent e) {
                    JOptionPane.showMessageDialog(f, "hello 3");
     
                }
     
            });        
            JToolBar bar = new JToolBar();
            bar.add(b3);
            f.add(bar, BorderLayout.NORTH);
            f.add(split);
            f.setGlassPane(new TestAwtListener());
            f.getGlassPane().setVisible(true);
            f.setSize(400,300);
            f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        }
     
    }
    Désolé le code est un peu brut de fonderie et codé en deux deux, mais bon çà ressemble à ce que tu cherches (pouvoir déplacer toolbar et split)
    Si tu as des questions n'hesites pas.
    Pis j'ais pas non plus l'impression que celà rame
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  6. #6
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Qq test supplementaires, ca ne change rien et il me faut quand meme forwarder les evenements :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    			enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
    			enableEvents(AWTEvent.MOUSE_EVENT_MASK);
    			enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
     
    [...]
     
    		protected void processEvent(AWTEvent event) {
    			if (event instanceof MouseWheelEvent) {
    				// Does not work !!!
    				//if ((event.getID() & AWTEvent.MOUSE_WHEEL_EVENT_MASK) == AWTEvent.MOUSE_WHEEL_EVENT_MASK) {				
    				MouseWheelEvent mwe = (MouseWheelEvent) event;
    				if (mwe.getWheelRotation() < 0) {
    					renderer.zoomIn();
    				} else {
    					renderer.zoomOut();
    				}
    				redispatchMouseWheelEvent(mwe);
    				updateLens();
    			}
    			// Cannot recast MouseWheelEvent into MouseEvent (crash!)
    			else if (event instanceof MouseEvent) {
    				if ((event.getID() & AWTEvent.MOUSE_MOTION_EVENT_MASK) == AWTEvent.MOUSE_MOTION_EVENT_MASK) {
    					MouseEvent me = (MouseEvent) event;
    					if ((me.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != MouseEvent.CTRL_DOWN_MASK) {
    						currentX = me.getX();
    						currentY = me.getY();
    						redispatchMouseEvent(me);
    						updateLens();
    					}
    				}
    				// Never caught.
    				else if ((event.getID() & AWTEvent.MOUSE_EVENT_MASK) == AWTEvent.MOUSE_EVENT_MASK) {
    					MouseEvent me = (MouseEvent) event;
    					System.out.println(me.getX() + ", " + me.getY());
    				}
    			}
    			// Does nothing.
    			//super.processEvent(event);
    		}
    EDIT - ah OK, je vais tester de ce pas.
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  7. #7
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Pour le drag c'est bon, ca corrige les problems rencontres. Par contre, j'ai perdu les evenements de la roulette de la souris meme en utilisant le bon masque. Pour les recuperer, il me faut modifier install() de cette maniere :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    			public void install() {
    				Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_WHEEL_EVENT_MASK);
    				enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
    			}
     
     
    			public void eventDispatched(AWTEvent event) {
    				System.out.println("Received " + event);
    				if (event instanceof MouseWheelEvent) {
    					MouseWheelEvent mwe = (MouseWheelEvent) event;
    					if (mwe.getWheelRotation() < 0) {
    						renderer.zoomIn();
    					} else {
    						renderer.zoomOut();
    					}
    					updateLens();
    				}
    				else if (event instanceof MouseEvent) {
    					if ((event.getID() & AWTEvent.MOUSE_MOTION_EVENT_MASK) == AWTEvent.MOUSE_MOTION_EVENT_MASK) {
    						MouseEvent me = (MouseEvent) event;
    						if ((me.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != MouseEvent.CTRL_DOWN_MASK) {
    							int tempx = me.getXOnScreen();
    							int tempy = me.getYOnScreen();
    							currentX = getLocationOnScreen().x < tempx ? tempx - getLocationOnScreen().x : 0;
    							currentY = getLocationOnScreen().y < tempy ? tempy - getLocationOnScreen().y : 0;
    							updateLens();
    						}
    					}
    				}
    			}
    Effectivement initialement je recuperai directement les coordonnees de l'evenement (comme d'hab) mais la loupe ne s'affichait pas au bon endroit. Mieux vaut faire comme ce que tu as ecrit avec cette methode.

    Je vais faire d'autres tests mais je pense que c'est bon. MERCI !!
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  8. #8
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Arh, non j'ai rien dit !

    Sans enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);, le drag fonctionne mais on ne peut zoomer qu'au dessus du scrollpane (qui est scrollable). Avec enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);, le zoom fonctionne partout mais on perd le drag, le clic sur les boutons et les noeuds, etc...
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  9. #9
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    EN fait je ne suis pas tout à fait sûr qu'il faille traiter la MouseWheel de cette façon, en effet je verrais plutôt un listener classique qui selon le cas effectue le zoom et bloque l'events (évite de scroller en même temps que l'on zoom ce qui serait un comportement un peu louche) ou dispatche l'event aux composants placés en dessous
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  10. #10
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Le probleme est un peu plus complexe : des qu'on a le malheure d'activer la prise en charge des evenements de la roulette, que ce soit par

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);,
    ou

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    addMouseWheelListener(this);
    Cela bloque automatiquement la gestion des evenements des boutons.

    Note : pour info, addMouseWheelListener() fait :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
        public synchronized void addMouseWheelListener(MouseWheelListener l) {
            if (l == null) {
                return;
            }
            mouseWheelListener = AWTEventMulticaster.add(mouseWheelListener,l);
            newEventsOnly = true;
     
            dbg.println("Component.addMouseWheelListener(): newEventsOnly = " + newEventsOnly);
     
            // if this is a lightweight component, enable mouse events
            // in the native container.
            if (peer instanceof LightweightPeer) {
                parent.proxyEnableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
            }
        }
    Ensuite pour le forwardage des evenement roulette, c'est vrai que logiquement mieux vaut ne pas avoir les deux en meme temps (meme si jusqu'a present ca marche correctement). Aussi j'ai modife la methode en ajoutant un masque :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    		/** {@inheritDoc}
                     */
    		public void mouseWheelMoved(MouseWheelEvent event) {
    			if ((event.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) == MouseEvent.CTRL_DOWN_MASK) {
    				//System.out.println("Received mouse wheel event. " + event);
    				if (event.getWheelRotation() < 0) {
    					renderer.zoomIn();
    				} else {
    					renderer.zoomOut();
    				}
    			} else {
    				redispatchMouseWheelEvent(event);
    			}
    			updateLens();
    		}
    Bon, je ne vais pas avoir trop de temps pour m'en charger, on me demande de faire du C++ ces jours-ci (yeurk). Ca attendra donc un peu.
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  11. #11
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    J'viens de me souvenir d'un article d'Alexander Potochkin qui devrait te plaire: http://weblogs.java.net/blog/alexfro...behaved_g.html
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  12. #12
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Effectivement rajouter :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    /** {@inheritDoc}
     */
    @Override public boolean contains(int x, int y) {
     return false;
    }
    Permet de recuperer le bon curseur pour les bon sous-composants (nottamment quand on le deplace au dessus de la barre de split).
    Pour le reste... hum, il va me falloir reellement implementer ces boutons alors...
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  13. #13
    Membre éclairé Avatar de bassim
    Homme Profil pro
    Ingénieur Réseaux
    Inscrit en
    Février 2005
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur Réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Février 2005
    Messages : 666
    Points : 695
    Points
    695
    Par défaut
    salut, Est ce possible d'avoir la démo pour voir ce que ça donne (si tu veux Bouye)
    Where is my mind

  14. #14
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 840
    Points : 22 854
    Points
    22 854
    Billets dans le blog
    51
    Par défaut
    Heu, tu as des screens dans le 1er post. La seule difference entre ici et maintenant c'etait :
    - Avant : zoom a la roulette + gros problemes lors du drag + curseurs specifiques manquants
    - Apres : drag fonctionnel + curseur specifiques presents + zoom a la roulette desactivee.

    Sinon, graphiquement ca reste pareil a ce qu'on voit dans le screen (ou on a la loupe directement rendue dans un JPanel, plus le composant loupe en action sur ce meme rendu).
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

Discussions similaires

  1. probleme de Drag and drop dans une DataRepeater
    Par LibidoPostToxico dans le forum VB.NET
    Réponses: 0
    Dernier message: 24/06/2010, 17h32
  2. Probleme de Drag & Drop.
    Par Dezarie76 dans le forum Interfaces Graphiques en Java
    Réponses: 0
    Dernier message: 29/04/2009, 00h17
  3. Drag and Drop Probleme DLL
    Par borislotte dans le forum VBA Access
    Réponses: 5
    Dernier message: 21/03/2007, 18h56
  4. Drag and drop problemes
    Par jean dans le forum GTK+ avec C & C++
    Réponses: 3
    Dernier message: 09/11/2006, 16h26
  5. probleme de Drag and Drop
    Par timsah dans le forum C++Builder
    Réponses: 8
    Dernier message: 03/12/2005, 09h19

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo