package sun.awt;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragGestureRecognizer;
import java.awt.dnd.DragSource;
import java.awt.im.InputMethodHighlight;
import java.awt.im.spi.InputMethodDescriptor;
import java.awt.image.ColorModel;
import java.awt.peer.FramePeer;
import java.awt.peer.KeyboardFocusManagerPeer;
import java.awt.peer.SystemTrayPeer;
import java.awt.peer.TrayIconPeer;
import java.util.Map;
import java.util.Properties;
public final class HToolkit extends SunToolkit implements ComponentFactory {
private static final KeyboardFocusManagerPeer kfmPeer = new KeyboardFocusManagerPeer() {
@Override
public void setCurrentFocusedWindow(Window win) {}
@Override
public Window getCurrentFocusedWindow() { return null; }
@Override
public void setCurrentFocusOwner(Component comp) {}
@Override
public Component getCurrentFocusOwner() { return null; }
@Override
public void clearGlobalFocusOwner(Window activeWindow) {}
};
public HToolkit() {
}
@Override
public FramePeer createLightweightFrame(LightweightFrame target)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public KeyboardFocusManagerPeer getKeyboardFocusManagerPeer() {
return kfmPeer;
}
@Override
public TrayIconPeer createTrayIcon(TrayIcon target)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public SystemTrayPeer createSystemTray(SystemTray target)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public boolean isTraySupported() {
return false;
}
public GlobalCursorManager getGlobalCursorManager()
throws HeadlessException {
throw new HeadlessException();
}
@Override
protected void loadSystemColors(int[] systemColors)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public ColorModel getColorModel()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public int getScreenResolution()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public Map<java.awt.font.TextAttribute, ?> mapInputMethodHighlight(
InputMethodHighlight highlight)
throws HeadlessException {
throw new HeadlessException();
}
@Override
@Deprecated(since = "10")
public int ()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public int ()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public boolean getLockingKeyState(int keyCode)
throws UnsupportedOperationException {
throw new HeadlessException();
}
@Override
public void setLockingKeyState(int keyCode, boolean on)
throws UnsupportedOperationException {
throw new HeadlessException();
}
@Override
public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
throws IndexOutOfBoundsException, HeadlessException {
throw new HeadlessException();
}
@Override
public Dimension getBestCursorSize(int preferredWidth, int preferredHeight)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public int getMaximumCursorColors()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> abstractRecognizerClass,
DragSource ds, Component c,
int srcActions, DragGestureListener dgl)
{
return null;
}
@Override
public Dimension getScreenSize()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public Insets getScreenInsets(GraphicsConfiguration gc)
throws HeadlessException {
throw new HeadlessException();
}
@Override
public void setDynamicLayout(boolean dynamic)
throws HeadlessException {
throw new HeadlessException();
}
@Override
protected boolean isDynamicLayoutSet()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public boolean isDynamicLayoutActive()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public Clipboard getSystemClipboard()
throws HeadlessException {
throw new HeadlessException();
}
@Override
public PrintJob getPrintJob(Frame frame, String jobtitle,
JobAttributes jobAttributes,
PageAttributes pageAttributes) {
if (frame != null) {
throw new HeadlessException();
}
throw new IllegalArgumentException(
"PrintJob not supported in a headless environment");
}
@Override
public PrintJob getPrintJob(Frame frame, String doctitle, Properties props)
{
if (frame != null) {
throw new HeadlessException();
}
throw new IllegalArgumentException(
"PrintJob not supported in a headless environment");
}
@Override
public void sync() {
}
@Override
protected boolean syncNativeQueue(final long timeout) {
return false;
}
@Override
public void beep() {
System.out.write(0x07);
}
@Override
public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
return false;
}
@Override
public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
return false;
}
@Override
public boolean isDesktopSupported() {
return false;
}
@Override
public boolean isTaskbarSupported() {
return false;
}
public boolean isWindowOpacityControlSupported() {
return false;
}
@Override
public boolean isWindowShapingSupported() {
return false;
}
@Override
public boolean isWindowTranslucencySupported() {
return false;
}
@Override
public void grab(Window w) { }
@Override
public void ungrab(Window w) { }
protected boolean syncNativeQueue() { return false; }
@Override
public InputMethodDescriptor getInputMethodAdapterDescriptor()
throws AWTException
{
return (InputMethodDescriptor)null;
}
}