- java.lang.Object
-
- de.carne.test.swt.platform.PlatformHelper
-
- de.carne.test.swt.platform.cocoa.CocoaPlatformHelper
-
public class CocoaPlatformHelper extends PlatformHelper
Cocoa platform helper.
-
-
Constructor Summary
Constructors Constructor Description CocoaPlatformHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleaninternalCloseNativeDialogs(org.eclipse.swt.widgets.Display display)Makes sure that any open native platform dialog is closed.protected java.nio.file.PathinternalGrabScreen(java.nio.file.Path dir)Tries to grab the screen and stores a screenshot by invoking a platform dependent command.protected booleaninternalInNativeDialog(org.eclipse.swt.widgets.Display display)Checks whether a native platform dialog is currently open.protected booleaninternalIsCurrentThreadSWTCapable()Checks whether SWT code can be executed by the current thread.-
Methods inherited from class de.carne.test.swt.platform.PlatformHelper
closeNativeDialogs, grabScreen, inNativeDialog, isCurrentThreadSWTCapable
-
-
-
-
Method Detail
-
internalIsCurrentThreadSWTCapable
protected boolean internalIsCurrentThreadSWTCapable()
Description copied from class:PlatformHelperChecks whether SWT code can be executed by the current thread.- Overrides:
internalIsCurrentThreadSWTCapablein classPlatformHelper- Returns:
trueif the current thread can execute SWT code.- See Also:
PlatformHelper.isCurrentThreadSWTCapable()
-
internalInNativeDialog
protected boolean internalInNativeDialog(org.eclipse.swt.widgets.Display display)
Description copied from class:PlatformHelperChecks whether a native platform dialog is currently open.- Overrides:
internalInNativeDialogin classPlatformHelper- Parameters:
display- the Display to use for checking.- Returns:
trueif a native platform dialog is currently open.- See Also:
PlatformHelper.inNativeDialog(Display)
-
internalCloseNativeDialogs
protected boolean internalCloseNativeDialogs(org.eclipse.swt.widgets.Display display)
Description copied from class:PlatformHelperMakes sure that any open native platform dialog is closed.- Overrides:
internalCloseNativeDialogsin classPlatformHelper- Parameters:
display- the Display to use for checking.- Returns:
trueif a native platform dialog has been closed.- See Also:
PlatformHelper.closeNativeDialogs(Display)
-
internalGrabScreen
protected java.nio.file.Path internalGrabScreen(java.nio.file.Path dir) throws java.io.IOExceptionDescription copied from class:PlatformHelperTries to grab the screen and stores a screenshot by invoking a platform dependent command.- Overrides:
internalGrabScreenin classPlatformHelper- Parameters:
dir- the directory to store the screenshot into.- Returns:
- the created screenshot file.
- Throws:
java.io.IOException- if an I/O error occurs.
-
-