Add HostOS
utility
This currently calls out to a private JavaFX utility from Sun. If that changes, I'll modify the code to use the system properties directly.
This commit is contained in:
parent
f799b32b42
commit
f0ced5fd66
13
src/main/scala/org/gerweck/scalafx/util/HostOS.scala
Normal file
13
src/main/scala/org/gerweck/scalafx/util/HostOS.scala
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package org.gerweck.scalafx.util
|
||||||
|
|
||||||
|
import com.sun.javafx.PlatformUtil
|
||||||
|
|
||||||
|
/** Utilities for identifying the Host OS of the application.
|
||||||
|
*
|
||||||
|
* @author Sarah Gerweck <sarah.a180@gmail.com>
|
||||||
|
*/
|
||||||
|
object HostOS {
|
||||||
|
lazy val isMac = PlatformUtil.isMac()
|
||||||
|
lazy val isUnix = PlatformUtil.isUnix()
|
||||||
|
lazy val isWindows = PlatformUtil.isWindows()
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user