@@ -0,0 +1,2763 @@
+//-----------------------------------------------------------------------//%0A//                                                                       //%0A//                            Z o o m T e s t                            //%0A//                                                                       //%0A//  Copyright (C) Herve Bitteur 2000-2005. All rights reserved.          //%0A//  This software is released under the terms of the GNU General Public  //%0A//  License. Please contact the author at herve.bitteur@laposte.net      //%0A//  to report bugs & suggestions.                                        //%0A//-----------------------------------------------------------------------//%0A%0Apackage omr.ui;%0A%0Aimport omr.util.BaseTestCase;%0A%0Aimport static junit.framework.Assert.*;%0Aimport junit.framework.*;%0A%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0Aimport java.util.*;%0Aimport javax.swing.*;%0Aimport javax.swing.event.*;%0A%0Apublic class ZoomTest%0A    extends BaseTestCase%0A%7B%0A    //------//%0A    // main //%0A    //------//%0A    public static void main (String... args)%0A    %7B%0A        new ZoomTest().play();%0A    %7D%0A%0A    //----------//%0A    // testZoom //%0A    //----------//%0A    public void testZoom()%0A    %7B%0A        play();%0A    %7D%0A%0A    //------//%0A    // play //%0A    //------//%0A    public void play ()%0A    %7B%0A        final Zoom zoom = new Zoom();%0A%0A        JFrame frame = new JFrame(getClass().toString());%0A        Container pane = frame.getContentPane();%0A        pane.setLayout(new BorderLayout());%0A%0A        final LDoubleField ldf = new LDoubleField(%22Ratio%22,%0A                                                  %22Current ratio%22);%0A        JPanel panel = new JPanel();%0A        panel.add(ldf.getLabel(), BorderLayout.WEST);%0A        panel.add(ldf.getField(), BorderLayout.CENTER);%0A        pane.add(panel, BorderLayout.NORTH);%0A%0A        ldf.getField().addActionListener%0A            (new ActionListener() %7B%0A                    public void actionPerformed(ActionEvent e)%0A                    %7B%0A                        zoom.setRatio(ldf.getValue());%0A                    %7D%0A                %7D);%0A%0A        LogSlider slider = new LogSlider%0A            (2, 5, LogSlider.HORIZONTAL, -5, 5, 0);%0A        slider.setSnapToTicks(false);%0A        slider.setPreferredSize(new Dimension(800, 70));%0A        pane.add(slider, BorderLayout.SOUTH);%0A%0A        zoom.addChangeListener%0A            (new ChangeListener() %7B%0A                    public void stateChanged(ChangeEvent e)%0A                    %7B%0A                        ldf.setValue(zoom.getRatio());%0A                    %7D%0A                %7D);%0A%0A        zoom.setSlider(slider);%0A%0A        zoom.setRatio(1.5d);%0A%0A        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A        frame.setLocation(100, 100);%0A        frame.pack();%0A        frame.setVisible(true);%0A    %7D%0A%7D%0A

Test of several visual artifacts connected to the same Zoom instance