/** * Returns the NativeManager. The NativeManager allows for native handling of Spark. * * @return the NativeManager. */ public static NativeManager getNativeManager() { if (nativeManager == null) { nativeManager = new NativeManager(); } return nativeManager; }
f.setVisible(true); SparkManager.getNativeManager().flashWindow(window);
public void windowActivated(WindowEvent e) { SparkManager.getNativeManager().stopFlashing(frame); } });
dialog.setState(Frame.ICONIFIED); SparkManager.getNativeManager().flashWindowStopOnFocus(dialog); dialog.setVisible(true);
SparkManager.getNativeManager().addNativeHandler(this); ChatManager.getInstance().addChatMessageHandler(chatMessageHandler);
/** * Reconnect using the Panel with Message * @param message */ private void reconnect(final String message) { // Show MainWindow SparkManager.getMainWindow().setVisible(true); // Flash That Window. SparkManager.getNativeManager().flashWindowStopOnFocus( SparkManager.getMainWindow()); switch (localPreferences.getReconnectPanelType()) { case 0: workspace.changeCardLayout(RETRY_PANEL); _reconnectPanel.setDisconnectReason(message); break; case 1: switchAllUserOffline(true); break; case 2: switchAllUserOfflineNoGroupEntry(true); break; default: workspace.changeCardLayout(RETRY_PANEL); } removeAllUsers(); }
public void blinkFrameIfNecessary(final JFrame frame) { final MainWindow mainWindow = SparkManager.getMainWindow(); if (mainWindow.isFocusOwner()) { frame.setVisible(true); } else { // Set to new tab. if (Spark.isWindows()) { frame.setState(Frame.ICONIFIED); SparkManager.getNativeManager().flashWindow(frame); frame.setVisible(true); frame.addWindowListener(new WindowAdapter() { public void windowActivated(WindowEvent e) { SparkManager.getNativeManager().stopFlashing(frame); } }); } } }
public void stopShake() { shakeTimer.stop(); window.setLocation(naturalLocation); window.repaint(); SparkManager.getNativeManager().stopFlashing(window); }
public void connectionClosed() { // No reason to reconnect. // Show MainWindow SparkManager.getMainWindow().setVisible(true); // Flash That Window. SparkManager.getNativeManager().flashWindowStopOnFocus( SparkManager.getMainWindow()); String errorMessage = Res.getString("message.disconnected.error"); switch (localPreferences.getReconnectPanelType()) { case 0: _reconnectPanel.setClosedOnError(false); _reconnectPanel.setDisconnectReason(errorMessage); removeAllUsers(); workspace.changeCardLayout(RETRY_PANEL); break; case 1: switchAllUserOffline(false); _reconnectpanelsmall.setReconnectText(errorMessage); break; case 2: switchAllUserOfflineNoGroupEntry(false); _reconnectpanelicon.setReconnectText(errorMessage); break; } }
f.setVisible(true); SparkManager.getNativeManager().flashWindow(window);
/** * Checks to see if the <code>ChatFrame</code> should stop flashing. * * @param component the component that should be notified. */ public void stopFlashing(final Component component) { SwingUtilities.invokeLater( () -> { try { // Stop the flashing SparkManager.getNativeManager().stopFlashing(chatFrame); // Notify decorators SparkManager.getChatManager().notifySparkTabHandlers(component); } catch (Exception ex) { Log.error("Could not stop flashing because " + ex.getMessage(), ex); } } ); }
SparkManager.getNativeManager().flashWindow(chatFrame);