Package java.awt

Examples of java.awt.Toolkit$WindowList


        ((JNodeToolkit) tk).decRefCount(true);
        Toolkit.clearDefaultToolkit();
    }

    public static void refreshGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).refresh();
    }
View Full Code Here


    protected void refresh() {
        // Override me
    }

    public static void waitUntilStopped() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).doWaitUntilStopped();
    }
View Full Code Here

  public static void configureGraphics(final Graphics graphics) {
    if (graphics instanceof Graphics2D) {
      final Graphics2D graphics2D = (Graphics2D) graphics;
      // http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/guides/2d/flags.html#aaFonts
      // http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/awt/doc-files/DesktopProperties.html
      final Toolkit tk = Toolkit.getDefaultToolkit();
      final Map map = (Map) tk.getDesktopProperty(DESKTOP_PROPERTY_AWT_FONT_DESKTOP_HINTS);
      if (map != null) {
        graphics2D.addRenderingHints(map);
      } else {
        graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
View Full Code Here

        final File file = new File(path);

        if (!file.exists()) {
            return null;
        }
        final Toolkit t = Toolkit.getDefaultToolkit();
        Image image = t.getImage(file.getAbsolutePath());

        if (image != null) {
            mt.addImage(image, 0);

            try {
View Full Code Here

            log.println("maximize the window size");
            XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xTextDoc);
            XFrame xFrame = xModel.getCurrentController().getFrame();
            XWindow xWin = xFrame.getContainerWindow();
           
            Toolkit tk = Toolkit.getDefaultToolkit();
            Dimension dim = tk.getScreenSize();
           
            Rectangle newPosSize = xWin.getPosSize();
            newPosSize.Width = new Double(dim.getWidth()).intValue();
            newPosSize.Height = new Double(dim.getHeight()).intValue();
            newPosSize.X = 0;
View Full Code Here

    }


    public double getAspectRatio()
    {
        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        return screenSize.getWidth() / screenSize.getHeight();
    }
View Full Code Here


    public Point getCenteredPosition( JFrame frame )
    {
        Point pt = new Point();
        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        pt.x = ( screenSize.width - frame.getWidth() ) / 2;
        pt.y = ( screenSize.height - frame.getHeight() ) / 2;
        return pt;
    }
View Full Code Here

        if (osName.indexOf("Windows") >= 0) {
            relativeSize = 12;
        }

        Toolkit tk = frame.getToolkit();
        Dimension d = tk.getScreenSize();
        frame.setSize((d.width * relativeSize) / 15,
            (d.height * relativeSize) / 15);
        frame.setLocation(d.width / 8, d.height / 16);
    }
View Full Code Here

    private static Thread animator;

    public SplashFrame() {
        super(new Frame());

        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Image image = toolkit.getImage(MainFrame.class.getResource("SplashBug1.png"));
        Image image2 = toolkit.getImage(MainFrame.class.getResource("SplashBug2B.png"));
        Image imageReverse = toolkit.getImage(MainFrame.class.getResource("SplashBug1reverse.png"));
        Image image2Reverse = toolkit.getImage(MainFrame.class.getResource("SplashBug2reverseB.png"));

        JLabel l = new JLabel(new ImageIcon(MainFrame.class.getResource("umdFindbugs.png")));
        JPanel p = new JPanel();
        Viewer viewer = new Viewer(image, image2, imageReverse, image2Reverse);
        final JPanel bottom = viewer;
View Full Code Here

    return false;
  }

  Rectangle getContainerPopupArea(GraphicsConfiguration gc) {
    Rectangle screenBounds;
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Insets insets;
    if (gc != null) {
      // If we have GraphicsConfiguration use it
      // to get screen bounds
      screenBounds = gc.getBounds();
      insets = toolkit.getScreenInsets(gc);
    } else {
      // If we don't have GraphicsConfiguration use primary screen
      screenBounds = new Rectangle(toolkit.getScreenSize());
      insets = new Insets(0, 0, 0, 0);
    }
    // Take insets into account
    screenBounds.x += insets.left;
    screenBounds.y += insets.top;
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.