modules/jdk.packager/src/main/java/com/sun/javafx/tools/packager/bundlers/BundleParams.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -101,10 +101,13 @@
     public static final String PARAM_APPLICATION_CLASS      = "applicationClass"; // String
 
     /* Adds a dialog to let the user choose a directory where the product will be installed. */
     public static final String PARAM_INSTALLDIR_CHOOSER     = "installdirChooser"; // Boolean
 
+    /* Prevents from launching multiple instances of application.  */
+    public static final String PARAM_SINGLETON              = "singleton"; // Boolean
+
     /**
      * create a new bundle with all default values
      */
     public BundleParams() {
         params = new HashMap<>();

@@ -280,10 +283,14 @@
 
     public void setInstalldirChooser(Boolean b) {
         putUnlessNull(PARAM_INSTALLDIR_CHOOSER, b);
     }
 
+    public void setSingleton(Boolean b) {
+        putUnlessNull(PARAM_SINGLETON, b);
+    }
+
     public void setSignBundle(Boolean b) { putUnlessNull(SIGN_BUNDLE.getID(), b); }
 
     public boolean isShortcutHint() {
         return fetchParam(SHORTCUT_HINT);
     }