/** * retrieves the string representation of the source code * * @return source code's string representation */ public String getSourceCode() { return sourceCodeArea.getText(); }
public String getXPathExpression() { return xPathArea.getText(); }
/** * When the fontsize of a JTextArea is changed, the word-wrapped lines * may become garbled. This method clears and resets the text of the * text area. */ protected void refresh(JTextArea textArea) { String text = textArea.getText(); textArea.setText(""); textArea.setText(text); }
@SuppressWarnings("UnusedDeclaration") private void performTagAction(ActionEvent e) { final String s = inputBox.getText(); Thread t = new Thread() { @Override public void run() { final String taggedStr = tagger.tagString(s); SwingUtilities.invokeLater(() -> outputBox.setText(taggedStr)); } }; t.start(); }
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(receivedText1.getText()), null); } });
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(sentText1.getText()), null); } });
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(interpretedText1.getText()), null); } });
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(sentText.getText()), null); } });
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(messageTextArea.getText()), null); } });
@Override public void actionPerformed(ActionEvent e) { // Get the clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // Set the sent text as the new content of the clipboard clipboard.setContents(new StringSelection(receivedText.getText()), null); } });
private String showInputDialog(String title, String defaultText){ JTextArea msg = new JTextArea(defaultText); msg.setLineWrap(true); msg.setWrapStyleWord(true); JScrollPane scrollPane = new JScrollPane(msg); scrollPane.setPreferredSize(new Dimension(600, 250)); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); int ris = JOptionPane.showConfirmDialog(null, scrollPane, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if(ris == JOptionPane.OK_OPTION) return msg.getText(); else return defaultText; }
@Override public void actionPerformed(ActionEvent e) { if (!"".equals(adhocMessages.getText())) { AdHocPacket packetToSend = new AdHocPacket(adhocMessages.getText()); try { connection.sendStanza(packetToSend); } catch (InterruptedException | NotConnectedException e1) { LOGGER.log(Level.WARNING, "exception", e); } } } });
@Override public void actionPerformed(ActionEvent e) { UIUtil.clipboardCopy(jta_out.getText()); } });
private void add() { String str = jta_in.getText(); if ("".equals(str.trim())) { JOptionPane.showMessageDialog(me, "Please enter input text!", "No Input", JOptionPane.ERROR_MESSAGE); return; } MultiEntryRes res = MultiEntryUtil.parse(str); me.setVisible(false); callback.add(res); }
@Override public boolean isModified() { final String text = repositoriesTextArea.getText(); return !placeholder.equals(text) && !text.equals(getStateString()) && CoursierImpl$.MODULE$.checkRepositories(text, false); }
@Override public void apply() { final String text = repositoriesTextArea.getText(); if (text.trim().isEmpty() || text.equals(placeholder)) { state.setCoursierResolvers(Collections.emptyList()); } else if (CoursierImpl$.MODULE$.checkRepositories(text, true)) { state.setCoursierResolvers(Utils.stringToList(text, Utils.lineSeparator())); } }
@Override protected Message createMessage() { return new MessageSMS( getDisplayMaximumCheckBox().isSelected() ? Message.DisplayType.MAXIMUM : Message.DisplayType.MINIMUM, dateTimeField.getDateTime(), receiverNumberNameField.getNumberName(), senderNumberNameField.getNumberName(), bodyTextArea.getText() ); } }