congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
AWTEvent.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
java.awt.AWTEvent

Best Java code snippets using java.awt.AWTEvent.toString (Showing top 20 results out of 315)

origin: stackoverflow.com

Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
   @Override
   public void eventDispatched(AWTEvent event) {
     System.out.println("event: " + event);
     if (event.toString().contains("MOUSE_EXITED")) {
       System.out.println("mouse_exited");
     }
   }
 }, AWTEvent.MOUSE_EVENT_MASK);
origin: stackoverflow.com

 import java.util.Arrays;

import java.util.List;

private void Button1ActionPerformed(java.awt.event.ActionEvent evt) {

//********************************************************

    String Hunt1 = evt.toString();
    Hunt1 = Hunt1.replaceAll("=", ",");
    Hunt1 = Hunt1.replaceAll("]", ",");
    String [] Hunt2 = Hunt1.split(",");
    List Hunt3 = Arrays.asList(Hunt2);
    String ButtonText = Hunt3.get(2).toString();
    System.out.println(ButtonText); }

//*******************************************************
origin: stackoverflow.com

 public class MyEventQueue extends EventQueue {

  private static final Logger logger = Logger.getLogger( MyEventQueue.class.getName() );
  @Override
  protected void dispatchEvent( AWTEvent newEvent )
  {
    try {
       logger.info("New Event start: "+ newEvent.toString() );
       super.dispatchEvent( newEvent );
    } catch( RuntimeException  e ) {
      //log uncatch exceptions in edt
      logger.error(e.getCause(),e);            
      JOptionPane.showMessageDialog( null, "someDescriptiveMessage");
    }
  }
}
origin: stackoverflow.com

System.out.print("Invoked: " + e.toString());
origin: stackoverflow.com

System.out.println("" + e.toString());
if (e.getKeyCode() == KeyEvent.VK_W ) {
origin: stackoverflow.com

log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
log.log(Level.INFO, e.toString());
origin: stackoverflow.com

label.setText(e.toString());
System.out.println(e.toString());
origin: stackoverflow.com

public void focusLost(FocusEvent fe) {
  l.setBackground(unfocused);
  ta.append(fe.toString());
  ta.append(eol);
  ta.append(fe.toString());
  ta.append(eol);
  @Override
  public void mouseEntered(MouseEvent me) {
    ta.append(me.toString());
    ta.append(eol);
    ta.append(me.toString());
    ta.append(eol);
  @Override
  public void keyTyped(KeyEvent ke) {
    ta.append(ke.toString());
    ta.append(eol);
origin: stackoverflow.com

showStatus(e.toString());
p = e.getPoint();
repaint();
origin: stackoverflow.com

label.setText(e.toString());
label.setText(e.toString());
origin: stackoverflow.com

jta1.append("\n" + s + "" + e.toString());
origin: stackoverflow.com

System.out.println(String.format("INPUT: %s", e.toString()));
boolean dispatch = false;
switch (e.getID()) {
  throw new IllegalArgumentException();
System.out.println(String.format("OUTPUT: %s", e.toString()));
System.out.println();
return dispatch;
origin: stackoverflow.com

applet.showStatus(e.toString());
Graphics2D g2 = (Graphics2D) image.getGraphics();
g2.fillOval(e.getPoint().x - 5, e.getPoint().y - 5, 10, 10);
origin: stackoverflow.com

MouseEvent m = (MouseEvent) event;
if (m.getID() == MouseEvent.MOUSE_CLICKED) {
  System.out.println(m.toString());
origin: stackoverflow.com

String s = event.toString();
origin: sc.fiji/Simple_Neurite_Tracer

if (Recorder.record && event != null && event.toString().contains("textfield")) {
  final String commandName = Recorder.getCommand();
  final String commandOptions = Recorder.getCommandOptions();
origin: net.imagej/ij

  public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
    if (e!=null && e.toString().contains("Undo")) {
      ImagePlus imp = WindowManager.getCurrentImage();
      if (imp!=null) IJ.run("Undo");
      return true;
    }
    width = (int)gd.getNextNumber();
    if (gd.invalidNumber() || width<0)
      width = (int)Prefs.get(widthKey, 1);
    //transparency = (int)gd.getNextNumber();
    //if (gd.invalidNumber() || transparency<0 || transparency>100)
    //	transparency = 100;
    String colorName = gd.getNextChoice();
    paintOnOverlay = gd.getNextBoolean();
    Color color = Colors.decode(colorName, null);
    Toolbar.setForegroundColor(color);
    Prefs.set(widthKey, width);
    Prefs.set(OVERLAY_KEY, paintOnOverlay);
    return true;
  }
}
origin: imagej/ImageJA

  public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
    if (e!=null && e.toString().contains("Undo")) {
      ImagePlus imp = WindowManager.getCurrentImage();
      if (imp!=null) IJ.run("Undo");
      return true;
    }
    width = (int)gd.getNextNumber();
    if (gd.invalidNumber() || width<0)
      width = (int)Prefs.get(widthKey, 1);
    //transparency = (int)gd.getNextNumber();
    //if (gd.invalidNumber() || transparency<0 || transparency>100)
    //	transparency = 100;
    String colorName = gd.getNextChoice();
    paintOnOverlay = gd.getNextBoolean();
    Color color = Colors.decode(colorName, null);
    Toolbar.setForegroundColor(color);
    Prefs.set(widthKey, width);
    Prefs.set(OVERLAY_KEY, paintOnOverlay);
    return true;
  }
}
origin: net.imagej/ij

public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
  if (e!=null && e.toString().contains("Undo")) {
    ImagePlus imp = WindowManager.getCurrentImage();
    if (imp==null) return true;
    Overlay overlay = imp.getOverlay();
    if (overlay!=null && overlay.size()>0) {
      overlay.remove(overlay.size()-1);
      imp.draw();
    }
    return true;
  }
  width = (float)gd.getNextNumber();
  if (gd.invalidNumber() || width<0)
    width = (float)Prefs.get(WIDTH_KEY, 5);
  transparency = (int)gd.getNextNumber();
  if (gd.invalidNumber() || transparency<0 || transparency>100)
    transparency = 100;
  String colorName = gd.getNextChoice();
  Color color = Colors.decode(colorName, null);
  Toolbar.setForegroundColor(color);
  Prefs.set(WIDTH_KEY, width);
  return true;
}
origin: imagej/ImageJA

public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
  if (e!=null && e.toString().contains("Undo")) {
    ImagePlus imp = WindowManager.getCurrentImage();
    if (imp==null) return true;
    Overlay overlay = imp.getOverlay();
    if (overlay!=null && overlay.size()>0) {
      overlay.remove(overlay.size()-1);
      imp.draw();
    }
    return true;
  }
  width = (float)gd.getNextNumber();
  if (gd.invalidNumber() || width<0)
    width = (float)Prefs.get(WIDTH_KEY, 5);
  transparency = (int)gd.getNextNumber();
  if (gd.invalidNumber() || transparency<0 || transparency>100)
    transparency = 100;
  String colorName = gd.getNextChoice();
  Color color = Colors.decode(colorName, null);
  Toolbar.setForegroundColor(color);
  Prefs.set(WIDTH_KEY, width);
  return true;
}
java.awtAWTEventtoString

Javadoc

Returns a String representation of this object.

Popular methods of AWTEvent

  • getSource
  • getID
    Returns the event type.
  • paramString
    Returns a string representing the state of this Event. This method is intended to be used only for d
  • setSource

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now