List of usage examples for javax.swing JOptionPane INFORMATION_MESSAGE
int INFORMATION_MESSAGE
To view the source code for javax.swing JOptionPane INFORMATION_MESSAGE.
Click Source Link
From source file:com.haulmont.cuba.desktop.gui.components.DesktopComponentsHelper.java
public static int convertMessageType(Frame.MessageMode messageType) { switch (messageType) { case CONFIRMATION: case CONFIRMATION_HTML: return JOptionPane.QUESTION_MESSAGE; case WARNING: case WARNING_HTML: return JOptionPane.WARNING_MESSAGE; default:// www.j a v a 2s . c om return JOptionPane.INFORMATION_MESSAGE; } }
From source file:EnrollFingerprint.Verify.java
/** * Creates new form Enroll//from ww w .ja v a 2s.c o m */ public Verify() { initComponents(); //updateStatus(); // Event listener actived when fingerprint template is ready this.addPropertyChangeListener(TEMPLATE_PROPERTY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (evt.getNewValue() == evt.getOldValue()) { return; } if (template != null) { JOptionPane.showMessageDialog(Verify.this, "La huella capturada esta lista para ser guardada.", "Captura y Registro de huellas", JOptionPane.INFORMATION_MESSAGE); } } }); }
From source file:com.mightypocket.ashot.AShot.java
void showMessage(String messageKey, Object... args) { ResourceMap resourceMap = getContext().getResourceMap(); String message = resourceMap.getString(messageKey, args); String errorTitle = resourceMap.getString("info.title"); JOptionPane.showMessageDialog(getMainFrame(), message, errorTitle, JOptionPane.INFORMATION_MESSAGE); }
From source file:br.com.colmeiatecnologia.EmailMarketing.model.ThreadEnviaEmail.java
@Override public void run() { int contadorEnvios = 0; while (contadorEnvios <= remetente.getMaximoEnvio()) { while (!remetente.getDestinatarios().isEmpty()) { if (contadorEnvios >= remetente.getMaximoEnvio()) break; EmailModel remetenteAtual = (EmailModel) remetente.getDestinatarios().toArray()[0]; try { enviaEmail(remetenteAtual); this.sucessos++; } catch (Exception e) { this.falhas++; this.emailsNaoEnviados = emailsNaoEnviados + remetenteAtual.getEmail() + "\n"; }/*www . ja va 2s. c o m*/ //Apaga destinatario atual da lista de destinatrios remetente.getDestinatarios().remove(remetente.getDestinatarios().toArray()[0]); estatisticas.atualizaTela(this.sucessos, this.falhas, this.emailsNaoEnviados); contadorEnvios++; } contadorEnvios++; } if (remetente.getDestinatarios().isEmpty()) { this.cancel(); JOptionPane.showMessageDialog(estatisticas, "O envio do email marketing foi finalizado", "Finalizado", JOptionPane.INFORMATION_MESSAGE); if (falhas > 0) { Object[] options = { "No", "Sim" }; int n = JOptionPane.showOptionDialog(null, "Deseja reenviar os emails que nao foram enviados?", "Falha ao enviar alguns emails", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); //Enviar novamente if (n == 1) { janelaPrincipal.reenvia(this.remetente, this.mensagem, this.emailsNaoEnviados); } } estatisticas.dispose(); } }
From source file:edu.harvard.i2b2.query.serviceClient.QueryListNamesClient.java
public static String sendQueryRequestREST(String XMLstr) { try {// w w w . j av a2 s . c o m MessageUtil.getInstance().setRequest("URL: " + getCRCNavigatorQueryProcessorServiceName(), XMLstr); OMElement payload = getQueryPayLoad(XMLstr); Options options = new Options(); targetEPR = new EndpointReference(getCRCNavigatorQueryProcessorServiceName()); options.setTo(targetEPR); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE); options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(10000)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(10000)); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); // System.out.println("Response XML: "+result.toString()); MessageUtil.getInstance().setResponse("URL: " + getCRCNavigatorQueryProcessorServiceName(), result.toString()); return result.toString(); } catch (AxisFault axisFault) { axisFault.printStackTrace(); java.awt.EventQueue.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, "Trouble with connection to the remote server, " + "this is often a network error, please try again", "Network Error", JOptionPane.INFORMATION_MESSAGE); } }); return null; } catch (Exception e) { e.printStackTrace(); return null; } }
From source file:edu.harvard.i2b2.query.ui.QueryListNamesClient.java
public static String sendQueryRequestREST(String XMLstr) { try {/*from w w w . j a va2 s. c o m*/ MessageUtil.getInstance() .setRequest("URL: " + getCRCNavigatorQueryProcessorServiceName() + "\n" + XMLstr); OMElement payload = getQueryPayLoad(XMLstr); Options options = new Options(); targetEPR = new EndpointReference(getCRCNavigatorQueryProcessorServiceName()); options.setTo(targetEPR); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE); options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(10000)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(10000)); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); // System.out.println("Response XML: "+result.toString()); MessageUtil.getInstance() .setResponse("URL: " + getCRCNavigatorQueryProcessorServiceName() + "\n" + result.toString()); return result.toString(); } catch (AxisFault axisFault) { axisFault.printStackTrace(); java.awt.EventQueue.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, "Trouble with connection to the remote server, " + "this is often a network error, please try again", "Network Error", JOptionPane.INFORMATION_MESSAGE); } }); return null; } catch (Exception e) { e.printStackTrace(); return null; } }
From source file:net.sf.jabref.importer.fetcher.ScienceDirectFetcher.java
@Override public boolean processQuery(String query, ImportInspector dialog, OutputPrinter status) { stopFetching = false;/*from ww w . j a v a 2s . co m*/ try { List<String> citations = getCitations(query); if (citations == null) { return false; } if (citations.isEmpty()) { status.showMessage(Localization.lang("No entries found for the search string '%0'", query), Localization.lang("Search %0", SCIENCE_DIRECT), JOptionPane.INFORMATION_MESSAGE); return false; } int i = 0; for (String cit : citations) { if (stopFetching) { break; } BibsonomyScraper.getEntry(cit).ifPresent(dialog::addEntry); dialog.setProgress(++i, citations.size()); } return true; } catch (IOException e) { LOGGER.warn("Communcation problems", e); status.showMessage( Localization.lang("Error while fetching from %0", SCIENCE_DIRECT) + ": " + e.getMessage()); } return false; }
From source file:FileTree2.java
public FileTree2() { super("Directories Tree [Popup Menus]"); setSize(400, 300);/*from ww w . j a v a 2s. c o m*/ DefaultMutableTreeNode top = new DefaultMutableTreeNode(new IconData(ICON_COMPUTER, null, "Computer")); DefaultMutableTreeNode node; File[] roots = File.listRoots(); for (int k = 0; k < roots.length; k++) { node = new DefaultMutableTreeNode(new IconData(ICON_DISK, null, new FileNode(roots[k]))); top.add(node); node.add(new DefaultMutableTreeNode(new Boolean(true))); } m_model = new DefaultTreeModel(top); m_tree = new JTree(m_model); m_tree.putClientProperty("JTree.lineStyle", "Angled"); TreeCellRenderer renderer = new IconCellRenderer(); m_tree.setCellRenderer(renderer); m_tree.addTreeExpansionListener(new DirExpansionListener()); m_tree.addTreeSelectionListener(new DirSelectionListener()); m_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); m_tree.setShowsRootHandles(true); m_tree.setEditable(false); JScrollPane s = new JScrollPane(); s.getViewport().add(m_tree); getContentPane().add(s, BorderLayout.CENTER); m_display = new JTextField(); m_display.setEditable(false); getContentPane().add(m_display, BorderLayout.NORTH); // NEW m_popup = new JPopupMenu(); m_action = new AbstractAction() { public void actionPerformed(ActionEvent e) { if (m_clickedPath == null) return; if (m_tree.isExpanded(m_clickedPath)) m_tree.collapsePath(m_clickedPath); else m_tree.expandPath(m_clickedPath); } }; m_popup.add(m_action); m_popup.addSeparator(); Action a1 = new AbstractAction("Delete") { public void actionPerformed(ActionEvent e) { m_tree.repaint(); JOptionPane.showMessageDialog(FileTree2.this, "Delete option is not implemented", "Info", JOptionPane.INFORMATION_MESSAGE); } }; m_popup.add(a1); Action a2 = new AbstractAction("Rename") { public void actionPerformed(ActionEvent e) { m_tree.repaint(); JOptionPane.showMessageDialog(FileTree2.this, "Rename option is not implemented", "Info", JOptionPane.INFORMATION_MESSAGE); } }; m_popup.add(a2); m_tree.add(m_popup); m_tree.addMouseListener(new PopupTrigger()); WindowListener wndCloser = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; addWindowListener(wndCloser); setVisible(true); }
From source file:com.googlecode.logVisualizer.chart.TurnsSpentInLevelChartMouseEventListener.java
public void chartMouseClicked(final ChartMouseEvent e) { if (e.getEntity() instanceof CategoryItemEntity) { final CategoryItemEntity entity = (CategoryItemEntity) e.getEntity(); final Matcher m = levelNumberExtractor.matcher((String) entity.getColumnKey()); m.find();//from ww w.ja v a 2 s . c om final int level = Integer.parseInt(m.group(1)); final StringBuilder str = new StringBuilder(100); for (final TurnInterval ti : logData.getTurnIntervalsSpent()) { final int levelOnStart = logData.getCurrentLevel(ti.getStartTurn()).getLevelNumber(); final int levelOnEnd = logData.getCurrentLevel(ti.getEndTurn()).getLevelNumber(); if (levelOnStart > level) break; if (levelOnStart == level || levelOnEnd == level) str.append(ti + "\n"); } final JScrollPane text = new JScrollPane(new JTextArea(str.toString())); text.setPreferredSize(new Dimension(500, 450)); JOptionPane.showMessageDialog(null, text, "Areas visited during level " + level, JOptionPane.INFORMATION_MESSAGE); } }
From source file:com.googlecode.logVisualizer.chart.SkillCastOnTurnsChartMouseEventListener.java
public void chartMouseClicked(final ChartMouseEvent e) { if (e.getEntity() instanceof CategoryItemEntity) { final CategoryItemEntity entity = (CategoryItemEntity) e.getEntity(); final String skillName = (String) entity.getColumnKey(); final StringBuilder str = new StringBuilder(250); if (logData.isDetailedLog()) for (final SingleTurn st : logData.getTurnsSpent()) { if (st.isSkillCast(skillName)) str.append(st.getTurnNumber() + ": " + getCastedSkill(st, skillName).getAmount() + "\n"); }// w w w. j a va2s. c o m else for (final TurnInterval ti : logData.getTurnIntervalsSpent()) if (ti.isSkillCast(skillName)) str.append(ti.getStartTurn() + "-" + ti.getEndTurn() + ": " + getCastedSkill(ti, skillName).getAmount() + "\n"); final JScrollPane text = new JScrollPane(new JTextArea(str.toString())); text.setPreferredSize(new Dimension(500, 450)); JOptionPane.showMessageDialog(null, text, "Turn numbers and amount of casts of " + skillName, JOptionPane.INFORMATION_MESSAGE); } }