01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * @created Feb 01, 2006
14: * @author Michael D'Amour
15: */
16: package org.pentaho.jfreereport.wizard.ui.swt;
17:
18: import org.eclipse.swt.graphics.Point;
19:
20: public class HotSpot {
21: int x1 = 0;
22: int y1 = 0;
23: int x2 = 0;
24: int y2 = 0;
25:
26: public HotSpot(int x1, int y1, int x2, int y2) {
27: super ();
28: this .x1 = x1;
29: this .y1 = y1;
30: this .x2 = x2;
31: this .y2 = y2;
32: }
33:
34: public boolean isContained(Point p) {
35: if (p.x > x1 && p.y > y1 && p.x < x2 && p.y < y2) {
36: return true;
37: }
38: return false;
39: }
40: }
|