/** * @return */ public static DesktopPeer getDesktop() { // check if we are under Gnome or KDE or anything else String desktopSession = System.getenv("GNOME_DESKTOP_SESSION_ID"); if (desktopSession == null) { desktopSession = System.getenv("KDE_FULL_SESSION"); if (desktopSession != null) return kde; } else { return gnome; } // revert to this class for default values return classpath; }
protected DesktopPeer createDesktopPeer(Desktop target) throws HeadlessException { if (GraphicsEnvironment.isHeadless()) throw new HeadlessException(); return ClasspathDesktopPeer.getDesktop(); }
@Override protected DesktopPeer createDesktopPeer(Desktop target) throws HeadlessException { throw new UnsupportedOperationException("Not supported yet."); }
@Override protected DesktopPeer createDesktopPeer(Desktop target) throws HeadlessException { return new GDesktopPeer(); }
/** * * @param target * @return * @throws HeadlessException */ protected abstract DesktopPeer createDesktopPeer(Desktop target) throws HeadlessException;