Package javax.swing

Examples of javax.swing.ToolTipManager


  private ArrayList reportActionListener;
  private transient ReportActionListener[] cachedReportActionListeners;

  public PreviewDrawablePanel()
  {
    final ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
    toolTipManager.registerComponent(this);

    final ReportMouseHandler reportMouseHandler = new ReportMouseHandler();
    addMouseListener(reportMouseHandler);
    addMouseMotionListener(reportMouseHandler);
    addMouseListener(new ReportActionHandler());
View Full Code Here


            if (lastToolTip != null) {
                layer.fireRequestToolTip(lastToolTip);
                // forward the event to the tool tip manager so it will popup
                // the tool tip right away, otherwise an additional event is
                // required to trigger it
                ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
                toolTipManager.mouseMoved(me);
            } else {
                layer.fireHideToolTip();
            }
        }
    }
View Full Code Here

        arrayUrlPresets.addPreset("Google",
      "http://www.google.com/search?hl=en&ie=ISO-8859-1&q=HEADER");
        arrayUrlPresets.setDefaultPreset(-1);
    }
    try {
      ToolTipManager ttm  = ToolTipManager.sharedInstance();
      ttm.setEnabled(true);
    } catch (Exception e) {
    }
   
    prefs = new Preferences();
    prefs.bindConfig(getGlobalConfig().getNode("Preferences"));
View Full Code Here

            l.setText("Model");                   
          return l;
        }
        Object userobj = ((DefaultMutableTreeNode)value).getUserObject ();
        l.setText(userobj.toString());       
        ToolTipManager ttmanager = ToolTipManager.sharedInstance ();
        ttmanager.registerComponent(l);
        if (userobj instanceof Element) {
          Element e = (Element) userobj;
          String nodename = e.getNodeName ();
          String name = e.getAttribute ("name");
          if (name == null) name = "";
View Full Code Here

          l.setIcon(familyRoot);                   
          return l;
        }
        Object userobj = ((DefaultMutableTreeNode)value).getUserObject ();
        // l.setText(userobj.toString());       
        ToolTipManager ttmanager = ToolTipManager.sharedInstance ();
        ttmanager.registerComponent(l);
        if (userobj instanceof Element) {
          Element e = (Element) userobj;
          Node parent = e.getParentNode();
          String nodename = e.getNodeName ();
          String name = e.getAttribute ("name");         
View Full Code Here

        public void mousePressed(final MouseEvent ev) {
          EventQueue.invokeLater(new Runnable() {
              public void run() {
                float valueUnderMouse = getSliderValueAt(qualitySlider, ev.getX(), preferences);
                if (qualitySlider.getValue() == Math.round(valueUnderMouse)) {
                  ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
                  int initialDelay = toolTipManager.getInitialDelay();
                  toolTipManager.setInitialDelay(Math.min(initialDelay, 150));
                  toolTipManager.mouseMoved(ev);
                  toolTipManager.setInitialDelay(initialDelay);
                }
              }
            });
        }
      });
View Full Code Here

        public void mousePressed(final MouseEvent ev) {
          EventQueue.invokeLater(new Runnable() {
              public void run() {
                float valueUnderMouse = getSliderValueAt(qualitySlider, ev.getX(), preferences);
                if (qualitySlider.getValue() == Math.round(valueUnderMouse)) {
                  ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
                  int initialDelay = toolTipManager.getInitialDelay();
                  toolTipManager.setInitialDelay(Math.min(initialDelay, 150));
                  toolTipManager.mouseMoved(ev);
                  toolTipManager.setInitialDelay(initialDelay);
                }
              }
            });
        }
      });
View Full Code Here

  private ArrayList reportActionListener;
  private transient ReportActionListener[] cachedReportActionListeners;

  public PreviewDrawablePanel()
  {
    final ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
    toolTipManager.registerComponent(this);

    final ReportMouseHandler reportMouseHandler = new ReportMouseHandler();
    addMouseListener(reportMouseHandler);
    addMouseMotionListener(reportMouseHandler);
    addMouseListener(new ReportActionHandler());
View Full Code Here

public class setDismissDelay implements Testlet {

    public void test(TestHarness harness)
    {
      ToolTipManager m = ToolTipManager.sharedInstance();
      m.setDismissDelay(123);
      harness.check(m.getDismissDelay(), 123);
     
      // try zero
      m.setDismissDelay(0);
      harness.check(m.getDismissDelay(), 0);
     
      // try negative
      boolean pass = false;
      try
      {
        m.setDismissDelay(-1);
      }
      catch (IllegalArgumentException e)
      {
        pass = true;
      }
View Full Code Here

public class setReshowDelay implements Testlet {

    public void test(TestHarness harness)
    {
      ToolTipManager m = ToolTipManager.sharedInstance();
      m.setInitialDelay(20);
      m.setReshowDelay(123);
      harness.check(m.getReshowDelay(), 123);
      harness.check(m.getInitialDelay(), 20);
     
      // try zero
      m.setReshowDelay(0);
      harness.check(m.getReshowDelay(), 0);
     
      // try negative
      boolean pass = false;
      try
      {
        m.setReshowDelay(-1);
      }
      catch (IllegalArgumentException e)
      {
        pass = true;
      }
View Full Code Here

TOP

Related Classes of javax.swing.ToolTipManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.