Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Andro Max
Added: Nov 1, 2018 12:54 PM
Modified: Nov 1, 2018 1:09 PM
Views: 2
Tags: no tags
  1. package com.tagmycode.netbeans;
  2.  
  3. import com.tagmycode.plugin.IMessageManager;
  4. import org.openide.DialogDisplayer;
  5. import org.openide.NotifyDescriptor;
  6. import org.openide.awt.NotificationDisplayer;
  7.  
  8. class MessageManager implements IMessageManager {
  9.  
  10.     @Override
  11.     public void errorLog(String message) {
  12.         NotificationDisplayer.getDefault().notify("TagMyCode", NotificationIcons.ERROR, message, null);
  13.     }
  14.  
  15.     @Override
  16.     public void errorDialog(String message) {
  17.         NotifyDescriptor.Message d = new NotifyDescriptor.Message(message, NotifyDescriptor.ERROR_MESSAGE);
  18.         DialogDisplayer.getDefault().notify(d);
  19.     }
  20.  
  21. }
  22.