| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| FeatureEvent |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.feature; | |
| 2 | ||
| 3 | /* | |
| 4 | * This file is part of JTheque. | |
| 5 | * | |
| 6 | * JTheque is free software: you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation, either version 3 of the License. | |
| 9 | * | |
| 10 | * JTheque 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 | |
| 13 | * GNU General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU General Public License | |
| 16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 17 | */ | |
| 18 | ||
| 19 | import java.util.EventObject; | |
| 20 | ||
| 21 | /** | |
| 22 | * A Feature Event. It seems an event who's thrown when a change occurs in the feature manager. | |
| 23 | * | |
| 24 | * @author Baptiste Wicht | |
| 25 | */ | |
| 26 | public final class FeatureEvent extends EventObject { | |
| 27 | private final Feature feature; | |
| 28 | private Feature subFeature; | |
| 29 | ||
| 30 | /** | |
| 31 | * Construct a new FeatureEvent. | |
| 32 | * | |
| 33 | * @param source The source of the event. | |
| 34 | * @param feature The feature. | |
| 35 | */ | |
| 36 | public FeatureEvent(Object source, Feature feature) { | |
| 37 | 0 | super(source); |
| 38 | ||
| 39 | 0 | this.feature = feature; |
| 40 | 0 | } |
| 41 | ||
| 42 | /** | |
| 43 | * Construct a new FeatureEvent. | |
| 44 | * | |
| 45 | * @param source The source of the event. | |
| 46 | * @param feature The feature. | |
| 47 | * @param subFeature The sub feature. | |
| 48 | */ | |
| 49 | public FeatureEvent(Object source, Feature feature, Feature subFeature) { | |
| 50 | 0 | super(source); |
| 51 | ||
| 52 | 0 | this.feature = feature; |
| 53 | 0 | this.subFeature = subFeature; |
| 54 | 0 | } |
| 55 | ||
| 56 | /** | |
| 57 | * Return the feature. | |
| 58 | * | |
| 59 | * @return The feature. | |
| 60 | */ | |
| 61 | public Feature getFeature() { | |
| 62 | 0 | return feature; |
| 63 | } | |
| 64 | ||
| 65 | /** | |
| 66 | * Return the sub feature. | |
| 67 | * | |
| 68 | * @return The sub feature. | |
| 69 | */ | |
| 70 | public Feature getSubFeature() { | |
| 71 | 0 | return subFeature; |
| 72 | } | |
| 73 | } |