~ubuntu-branches/ubuntu/karmic/batik/karmic

« back to all changes in this revision

Viewing changes to sources-1.4/org/apache/batik/swing/gvt/JGVTComponent.java

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev, Onkar Shinde, Matvey Kozhev
  • Date: 2008-07-19 01:03:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080719010305-0b24skqy185kdsb9
Tags: 1.7.dfsg-0ubuntu1
[ Onkar Shinde ]
* New upstream version (LP: #147818)
* debian/control
  - Add Sun JDK 1.5 as build dependency. Fixes FTBFS on buildd. (LP: #150484)
    Also add Sun JRE as runtime dependencies.
  - Add ant-optional as build dependency.
  - Add libxml-commons-external-java and libxmlgraphics-commons-java as
    build and runtime dependencies.
  - Add 'Homepage' field and correct the url.
  - Change standards version to 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
* debian/rules
  - Change JAVA_HOME_DIRS for Sun JDK.
  - Add jar file names to DEB_JARS to match new build requirements.
  - Extract version from changelog.
  - Delete bundled jar files in clean target.
  - Don't use hardcoded version in install target.
  - Add get-orig-source target.
* debian/README.Debian-source
  - Change the fo tag name to the one used for this version.
* debian/watch
  - Change expression to match src distribution.
* debian/patches/
  - 01_build_xml.patch, 02_fix_jar_target.patch - Refresh for current source.
  - 03_fix_lib_dirs.patch - Fix the library and classpath references needed
    for pdf transcoder build.
  - 04_fix_transcoder_pkg.patch - Fix transcoder-pkg target to not copy
    files from other jar files.

[ Matvey Kozhev ]
* debian/changelog:
  - Added ".dfsg" to version.
* debian/control, debian/rules:
  - Build with openjdk-6-jdk, depend on openjdk-6-jre.
  - Added java-6-sun as an alternate build JAVA_HOME directory.
  - Fixed get-orig-source to not include debian/ and delete the source dir,
    and made it delete jars from lib/, as done in the current batik package.
* debian/wrappers.sh:
  - Changed java-7-icedtea reference to java-6-openjdk, as the former has been
    removed back in Hardy.
  - Added newline.
* debian/libbatik-java.install:
  - Added newline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
3
   Licensed to the Apache Software Foundation (ASF) under one or more
 
4
   contributor license agreements.  See the NOTICE file distributed with
 
5
   this work for additional information regarding copyright ownership.
 
6
   The ASF licenses this file to You under the Apache License, Version 2.0
 
7
   (the "License"); you may not use this file except in compliance with
 
8
   the License.  You may obtain a copy of the License at
 
9
 
 
10
       http://www.apache.org/licenses/LICENSE-2.0
 
11
 
 
12
   Unless required by applicable law or agreed to in writing, software
 
13
   distributed under the License is distributed on an "AS IS" BASIS,
 
14
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
15
   See the License for the specific language governing permissions and
 
16
   limitations under the License.
 
17
 
 
18
 */
 
19
package org.apache.batik.swing.gvt;
 
20
 
 
21
import java.awt.event.MouseWheelEvent;
 
22
import java.awt.event.MouseWheelListener;
 
23
 
 
24
/**
 
25
 * Concrete version of {@link org.apache.batik.swing.gvt.AbstractJGVTComponent}.
 
26
 *
 
27
 * This class is used for JDKs >= 1.4, which have MouseWheelEvent
 
28
 * support.  For JDKs < 1.4, the file
 
29
 * sources-1.3/org/apache/batik/swing/gvt/JGVTComponent defines a
 
30
 * version of this class that does support MouseWheelEvents.
 
31
 *
 
32
 * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
 
33
 * @version $Id: JGVTComponent.java 475477 2006-11-15 22:44:28Z cam $
 
34
 */
 
35
public class JGVTComponent extends AbstractJGVTComponent {
 
36
 
 
37
    /**
 
38
     * Creates a new JGVTComponent.
 
39
     */
 
40
    public JGVTComponent() {
 
41
    }
 
42
 
 
43
    /**
 
44
     * Creates a new JGVTComponent.
 
45
     * @param eventsEnabled Whether the GVT tree should be reactive
 
46
     *        to mouse and key events.
 
47
     * @param selectableText Whether the text should be selectable.
 
48
     *        if eventEnabled is false, this flag is ignored.
 
49
     */
 
50
    public JGVTComponent(boolean eventsEnabled,
 
51
                         boolean selectableText) {
 
52
        super(eventsEnabled, selectableText);
 
53
    }
 
54
 
 
55
    /**
 
56
     * Adds the AWT listeners.
 
57
     */
 
58
    protected void addAWTListeners() {
 
59
        super.addAWTListeners();
 
60
        addMouseWheelListener((ExtendedListener) listener);
 
61
    }
 
62
 
 
63
    /**
 
64
     * Creates an instance of Listener.
 
65
     * Override to provide a Listener that can listen for mouse wheel
 
66
     * events.
 
67
     */
 
68
    protected Listener createListener() {
 
69
        return new ExtendedListener();
 
70
    }
 
71
 
 
72
    /**
 
73
     * To hide the listener methods.
 
74
     */
 
75
    protected class ExtendedListener
 
76
        extends Listener
 
77
        implements MouseWheelListener {
 
78
 
 
79
        // MouseWheelListener ///////////////////////////////////////////////
 
80
 
 
81
        /**
 
82
         * Invoked when the mouse wheel has been scrolled.
 
83
         */
 
84
        public void mouseWheelMoved(MouseWheelEvent e) {
 
85
            /*selectInteractor(e);
 
86
            if (interactor != null) {
 
87
                interactor.mouseWheelMoved(e);
 
88
                deselectInteractor();
 
89
            } else*/ if (eventDispatcher != null) {
 
90
                dispatchMouseWheelMoved(e);
 
91
            }
 
92
        }
 
93
 
 
94
        /**
 
95
         * Dispatches the mouse event to the GVT tree.
 
96
         */
 
97
        protected void dispatchMouseWheelMoved(MouseWheelEvent e) {
 
98
            eventDispatcher.mouseWheelMoved(e);
 
99
        }
 
100
    }
 
101
}