/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
interface _OpenAppHandler {
void handleOpenApp();
}
@SuppressWarnings("deprecation")
class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
boolean blockLegacyAPI;
boolean initializedParentDispatchers;
}
void blockLegacyAPI() {
blockLegacyAPI = true;
}
void checkIfLegacyAPIBlocked() {
if (!blockLegacyAPI) return;
throw new IllegalStateException("Cannot add com.apple.eawt.ApplicationListener after installing an app event handler");
}
if (!initializedParentDispatchers) {
if (!prefsMenuAlreadyExplicitlySet) {
menuBarHandler.setPreferencesMenuItemVisible(false); // default behavior is not to have a preferences item
}
initializedParentDispatchers = true;
}
synchronized (legacyAppListeners) {
}
}
synchronized (legacyAppListeners) {
}
}
}
});
}
}
});
}
public void handleOpenApp() {
}
});
}
}
});
}
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
}
});
}
}
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
}
});
}
}
}
});
} else {
parent.cancelQuit();
}
}
interface EventDispatcher {
}
// helper that cycles through the loop and aborts if the event is handled, or there are no listeners
void sendEventToEachListenerUntilHandled(final ApplicationEvent event, final EventDispatcher dispatcher) {
synchronized (legacyAppListeners) {
}
}
}
}