001package jmri.jmrit.vsdecoder;
002
003import java.util.EventObject;
004
005/**
006 * Process Manager Events.
007 *
008 * <hr>
009 * This file is part of JMRI.
010 * <p>
011 * JMRI is free software; you can redistribute it and/or modify it under 
012 * the terms of version 2 of the GNU General Public License as published 
013 * by the Free Software Foundation. See the "COPYING" file for a copy
014 * of this license.
015 * <p>
016 * JMRI is distributed in the hope that it will be useful, but WITHOUT 
017 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
018 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
019 * for more details.
020 *
021 * @author Mark Underwood Copyright (C) 2011
022 */
023public class VSDManagerEvent extends EventObject {
024
025    public static enum EventType {
026
027        NONE, PROFILE_LIST_CHANGE
028    }  // propertyChangeEvents fired by the Manager.
029
030    VSDManagerEvent.EventType type;
031    Object data;
032
033    public VSDManagerEvent(VSDecoderManager source) {
034        this(source, VSDManagerEvent.EventType.NONE, null);
035    }
036
037    public VSDManagerEvent(VSDecoderManager source, VSDManagerEvent.EventType t) {
038        this(source, t, null);
039    }
040
041    public VSDManagerEvent(VSDecoderManager source, VSDManagerEvent.EventType t, Object d) {
042        super(source);
043        type = t;
044        data = d;
045    }
046
047    public void setType(VSDManagerEvent.EventType t) {
048        type = t;
049    }
050
051    public VSDManagerEvent.EventType getType() {
052        return type;
053    }
054
055    public Object getData() {
056        return data;
057    }
058}