Package java.awt

Examples of java.awt.Toolkit$AWTTreeLock


                    imStyles = hl.getStyle();
                } catch (NoSuchMethodError e) {
                }
               
                if (imStyles == null) {
                    Toolkit tk = Toolkit.getDefaultToolkit();
                    imStyles = tk.mapInputMethodHighlight(hl);
                }

                if (imStyles != null) {
                    HashMap newStyles = new HashMap(5, (float)0.9);
                    newStyles.putAll(oldStyles);
View Full Code Here


    }

    public static Image loadImage ( String strFileName ) {
        Image           image = null;
        URL           url;
        Toolkit           toolkit;
        Class           classObject;
        Object                 objImageProducer;
        ImageProducer         imageProducer;
        BufferedInputStream    streamImage;
        byte                   arrImageBytes [];

        toolkit = Toolkit.getDefaultToolkit ();

        try {
            classObject = Class.forName ( "jamp.MainWindow" );
            url = classObject.getResource ( strFileName );
            if ( url != null ) {
                objImageProducer = url.getContent ();
                if ( objImageProducer instanceof ImageProducer ) {
                    imageProducer = (ImageProducer) objImageProducer;
                    image = toolkit.createImage ( imageProducer );
                }
                else if ( objImageProducer instanceof BufferedInputStream ) {
                    streamImage = (BufferedInputStream) objImageProducer;
                    arrImageBytes = new byte [streamImage.available()];
                    streamImage.read ( arrImageBytes );
                    image = toolkit.createImage ( arrImageBytes );
                }
            }
        }
        catch ( Exception exception ) {
            exception.printStackTrace ();
View Full Code Here

*  to help with finding the source code for the component being highlighted.
*/
public class DebugEventListener implements AWTEventListener
{
  public void setEnabled(boolean enable) {
    Toolkit kit = Toolkit.getDefaultToolkit();
    if (enable) {
      /* register as a listener for mouse events */
      kit.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK|AWTEvent.MOUSE_MOTION_EVENT_MASK);
     
      /* show all tooltips for ten seconds before hiding */
      ToolTipManager.sharedInstance().setDismissDelay(10000);     
    } else {
      kit.removeAWTEventListener(this);
    }
  }
View Full Code Here

    public static Image getImage(String icon) {
        if (instance == null) {
            instance = new Standard();
        }

        Toolkit toolkit = Toolkit.getDefaultToolkit();
        URL imageUrl = instance.getClass().getClassLoader().getResource(
                "images/" + icon);
        if (imageUrl == null) {
            return null;
        }

        return toolkit.createImage(imageUrl);
    }
View Full Code Here

    public static ImageIcon getIcon(String icon) {
        if (instance == null) {
            instance = new Standard();
        }

        Toolkit toolkit = Toolkit.getDefaultToolkit();
        URL iconUrl = instance.getClass().getClassLoader().getResource(icon);

        if (iconUrl == null) {
            com.valhalla.Logger.debug("Could not find an image for " + icon);
            return null;
View Full Code Here

    public static void cascadePlacement(Container container) {
        if (instance == null) {
            instance = new Standard();
        }

        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Dimension sSize = toolkit.getScreenSize();
        Dimension cSize = container.getSize();

        if (instance.currentX + cSize.width > sSize.width - 50) {
            instance.currentX = 20;
        }
View Full Code Here

public class GnomeSystemTrayService implements SystemTrayService {

  public GnomeSystemTrayService()
  {
    Toolkit t = Toolkit.getDefaultToolkit();
  }
View Full Code Here

                e.printStackTrace();
            }
            ef = (EmbeddedFrame) value;
        } else {  
            // 1.5  JVM decide on which EmbeddedFrame to use
            Toolkit toolkit = Toolkit.getDefaultToolkit();

            // System.out.println("toolkit = " + toolkit);
            // System.out.flush();
            if (toolkit instanceof sun.awt.motif.MToolkit) {
                Class clazz = null;
View Full Code Here

    final String flocalized = localized;

                cursor = (Cursor) java.security.AccessController.doPrivileged(
        new java.security.PrivilegedExceptionAction() {
        public Object run() throws Exception {
      Toolkit toolkit = Toolkit.getDefaultToolkit();
      Image image = toolkit.getImage(
         systemCustomCursorDirPrefix + fileName);
      return toolkit.createCustomCursor(
            image, new Point(fx,fy), flocalized);
        }
    });
      } catch (Exception e) {
    throw new AWTException(
View Full Code Here

        }

        private void initialize() {
            refreshLanguage();

            final Toolkit toolkit = Toolkit.getDefaultToolkit();
            clipboard = toolkit.getSystemClipboard();

            cutItem.addActionListener(this);
            copyItem.addActionListener(this);
            pasteItem.addActionListener(this);
View Full Code Here

TOP

Related Classes of java.awt.Toolkit$AWTTreeLock

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.