Package java.awt

Examples of java.awt.Toolkit$WindowList


  }
 
  public static int getHeight(String source)
  {
    try {
      Toolkit toolkit = Toolkit.getDefaultToolkit();
     
      File file = new File("images/" + source);
     
      java.awt.Image image = ImageIO.read(file);
       
View Full Code Here


    @SuppressWarnings("unchecked")
    public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
            Class<T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) {

        Toolkit t = Toolkit.getDefaultToolkit();
        return t.createDragGestureRecognizer(recognizerAbstractClass, this, c, actions, dgl);
    }
View Full Code Here

    public DragGestureRecognizer createDefaultDragGestureRecognizer(
                            Component c,
                            int actions,
                            DragGestureListener dgl) {

        Toolkit t = Toolkit.getDefaultToolkit();
        return t.createDragGestureRecognizer(
                MouseDragGestureRecognizer.class, this, c, actions, dgl);
    }
View Full Code Here

      }
    }
   
    public static int getScreenWidth()
    {
      Toolkit t = Toolkit.getDefaultToolkit();
      return t.getScreenSize().width;
    }
View Full Code Here

  /**
   * Initialise the application properties and store them.
   */
  public void init() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Dimension screenSize = toolkit.getScreenSize();
    double height = screenSize.getHeight();
    double width = screenSize.getWidth();

    props.setProperty(MAIN_WDW_HEIGHT, height + "");
    props.setProperty(MAIN_WDW_WIDTH, width + "");
View Full Code Here

    addWindowListener(this);
    setFocusable(true);
    setAlwaysOnTop(true);
    addKeyListener(this);

    Toolkit tk = Toolkit.getDefaultToolkit();
    Image img = tk.createImage("Texture/cursor.png");
    Cursor cursor = tk.createCustomCursor(img, new Point(8, 8),
        "/Texture/cursor.png");
    this.setCursor(cursor);
  }
View Full Code Here

     * @see org.apache.pivot.wtk.Platform#initializeFontRenderContext
     */
    private void showFontDesktopHints() {
        System.out.println("Show Font Desktop Hints:");

        Toolkit toolkit = Toolkit.getDefaultToolkit();
        java.util.Map<?, ?> fontDesktopHints =
            (java.util.Map<?, ?>)toolkit.getDesktopProperty("awt.font.desktophints");

        System.out.println(fontDesktopHints);
    }
View Full Code Here

            int width, int height) {
        if ((infoflags & (ImageObserver.ERROR | ImageObserver.ABORT)) != 0) {
            // Create a default error image.
            URL url = getClass().getResource(
                    "/diva/canvas/toolbox/errorImage.gif");
            Toolkit tk = Toolkit.getDefaultToolkit();
            _image = tk.getImage(url);
            return true;
        }

        if ((infoflags & (ImageObserver.HEIGHT | ImageObserver.WIDTH)) != 0) {
            // NOTE: Incredibly stupidly, when Java calls this method
View Full Code Here

   * @param fontName
   *            the name of the font to return
   * @return the font
   */
  private static Font getDesktopFont(String fontName) {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    return (Font) toolkit.getDesktopProperty(fontName);
  }
View Full Code Here

        painter.currentLineIndex = line;
        tokens = painter.currentLineTokens
          = tokenMarker.markTokens(lineSegment,line);
      }

      Toolkit toolkit = painter.getToolkit();
      Font defaultFont = painter.getFont();
      SyntaxStyle[] styles = painter.getStyles();

      for(;;)
      {
View Full Code Here

TOP

Related Classes of java.awt.Toolkit$WindowList

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.