Package org.spoutcraft.launcher.skin.components

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


        if (remember.isSelected()) {
          saveUsername(getSelectedUser(), pass);
        }
      }
    } else if (action.equals(IMAGE_LOGIN_ACTION)) {
      DynamicButton userButton = (DynamicButton)c;
      userButton.setEnabled(false);
      this.name.setText(userButton.getAccount());
      this.pass.setText(this.getSavedPassword(userButton.getAccount()));
      this.remember.setSelected(true);
      action(LOGIN_ACTION, userButton);
    else if (action.equals(REMOVE_USER)) {
      DynamicButton userButton = removeButtons.get((JButton)c);
      this.removeAccount(userButton.getAccount());
      userButton.setVisible(false);
      userButton.setEnabled(false);
      getContentPane().remove(userButton);
      c.setVisible(false);
      c.setEnabled(false);
      getContentPane().remove(c);
      removeButtons.remove(c);
View Full Code Here


      // Create future image, using default mc avatar for now
      FutureImage userImage = new FutureImage(getDefaultImage());
      callback.setCallback(userImage);

      DynamicButton userButton = new DynamicButton(this, userImage, 44, accountName, userName);
      userButton.setFont(minecraft.deriveFont(14F));

      userImage.setRepaintCallback(userButton);

      userButton.setBounds((FRAME_WIDTH - 90) * (i + 1) / (users + 1), (FRAME_HEIGHT - 110) / 2 , 90, 90);
      contentPane.add(userButton);
      userButton.setActionCommand(IMAGE_LOGIN_ACTION);
      userButton.addActionListener(this);
      setIcon(userButton.getRemoveIcon(), "remove.png", 16);
      userButton.getRemoveIcon().addActionListener(this);
      userButton.getRemoveIcon().setActionCommand(REMOVE_USER);
      userButton.getRemoveIcon().setBorder(BorderFactory.createEmptyBorder());
      userButton.getRemoveIcon().setContentAreaFilled(false);
      removeButtons.put(userButton.getRemoveIcon(), userButton);
    }

    contentPane.add(name);
    contentPane.add(pass);
    contentPane.add(remember);
View Full Code Here

TOP

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

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.