addApplicationListener( new ApplicationAdapter() {
public void handleAbout( ApplicationEvent event ) {
if (aboutAction != null) {
event.setHandled( true );
aboutAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_ABOUT ));
} else {
super.handleAbout( event );
}
}
public void handleOpenApplication( ApplicationEvent event ) {
if (appAction != null) {
appAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_OPENAPP) );
event.setHandled( true );
} else {
super.handleOpenApplication( event );
}
}
public void handleOpenFile( ApplicationEvent event ) {
if (fileAction != null) {
fileAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_OPENFILE) );
event.setHandled( true );
} else {
super.handleOpenFile( event );
}
}
public void handlePreferences( ApplicationEvent event ) {
if (prefAction != null) {
prefAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_PREF) );
event.setHandled( true );
} else {
super.handlePreferences( event );
}
}
public void handlePrintFile( ApplicationEvent event ) {
if (printAction != null) {
printAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_PRINT) );
event.setHandled( true );
} else {
super.handlePrintFile( event );
}
}
public void handleQuit( ApplicationEvent event ) {
if (quitAction != null) {
quitAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_QUIT) );
event.setHandled( true );
} else {
super.handleQuit( event );
}
}
public void handleReOpenApplication( ApplicationEvent event ) {
if (reopenAction != null) {
reopenAction.actionPerformed( new ActionEvent(event.getSource(),
MacApp.this.sequence++,
Parser.ATTR_MACOS_OPENAPP) );
event.setHandled( true );
} else {
super.handleReOpenApplication( event );