< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XDesktopPeer.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 
  29 import java.io.File;
  30 import java.io.IOException;
  31 import java.net.MalformedURLException;
  32 import java.net.URI;
  33 
  34 import java.awt.Desktop.Action;
  35 import java.awt.peer.DesktopPeer;
  36 import java.util.ArrayList;
  37 import java.util.Arrays;
  38 import java.util.List;
  39 
  40 
  41 /**
  42  * Concrete implementation of the interface <code>DesktopPeer</code> for
  43  * the Gnome desktop on Linux and Unix platforms.
  44  *
  45  * @see DesktopPeer
  46  */
  47 public class XDesktopPeer implements DesktopPeer {
  48 
  49     // supportedActions may be changed from native within an init() call
  50     private static final List<Action> supportedActions
  51             = new ArrayList<>(Arrays.asList(Action.OPEN, Action.MAIL, Action.BROWSE));
  52 
  53     private static boolean nativeLibraryLoaded = false;
  54     private static boolean initExecuted = false;
  55 
  56     private static void initWithLock(){
  57         XToolkit.awtLock();
  58         try {
  59             if (!initExecuted) {
  60                 nativeLibraryLoaded = init();
  61             }
  62         } finally {




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 
  29 import java.io.File;
  30 import java.io.IOException;
  31 import java.net.MalformedURLException;
  32 import java.net.URI;
  33 
  34 import java.awt.Desktop.Action;
  35 import java.awt.peer.DesktopPeer;
  36 import java.util.ArrayList;
  37 import java.util.Arrays;
  38 import java.util.List;
  39 
  40 
  41 /**
  42  * Concrete implementation of the interface {@code DesktopPeer} for
  43  * the Gnome desktop on Linux and Unix platforms.
  44  *
  45  * @see DesktopPeer
  46  */
  47 public class XDesktopPeer implements DesktopPeer {
  48 
  49     // supportedActions may be changed from native within an init() call
  50     private static final List<Action> supportedActions
  51             = new ArrayList<>(Arrays.asList(Action.OPEN, Action.MAIL, Action.BROWSE));
  52 
  53     private static boolean nativeLibraryLoaded = false;
  54     private static boolean initExecuted = false;
  55 
  56     private static void initWithLock(){
  57         XToolkit.awtLock();
  58         try {
  59             if (!initExecuted) {
  60                 nativeLibraryLoaded = init();
  61             }
  62         } finally {


< prev index next >