~ubuntu-branches/ubuntu/saucy/libjgraph-java/saucy

« back to all changes in this revision

Viewing changes to src/org/jgraph/graph/BasicMarqueeHandler.java

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2007-05-13 02:12:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513021209-7hbyggafktcop30u
Tags: 5.10.1.0.dfsg-1
* New upstream release.
* Improve debian/watch and debian/rules.
* Use dh_wraporig to create .dfsg tarball:
  - Add debian/dh_wraporig.local.
  - Include created debian/README.Debian-source.
  - Adapt debian/watch to call dh_wraporig.
  - Change get-orig-source target in debian/rules to use uscan/dh_wraporig.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
                                overlay(graph, g, false);
119
119
                        } else {
120
120
                                dirty.add(marqueeBounds);
121
 
                                graph.repaint((int) dirty.getX(), (int) dirty.getY(),
122
 
                                                (int) dirty.getWidth()+1, (int) dirty.getHeight()+1);
 
121
                                graph.repaint((int) dirty.getX()-1, (int) dirty.getY()-1,
 
122
                                                (int) dirty.getWidth()+2, (int) dirty.getHeight()+2);
123
123
                        }
124
124
                }
125
125
        }
141
141
         * to indicate that the graphics is no more dirty.
142
142
         */
143
143
        public void paint(JGraph graph, Graphics g) {
144
 
                if (marqueeBounds != null)
 
144
                if (marqueeBounds != null) {
 
145
                        if (graph.isXorEnabled()) {
 
146
                                Color bg = graph.getBackground();
 
147
                                Color fg = graph.getMarqueeColor();
 
148
                                g.setColor(fg);
 
149
                                g.setXORMode(bg);
 
150
                        }
145
151
                        overlay(graph, g, false);
 
152
                }
146
153
        }
147
154
 
148
155
        /**
176
183
                startPoint = e.getPoint();
177
184
                marqueeBounds = new Rectangle2D.Double(startPoint.getX(), startPoint
178
185
                                .getY(), 0, 0);
179
 
                if (e != null) {
180
 
                        if (!(e.getSource() instanceof JGraph))
181
 
                                throw new IllegalArgumentException(
182
 
                                                "MarqueeHandler cannot handle event from unknown source: "
183
 
                                                                + e);
184
 
                        JGraph graph = (JGraph) e.getSource();
185
 
                        if (isMarqueeTriggerEvent(e, graph)) {
186
 
                                previousCursor = graph.getCursor();
187
 
                                graph.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
188
 
                        }
 
186
                if (!(e.getSource() instanceof JGraph))
 
187
                        throw new IllegalArgumentException(
 
188
                                        "MarqueeHandler cannot handle event from unknown source: "
 
189
                                                        + e);
 
190
                JGraph graph = (JGraph) e.getSource();
 
191
                if (isMarqueeTriggerEvent(e, graph)) {
 
192
                        previousCursor = graph.getCursor();
 
193
                        graph.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
189
194
                }
190
195
        }
191
196