1 /*
2  * This file is part of libbluray
3  * Copyright (C) 2010  William Hahne
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see
17  * <http://www.gnu.org/licenses/>.
18  */
19 
20 package org.havi.ui.event;
21 
22 public class HFocusEvent extends java.awt.event.FocusEvent {
23     public static final int HFOCUS_FIRST = HTextEvent.TEXT_LAST + 1;
24     public static final int FOCUS_TRANSFER = HFOCUS_FIRST;
25     public static final int HFOCUS_LAST = FOCUS_TRANSFER;
26     public static final int NO_TRANSFER_ID = -1;
27 
HFocusEvent(java.awt.Component source, int id)28     public HFocusEvent(java.awt.Component source, int id) {
29         super(source, id, false);
30 
31         this.transfer = NO_TRANSFER_ID;
32     }
33 
HFocusEvent(java.awt.Component source, int id, int transfer)34     public HFocusEvent(java.awt.Component source, int id, int transfer) {
35         super(source, id, false);
36 
37         this.transfer = transfer;
38     }
39 
isTemporary()40     public boolean isTemporary() {
41         return false;
42     }
43 
getTransferId()44     public int getTransferId() {
45         if (getID() == FOCUS_TRANSFER)
46             return transfer;
47         return NO_TRANSFER_ID;
48     }
49 
50     private int transfer;
51     private static final long serialVersionUID = -159334433682866327L;
52 }
53