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

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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