com.ibasco.ucgdisplay.core.input.DeviceStateEvent Maven / Gradle / Ivy
/*-
* ========================START=================================
* Organization: Universal Character/Graphics display library
* Project: UCGDisplay :: Native :: Input
* Filename: DeviceStateEvent.java
*
* ---------------------------------------------------------
* %%
* Copyright (C) 2018 Universal Character/Graphics display library
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* =========================END==================================
*/
package com.ibasco.ucgdisplay.core.input;
/**
* Contains information regarding Input Device State (e.g. Device plugged/unplugged into/from the system).
*
* @author Rafael Ibasco
*/
public class DeviceStateEvent {
private InputDevice device;
private String action;
public static final String DEVICE_ACTION_ADDED = "added";
public static final String DEVICE_ACTION_REMOVED = "removed";
public DeviceStateEvent(InputDevice device, String action) {
this.device = device;
this.action = action;
}
public InputDevice getDevice() {
return device;
}
public String getAction() {
return action;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("DeviceStateEvent{");
sb.append("device=").append(device);
sb.append(", action='").append(action).append('\'');
sb.append('}');
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy