Package br.com.jteam.jfcm.controller

Examples of br.com.jteam.jfcm.controller.EventDispatchService.fireEvent()


    try {
      preparedFile = showFileAdaper.prepareFileToView(presentationFile);
      EventDispatchService dispatchService = EventDispatchService.getInstance();
      if (preparedFile.isImageFile()) {
        Image image = (Image) preparedFile.getContent();
        dispatchService.fireEvent(new ShowImageEvent(image));
      } else if (preparedFile.isTextFile()) {
        String text = (String) preparedFile.getContent();
        dispatchService.fireEvent(new ShowTextEvent(text));
      }
    } catch (ShowFileContentAdapterException e) {
View Full Code Here


      if (preparedFile.isImageFile()) {
        Image image = (Image) preparedFile.getContent();
        dispatchService.fireEvent(new ShowImageEvent(image));
      } else if (preparedFile.isTextFile()) {
        String text = (String) preparedFile.getContent();
        dispatchService.fireEvent(new ShowTextEvent(text));
      }
    } catch (ShowFileContentAdapterException e) {
      JOptionPane.showMessageDialog(null, BaseBundle.getValue("error.unknow.file.type"));
    }
  }
View Full Code Here

  private void openFile(File file)
  {
    try {
      PresentationFile<?> presentationFile = adapter.openZipContent(file.getAbsolutePath());
      EventDispatchService eventService = EventDispatchService.getInstance();
      eventService.fireEvent(new OpenFileEvent(presentationFile));
      eventService.fireEvent(new UpdateFileHistoryEvent());
    } catch (FileListContentAdapterException e) {
      JOptionPane.showMessageDialog(null, BaseBundle.getValue("error.openning.file"));
    }
  }
View Full Code Here

  {
    try {
      PresentationFile<?> presentationFile = adapter.openZipContent(file.getAbsolutePath());
      EventDispatchService eventService = EventDispatchService.getInstance();
      eventService.fireEvent(new OpenFileEvent(presentationFile));
      eventService.fireEvent(new UpdateFileHistoryEvent());
    } catch (FileListContentAdapterException e) {
      JOptionPane.showMessageDialog(null, BaseBundle.getValue("error.openning.file"));
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.