Package java.awt

Examples of java.awt.Toolkit$AWTTreeLock


        setUndecorated(true);
        JLabel label = new JLabel("Please wait...");
        label.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        this.add(label);
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit()
            Dimension screenSize = toolkit.getScreenSize();
            this.setLocation((int)screenSize.getWidth()/2-this.getWidth()/2,(int)screenSize.getHeight()/2-this.getHeight()/2);
        } catch (Exception e) {
            // we will ignore this
        }       
        pack();
View Full Code Here


        initComponents();
        hideProgressBar();       
        jProgressBar1.setMinimum(0);
        jProgressBar1.setMaximum(100);
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit()
            Dimension screenSize = toolkit.getScreenSize();
            this.setLocation((int)screenSize.getWidth()-this.getWidth(),(int)screenSize.getHeight()-this.getHeight()-25);
        } catch (Exception e) {
            // we will ignore this
        }
    }
View Full Code Here

        update();
    }

    private void setImages() {
        MediaTracker mt = new MediaTracker(this);
        Toolkit tk = getToolkit();
        idleImage[0] = tk.getImage(IMAGE_DIR + "/tab_general_idle.gif"); //$NON-NLS-1$
        idleImage[1] = tk.getImage(IMAGE_DIR + "/tab_armor_idle.gif"); //$NON-NLS-1$
        idleImage[2] = tk.getImage(IMAGE_DIR + "/tab_systems_idle.gif"); //$NON-NLS-1$
        idleImage[3] = tk.getImage(IMAGE_DIR + "/tab_weapon_idle.gif"); //$NON-NLS-1$
        idleImage[4] = tk.getImage(IMAGE_DIR + "/tab_extras_idle.gif"); //$NON-NLS-1$
        activeImage[0] = tk.getImage(IMAGE_DIR + "/tab_general_active.gif"); //$NON-NLS-1$
        activeImage[1] = tk.getImage(IMAGE_DIR + "/tab_armor_active.gif"); //$NON-NLS-1$
        activeImage[2] = tk.getImage(IMAGE_DIR + "/tab_systems_active.gif"); //$NON-NLS-1$
        activeImage[3] = tk.getImage(IMAGE_DIR + "/tab_weapon_active.gif"); //$NON-NLS-1$
        activeImage[4] = tk.getImage(IMAGE_DIR + "/tab_extras_active.gif"); //$NON-NLS-1$
        idleCorner = tk.getImage(IMAGE_DIR + "/idle_corner.gif"); //$NON-NLS-1$
        selectedCorner = tk.getImage(IMAGE_DIR + "/active_corner.gif"); //$NON-NLS-1$

        for (int i = 0; i < 5; i++) {
            mt.addImage(idleImage[i], 0);
            mt.addImage(activeImage[i], 0);
        }
View Full Code Here

        update();
    }

    private void setImages() {
        MediaTracker mt = new MediaTracker(this);
        Toolkit tk = getToolkit();
        idleImage[0] = tk.getImage(IMAGE_DIR + "/tab_general_idle.gif"); //$NON-NLS-1$
        idleImage[1] = tk.getImage(IMAGE_DIR + "/tab_armor_idle.gif"); //$NON-NLS-1$
        idleImage[2] = tk.getImage(IMAGE_DIR + "/tab_systems_idle.gif"); //$NON-NLS-1$
        idleImage[3] = tk.getImage(IMAGE_DIR + "/tab_weapon_idle.gif"); //$NON-NLS-1$
        idleImage[4] = tk.getImage(IMAGE_DIR + "/tab_extras_idle.gif"); //$NON-NLS-1$
        activeImage[0] = tk.getImage(IMAGE_DIR + "/tab_general_active.gif"); //$NON-NLS-1$
        activeImage[1] = tk.getImage(IMAGE_DIR + "/tab_armor_active.gif"); //$NON-NLS-1$
        activeImage[2] = tk.getImage(IMAGE_DIR + "/tab_systems_active.gif"); //$NON-NLS-1$
        activeImage[3] = tk.getImage(IMAGE_DIR + "/tab_weapon_active.gif"); //$NON-NLS-1$
        activeImage[4] = tk.getImage(IMAGE_DIR + "/tab_extras_active.gif"); //$NON-NLS-1$
        idleCorner = tk.getImage(IMAGE_DIR + "/idle_corner.gif"); //$NON-NLS-1$
        selectedCorner = tk.getImage(IMAGE_DIR + "/active_corner.gif"); //$NON-NLS-1$

        for (int i = 0; i < 5; i++) {
            mt.addImage(idleImage[i], 0);
            mt.addImage(activeImage[i], 0);
        }
View Full Code Here

    public void setFileExt(String fileExt) {
        this.fileExt = fileExt;
    }

    public void capture() {
        Toolkit tk = Toolkit.getDefaultToolkit();
        tk.sync();
        Rectangle ecran = new Rectangle(tk.getScreenSize());
        try {
            robot = new Robot();
        } catch (java.awt.AWTException awte) {
            awte.printStackTrace();
        }
View Full Code Here

    public UnitOverview(ClientGUI clientgui) {
        this.clientgui = clientgui;
        fm = clientgui.getFontMetrics(FONT);

        Toolkit toolkit = clientgui.getToolkit();
        scrollUp = toolkit.getImage(IMAGE_DIR + "/scrollUp.gif"); //$NON-NLS-1$
        PMUtil.setImage(scrollUp, clientgui);
        scrollDown = toolkit.getImage(IMAGE_DIR + "/scrollDown.gif"); //$NON-NLS-1$
        PMUtil.setImage(scrollDown, clientgui);
        pageUp = toolkit.getImage(IMAGE_DIR + "/pageUp.gif"); //$NON-NLS-1$
        PMUtil.setImage(pageUp, clientgui);
        pageDown = toolkit.getImage(IMAGE_DIR + "/pageDown.gif"); //$NON-NLS-1$
        PMUtil.setImage(pageDown, clientgui);
    }
View Full Code Here

    public UnitOverview(ClientGUI clientgui) {
        this.clientgui = clientgui;
        fm = clientgui.getFontMetrics(FONT);

        Toolkit toolkit = clientgui.getToolkit();
        scrollUp = toolkit.getImage(IMAGE_DIR + "/scrollUp.gif"); //$NON-NLS-1$
        PMUtil.setImage(scrollUp, clientgui);
        scrollDown = toolkit.getImage(IMAGE_DIR + "/scrollDown.gif"); //$NON-NLS-1$
        PMUtil.setImage(scrollDown, clientgui);
        pageUp = toolkit.getImage(IMAGE_DIR + "/pageUp.gif"); //$NON-NLS-1$
        PMUtil.setImage(pageUp, clientgui);
        pageDown = toolkit.getImage(IMAGE_DIR + "/pageDown.gif"); //$NON-NLS-1$
        PMUtil.setImage(pageDown, clientgui);
    }
View Full Code Here

   * server return == (byte) 0 --> do not consume this event
   *
   * @param e
   */
  protected void dispatchTouchEvent(TouchData e) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension dim = tk.getScreenSize();
    if (Logger.debugging)
      Logger.debug("[JmolTouchSimulator] dispatchTouchEvent("+e.id+", "+e.x+", "+e.y+", "+e.type+")");
    try {
      _out.writeInt(-1);
      _out.writeInt(21);
View Full Code Here

    parent.addWindowListener(new WindowListener());
  }

  public void showSplashScreen() {

    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension screenSize = tk.getScreenSize();
    setBackground(BORDERCOLOR);
    int w = imgWidth + (BORDERSIZE * 2);
    int h = imgHeight + (BORDERSIZE * 2) + STATUSSIZE;
    int x = (screenSize.width - w) / 2;
    int y = (screenSize.height - h) / 2;
View Full Code Here

  }
 
  public static int getWidth(String source)
  {
    try {
      Toolkit toolkit = Toolkit.getDefaultToolkit();
     
      File file = new File("images/" + source);
     
      java.awt.Image image = ImageIO.read(file);
       
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.