<AWT Dev> Review-request for 8143227: Platform-Specific Desktop Features
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Nov 20 17:12:03 UTC 2015
On 20.11.15 8:32, Alexander Zvegintsev wrote:
> Hi Anthony,
>
> many thanks for your input!
> You are right, most of FileManager API looks like an alien in
> java.awt.desktop, so let it be revised as separate CR.
> This CR will cover only Desktop and Taskbar classes.
>
> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/01/
>
> FileManager removed, moveToTrash() and browseFileDirectory()
> (revealInFinder) added to Desktop
Do we have the similar functionality already in the Desktop.open() if
the folder is passed to it? Or this method do some additional things?
> Moved TaskbarPeer to the correct location.
> Javadoc fixes
I am worried about setWindowCanFullScreen and requestToggleFullScreen.
On the latest osx this functionality was merged with maximize button. So
probably it will be better to change behavior of
window.setExtendedState() + MAXIMIZED_BOTH?
>
> --
> Thanks,
> Alexander.
>
> On 20.11.2015 0:40, Anthony Vanelverdinghe wrote:
>> Hi Alexander
>>
>> One thing I strongly feel should be revisited, is the FileManager API.
>> Here's my view on this:
>> - the functionality for the HFS/HFS+ attributes should be provided by
>> interfaces in java.nio.file.attribute, analog to dos/posix file
>> attributes
>> - the getResource/getPathToApplicationBundle methods should be moved
>> to a separate, OS-independent "application bundle" feature in
>> java.awt.Desktop. Even a .jar is in essence an application bundle.
>> - the findFolder methods are OS X-specific, even though most OSes
>> provides analog functionality. For example, Windows calls this concept
>> "Known Folders" [
>> https://msdn.microsoft.com/en-us/library/windows/desktop/bb776911%28v=vs.85%29.aspx
>> ]
>> - the moveToTrash method is a common and long-requested RFE, which
>> should be supported on multiple platforms
>> - revealInFinder should be renamed to a common name like "explore",
>> "browse" or "open"
>> In summary, I believe that the FileManager API should be made
>> OS-independent, even if initially this feature is only supported on OS X.
>>
>> On another note, I guess TaskbarPeer should be in the package
>> java.awt.peer instead of java.awt?
>>
>> Further, I went through the Javadoc of the public API:
>> - AppEvent has "{@link Application}" in its Javadoc. I think this
>> should be removed, since there's no such class in the public API.
>>
>> - AppEvent has the following Javadoc: "If the files were opened using
>> the Spotlight search menu or a Finder search window, this method
>> obtains the search term used to find the files.". In my opinion, this
>> should be rephrased to be OS-independent, but use OS X as an example,
>> for example: "The platform may additionally provide the search term
>> that was used to find the files. This is for example the case on Mac
>> OS X, when the files were opened using the Spotlight search menu or a
>> Finder search window."
>>
>> - Taskbar has the following Javadoc: "Linux support is limited to
>> Unity". In my opinion, this should say "currently limited", and the
>> paragraph should be prefixed with an @implNote annotation.
>>
>> - Taskbar::getTaskbar mentions "browser context" 2 times. However, I
>> have no clue what this means. Can this be reworded, or the term
>> clarified?
>>
>> Below is the remainder of my Javadoc nitpicking.
>>
>> Kind regards,
>> Anthony
>>
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/Desktop.java.udiff.html
>>
>> * Mac OS notifications -> Mac OS, notifications
>> * present in it's -> present in its
>> * a AppForegroundListener -> an AppForegroundListener
>> * a AppHiddenListener -> an AppHiddenListener
>> * a AppReopenedListener -> an AppReopenedListener
>> * a AboutHandler -> an AboutHandler
>> * a OpenFilesHandler -> an OpenFilesHandler
>> * a OpenURIHandler -> an OpenURIHandler
>> * platform specific -> platform-specific
>> * on current -> on the current (2x)
>> * user initiated -> user-initiated
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/AppEvent.java.html
>>
>> * it's about window -> its about window
>> * it's preferences window -> its preferences window
>> * @see AppReOpenedListener#appReOpened(AppEvent.AppReOpenedEvent) ->
>> AppReopenedListener#appReopened(AppEvent.AppReopenedEvent)
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/Taskbar.java.html
>>
>> * system task area(Taskbar, Dock, etc.). -> the system task area
>> (taskbar, Dock, etc.).
>> * on running platform -> on the current platform
>> * appending user specified menu to application -> appending a
>> user-specified menu to the application
>> * Linux support is limited to Unity, however to make this features
>> work on Unity the app [...] -> Linux support is currently limited to
>> Unity. However to make these features work on Unity, the app [...]
>> * see https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles
>> -> see <a
>> href="https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles">https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles</a>
>>
>> * by user -> by the user
>> * on platform -> on the platform
>> * by bouncing -> by a bouncing
>> * in task area -> in the task area
>> * It may has -> It may have
>> * platforms(e.g. Mac OS) -> platforms (e.g. Mac OS)
>> * On other platforms may require additional call -> Other platforms
>> may require an additional call
>> * in system task area -> in the task area
>> * system provided -> system-provided (2x)
>> * Some platforms does -> Some platforms do
>> * and accepts only -> and accept only
>> * In this case pass an integer represented as string as a parameter.
>> -> In this case, pass an integer represented as a string as parameter.
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/AboutHandler.java.html
>>
>> * it's about dialog -> its about dialog (2x)
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/AppReopenedListener.java.html
>>
>> * re-opened -> reopened
>> * re-open -> reopen
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/FileManager.java.html
>>
>> * a codes -> a code
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/OpenFilesHandler.java.html
>>
>> * it's Info.plist. -> its Info.plist.
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/PreferencesHandler.java.html
>>
>> * it's preferences UI -> its preferences UI (2x)
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/QuitStrategy.java.html
>>
>> * The strategy use to -> The strategy used to
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepListener.java.html
>>
>> * have awoke -> have awoken
>>
>> http://cr.openjdk.java.net/~azvegint/jdk/9/8143227/00/src/java.desktop/share/classes/java/awt/desktop/SystemSleepListener.java.html
>>
>> * has awoke -> has awoken
>>
>>
>> On 18/11/2015 8:12, Alexander Zvegintsev wrote:
>>> Hello
>>>
>>> please review the fix
>>> http://cr.openjdk.java.net/~azvegint/jdk/9/8048731/
>>> for
>>> https://bugs.openjdk.java.net/browse/JDK-8048731
>>>
>>> This fix provides public support Mac OS X
>>> features(com.apple.{eawt,eio}), adds support for various desktop
>>> features such as progress indication, dock overlays, dock menus, etc.
>>> This is done by extending java.awt.Desktop and adding
>>> java.awt.Taskbar classes
>>>
>>> Linux support is limited by Unity, however this is not the only
>>> limitation :) An app should be run via
>>> AppName.desktop file [0] with specified system property
>>> -Djava.desktop.appName=AppName.desktop
>>>
>>> [0] https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles
>>>
>>>
>>
>
--
Best regards, Sergey.
More information about the awt-dev
mailing list