Giter Club home page Giter Club logo

osxadapter's Introduction

OSXAdapter
v 2.0

This sample uses a reflection Proxy model to hook existing preferences, about, and quit functionality into handlers for the Mac OS X application menu.  This functionality is easily adopted by implementing the com.apple.eawt.ApplicationListener interface, but this sample's dynamic implementation will only be triggered on platforms that actually support the Apple APIs (e.g. Java 1.4 or later on Mac OS X), avoiding any compatibility concerns.

The sample also supports document handing from the Finder by implementing the handleOpenFile method and registering for supported file types in its Info.plist file.  This is how Mac OS X knows to allow drags of certain file types over a given application.  Try opening an image from the file menu, then drag another image over the application's icon in the Dock.  This feature will only work with a bundled Mac OS X application.

This sample is for developers looking to support multiple platforms, including support for Mac OS X-specific features, with a single codebase.  It is written for and should build and run on any J2SE 1.4 or later implementation without any stub or placeholder libraries.

To run the included pre-built sample from a command line, type

java -jar OSXAdapter.app/Contents/Resources/Java/OSXAdapter.jar

The sample is built around an ant project which can be reused on any platform with ant installed.  Be sure to note the "package" subtask which produces a working Mac OS X application bundle and can be integrated into an existing script.

[05/29/2007]

osxadapter's People

Contributors

stevemoser avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.