org.gudy.azureus2.ui.swt.osx
Class CocoaUIEnhancer

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer

public class CocoaUIEnhancer
extends Object

You can exclude this file (or this whole path) for non OSX builds Hook some Cocoa specific abilities: - App->About
- App->Preferences
- App->Exit

- OpenDocument (possible limited to only files?)
This code was influenced by the CocoaUIEnhancer, which was influenced by the CarbonUIEnhancer from Agynami. Both cocoa implementations are modified from org.eclipse.ui.internal.cocoa.CocoaUIEnhancer


Method Summary
static org.eclipse.swt.graphics.Image getFileIcon(String path, int imageWidthHeight)
           
static CocoaUIEnhancer getInstance()
           
 void hookApplicationMenu()
          Hook the given Listener to the Mac OS X application Quit menu and the IActions to the About and Preferences menus.
 void hookDocumentOpen()
           
static boolean isInitialized()
           
 boolean isRetinaDisplay()
           
 void registerToolbarToggle(org.eclipse.swt.widgets.Shell shell)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CocoaUIEnhancer getInstance()

hookApplicationMenu

public void hookApplicationMenu()
Hook the given Listener to the Mac OS X application Quit menu and the IActions to the About and Preferences menus.


hookDocumentOpen

public void hookDocumentOpen()
                      throws Throwable
Throws:
Throwable

registerToolbarToggle

public void registerToolbarToggle(org.eclipse.swt.widgets.Shell shell)
                           throws Throwable
Throws:
Throwable

getFileIcon

public static org.eclipse.swt.graphics.Image getFileIcon(String path,
                                                         int imageWidthHeight)

isInitialized

public static boolean isInitialized()

isRetinaDisplay

public boolean isRetinaDisplay()