
io.github.albertus82.jface.closeable.CloseableDevice Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jface-utils Show documentation
Show all versions of jface-utils Show documentation
Java SWT/JFace Utility Library including a Preferences Framework, Lightweight HTTP Server and macOS support.
package io.github.albertus82.jface.closeable;
import java.io.Closeable;
import org.eclipse.swt.graphics.Device;
public class CloseableDevice implements Closeable {
private final T device;
public CloseableDevice(final T device) {
this.device = device;
}
public T getDevice() {
return device;
}
@Override
public void close() {
if (device != null) {
device.dispose();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy