001: /*
002: * TabRolloverEvent.java
003: *
004: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package org.underworldlabs.swing.plaf;
023:
024: import java.util.EventObject;
025:
026: /* ----------------------------------------------------------
027: * CVS NOTE: Changes to the CVS repository prior to the
028: * release of version 3.0.0beta1 has meant a
029: * resetting of CVS revision numbers.
030: * ----------------------------------------------------------
031: */
032:
033: /**
034: * Defines a tab rectangle rollover event.
035: *
036: * @author Takis Diakoumis
037: * @version $Revision: 1.4 $
038: * @date $Date: 2006/05/14 06:56:07 $
039: */
040: public class TabRolloverEvent extends EventObject {
041:
042: /** the tab index of the rollover */
043: private int index;
044:
045: /** the x-coord */
046: private int x;
047:
048: /** the y-coord */
049: private int y;
050:
051: /**
052: * Creates a new instance of TabRolloverEvent with the
053: * specified object as the source of this event.
054: *
055: * @param the source object
056: */
057: public TabRolloverEvent(Object source, int index) {
058: this (source, index, -1, -1);
059: }
060:
061: /**
062: * Creates a new instance of TabRolloverEvent with the
063: * specified object as the source of this event.
064: *
065: * @param the source object
066: */
067: public TabRolloverEvent(Object source, int index, int x, int y) {
068: super (source);
069: this .index = index;
070: this .x = x;
071: this .y = y;
072: }
073:
074: /**
075: * Returns the tab index where this event originated.
076: *
077: * @return the tab index
078: */
079: public int getIndex() {
080: return index;
081: }
082:
083: /**
084: * The x-coord of the underlying mouse event.
085: *
086: * @return the x-coord
087: */
088: public int getX() {
089: return x;
090: }
091:
092: /**
093: * The y-coord of the underlying mouse event.
094: *
095: * @return the y-coord
096: */
097: public int getY() {
098: return y;
099: }
100:
101: }
|