Exemple #1
0
 /**
  * ************************************************************************* Start the blinking
  * *************************************************************************
  */
 synchronized void startBLinking() {
   m_blinker = new PromptBlinker(this);
   String soundFile = s_cfg.getProperty(PropertyKey.PROMPT_SOUND_FILE);
   if ((soundFile != null) && (!soundFile.isEmpty())) {
     File f = new File(soundFile);
     if (f.canRead()) {
       m_sounder = new PromptSounder(soundFile);
       m_sounder.start();
     } else {
       m_sounder = null;
     }
   }
 }
Exemple #2
0
 /**
  * ************************************************************************* Start the blinking
  * *************************************************************************
  */
 private synchronized void stopBlinking() {
   if (m_blinker != null) {
     m_blinker.stopBlinking();
     try {
       m_blinker.interrupt();
       m_blinker.join();
     } catch (Exception e) {
     }
     ;
     m_blinker = null;
   }
   if (m_sounder != null) {
     m_sounder.cancel();
     m_sounder = null;
   }
   if (m_blinkerLauncher != null) {
     m_blinkerLauncher.cancel();
     m_blinkerLauncher = null;
   }
   // Ensure the text field has white background color
   m_promptText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
   m_promptText.redraw();
 }