object Desktop
- Alphabetic
- By Inheritance
- Desktop
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type Listener = PartialFunction[Update, Unit]
-
case class
OpenFiles
(search: Option[String], files: List[File]) extends Update with Product with Serializable
One or several files which are associated with the application were opened from the desktop environment.
One or several files which are associated with the application were opened from the desktop environment.
- search
an optional search term the user entered to find the files
- files
the files which should be opened by the application
-
sealed
trait
Update
extends AnyRef
The type of updates dispatched by this desktop model to instances registered via
addListener.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addListener(pf: Listener): pf.type
Registers a listener for desktop and application events.
Registers a listener for desktop and application events. The listener receives update of type
Update.- pf
the partial reaction function
- returns
pffor convenience
-
def
addQuitAcceptor(accept: ⇒ Boolean): () ⇒ Boolean
Adds a veto function invoked when calling
mayQuit.Adds a veto function invoked when calling
mayQuit. The function should returntrueif it is ok to quit, andfalseif not (for example, because a document is dirty and a confirmation dialog was cancelled).- accept
the function to invoke when attempting to quit.
- returns
the function argument for convenience
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
browseURI(uri: URI): Unit
Launches the default browser to display a
URI.Launches the default browser to display a
URI.- uri
the URI to be displayed in the user default browser
- See also
java.awt.Desktop#browse
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
composeMail(uri: Option[URI] = None): Unit
Launches the mail composing window of the user default mail client.
Launches the mail composing window of the user default mail client.
- uri
the specified
mailto:URI, orNoneto open the mail composing window without a specific address
- See also
java.awt.Desktop#mail(URI)
-
def
editFile(file: File): Unit
Launches the associated editor application and opens a file for editing.
Launches the associated editor application and opens a file for editing.
- file
the file to be opened for editing
- See also
java.awt.Desktop#edit
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isLinux: Boolean
truewhen running the application on a Linux system. -
val
isMac: Boolean
truewhen running the application on a Mac (OS X) system. -
val
isWindows: Boolean
truewhen running the application on a Windows system. -
def
mayQuit(): Boolean
Traverses the registered quit interceptors.
Traverses the registered quit interceptors. If all of them accept the quit action, returns
true. If any of them refuses the request, returnsfalse. -
def
moveFileToTrash(file: File): Unit
Tries to move a file to the plaform's symbolic trash can.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
openFile(file: File): Unit
Launches the associated (external) application to open the file.
Launches the associated (external) application to open the file.
- file
the file to be opened with the associated application
- See also
java.awt.Desktop#open
-
def
printFile(file: File): Unit
Prints a file with the native desktop printing facility, using the associated application's print command.
Prints a file with the native desktop printing facility, using the associated application's print command.
- file
the file to be printed
- See also
java.awt.Desktop#print
- def removeListener(pf: Listener): Unit
- def removeQuitAcceptor(accept: () ⇒ Boolean): Unit
-
def
requestForeground(allWindows: Boolean = false): Unit
Requests that the application be brought to the foreground.
Requests that the application be brought to the foreground.
- allWindows
if
truethen all of the application's windows should be made visible and brought to the foreground, iffalseonly (the most recent?) one window is affected.
-
def
requestUserAttention(repeat: Boolean = false): Unit
Requests that the desktop environment signalize that the user should pay attention to the application.
Requests that the desktop environment signalize that the user should pay attention to the application.
- repeat
if
true, the signalization is continuous until the user confirms the request, iffalsethe signalization is a one time action and less intrusive
-
def
revealFile(file: File): Unit
Reveals a file in the platform's desktop environment.
Reveals a file in the platform's desktop environment. On OS X this shows the file in the Finder.
-
def
setDockBadge(label: Option[String]): Unit
Marks the application's icon in the desktop environment's dock with a "badge" string.
Marks the application's icon in the desktop environment's dock with a "badge" string. For example, a mail application may want to indicate the number of unread messages.
- label
the text label to display, or
Noneto remove the current badge.
-
def
setDockImage(image: Image): Unit
Sets the application's appearance in the desktop environment's dock.
Sets the application's appearance in the desktop environment's dock. This can also be used to create non-textual badges or overlays (e.g. a progress indicator).
- image
the new image to use in the dock
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
ApplicationActivated
extends Update with Product with Serializable
The application was activated or brought to the front.
-
object
ApplicationDeactivated
extends Update with Product with Serializable
The application was deactivated or moved to the background.
-
object
ApplicationHidden
extends Update with Product with Serializable
The application and its windows were hidden.
The application and its windows were hidden. For example, on OS X this corresponds to the "Hide..." action in the application menu.
-
object
ApplicationShown
extends Update with Product with Serializable
The application and its windows were made visible.