private void displayException(Exception exception) { exception.printStackTrace(); String message = exception.getClass().getName(); TextArea body = null; String bodyText = exception.getMessage(); if (bodyText != null && bodyText.length() > 0) { body = new TextArea(); body.setText(bodyText); body.setEditable(false); } Alert alert = new Alert(MessageType.ERROR, message, null, body, false); alert.open(displayHost.getDisplay()); } }
private static void displayException(Exception exception) { exception.printStackTrace(); String message = exception.getClass().getName(); TextArea body = null; String bodyText = exception.getMessage(); if (bodyText != null && bodyText.length() > 0) { body = new TextArea(); body.setText(bodyText); body.setEditable(false); } Alert alert = new Alert(MessageType.ERROR, message, null, body, false); alert.open(primaryDisplayHost.getDisplay()); }
displays.add(displayHost.getDisplay());
displays.add(primaryDisplayHost.getDisplay());
displays.add(primaryDisplayHost.getDisplay());
displays.add(HostApplet.this.displayHost.getDisplay());
Display display = this.displayHost.getDisplay(); displays.add(display); Display display = this.displayHost.getDisplay(); displays.remove(display);
@Override public void processWindowEvent(WindowEvent event) { super.processWindowEvent(event); switch(event.getID()) { case WindowEvent.WINDOW_OPENED: { Display display = displayHost.getDisplay(); displays.add(display); if (displayCloseListener != null) { displayCloseListener.hostWindowOpened(display); } displayHost.requestFocus(); break; } case WindowEvent.WINDOW_CLOSING: { dispose(); break; } case WindowEvent.WINDOW_CLOSED: { Display display = displayHost.getDisplay(); displays.remove(display); if (displayCloseListener != null) { displayCloseListener.hostWindowClosed(display); } break; } } } }
@Override public void run() { // Start the application if (application != null) { try { application.startup(displayHost.getDisplay(), new ImmutableMap<String, String>(startupProperties)); } catch (Exception exception) { displayException(exception); } // Add the application to the application list applications.add(application); } } }
public Display getDisplay() { return displayHost.getDisplay(); }
@Override public void run() { // Start the application if (HostApplet.this.application != null) { // Add the application to the application list applications.add(HostApplet.this.application); try { HostApplet.this.application.startup(HostApplet.this.displayHost.getDisplay(), new ImmutableMap<String, String>(HostApplet.this.startupProperties)); } catch (Exception exception) { handleUncaughtException(exception); } } } }
public Display getDisplay() { return this.displayHost.getDisplay(); }
@Override public void run() { // Remove the display from the display list displays.remove(displayHost.getDisplay()); // Remove this applet from the host applets list and stop the timer hostApplets.remove(HostApplet.this); if (hostApplets.getLength() == 0) { destroyTimer(); } } }
@Override public void run() { try { application.startup(primaryDisplayHost.getDisplay(), new ImmutableMap<String, String>(properties)); } catch (Exception exception) { handleUncaughtException(exception); } } });
@Override public void run() { // Remove the display from the display list displays.remove(HostApplet.this.displayHost.getDisplay()); // Remove this applet from the host applets list and stop the timer hostApplets.remove(HostApplet.this); if (hostApplets.getLength() == 0) { destroyTimer(); } } }
@Override public void run() { try { application.startup(primaryDisplayHost.getDisplay(), new ImmutableMap<String, String>(properties)); } catch (Exception exception) { displayException(exception); } } });