Package org.spoutcraft.launcher.skin.components

Examples of org.spoutcraft.launcher.skin.components.TransparentButton


    donate.setOpaque(false);
    donate.setTransparency(0.70F);
    donate.setHoverTransparency(1F);

    // Close button
    close = new TransparentButton();
    close.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(closeIcon)));
    if (OperatingSystem.getOS().isMac()) {
      close.setBounds(0, 0, 37, 20);
    } else {
      close.setBounds(FRAME_WIDTH - 37, 0, 37, 20);
    }
    close.setTransparency(0.70F);
    close.setHoverTransparency(1F);
    close.setActionCommand(CLOSE_ACTION);
    close.addActionListener(this);
    close.setBorder(BorderFactory.createEmptyBorder());
    close.setContentAreaFilled(false);

    // Minimize button
    minimize = new TransparentButton();
    minimize.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(minimizeIcon)));
    if (OperatingSystem.getOS().isMac()) {
      minimize.setBounds(37, 0, 37, 20);
    } else {
      minimize.setBounds(FRAME_WIDTH - 74, 0, 37, 20);
    }
    minimize.setTransparency(0.70F);
    minimize.setHoverTransparency(1F);
    minimize.setActionCommand(MINIMIZE_ACTION);
    minimize.addActionListener(this);
    minimize.setBorder(BorderFactory.createEmptyBorder());
    minimize.setContentAreaFilled(false);

    // Options Button
    options = new TransparentButton();
    options.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(optionsIcon)));
    if (OperatingSystem.getOS().isMac()) {
      options.setBounds(74, 0, 37, 20);
    } else {
      options.setBounds(FRAME_WIDTH - 111, 0, 37, 20);
    }
    options.setTransparency(0.70F);
    options.setHoverTransparency(1F);
    options.setActionCommand(OPTIONS_ACTION);
    options.addActionListener(this);
    options.setBorder(BorderFactory.createEmptyBorder());
    options.setContentAreaFilled(false);

    // Steam button
    steam = new TransparentButton();
    steam.setToolTipText("Game with us on Steam");
    steam.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(steamIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
    steam.setBounds(FRAME_WIDTH - 35, FRAME_HEIGHT - 32, 30, 30);
    steam.setTransparency(0.70F);
    steam.setHoverTransparency(1F);
    steam.setActionCommand(STEAM_ACTION);
    steam.addActionListener(this);
    steam.setBorder(BorderFactory.createEmptyBorder());
    steam.setContentAreaFilled(false);
    steam.setRolloverIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(steamHoverIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));

    // Facebook button
    facebook = new TransparentButton();
    facebook.setToolTipText("Like us on Facebook");
    facebook.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(facebookIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
    facebook.setBounds(FRAME_WIDTH - 70, FRAME_HEIGHT - 32, 30, 30);
    facebook.setTransparency(0.70F);
    facebook.setHoverTransparency(1F);
    facebook.setActionCommand(FACEBOOK_ACTION);
    facebook.addActionListener(this);
    facebook.setBorder(BorderFactory.createEmptyBorder());
    facebook.setContentAreaFilled(false);
    facebook.setRolloverIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(facebookHoverIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));

    // Twitter button
    twitter = new TransparentButton();
    twitter.setToolTipText("Follow us on Twitter");
    twitter.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(twitterIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
    twitter.setBounds(FRAME_WIDTH - 105, FRAME_HEIGHT - 32, 30, 30);
    twitter.setTransparency(0.70F);
    twitter.setHoverTransparency(1F);
    twitter.setActionCommand(TWITTER_ACTION);
    twitter.addActionListener(this);
    twitter.setBorder(BorderFactory.createEmptyBorder());
    twitter.setContentAreaFilled(false);
    twitter.setRolloverIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(twitterHoverIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));

    // Google+ button
    gplus = new TransparentButton();
    gplus.setToolTipText("Follow us on Google+");
    gplus.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(gplusIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
    gplus.setBounds(FRAME_WIDTH - 140, FRAME_HEIGHT - 32, 30, 30);
    gplus.setTransparency(0.70F);
    gplus.setHoverTransparency(1F);
    gplus.setActionCommand(GPLUS_ACTION);
    gplus.addActionListener(this);
    gplus.setBorder(BorderFactory.createEmptyBorder());
    gplus.setContentAreaFilled(false);
    gplus.setRolloverIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(gplusHoverIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));

    // YouTube button
    youtube = new TransparentButton();
    youtube.setToolTipText("Subscribe to our videos");
    youtube.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(youtubeIcon).getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
    youtube.setBounds(FRAME_WIDTH - 175, FRAME_HEIGHT - 32, 30, 30);
    youtube.setTransparency(0.70F);
    youtube.setHoverTransparency(1F);
View Full Code Here

TOP

Related Classes of org.spoutcraft.launcher.skin.components.TransparentButton

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.