Package mdes.slick.sui

Examples of mdes.slick.sui.Frame


      if (m_bagForm != null) {
      getDisplay().remove(m_bagForm);
      hideHUDElements();
    } else {
      hideHUDElements();
      m_bagForm = new Frame();
      m_bagForm.getContentPane().setX(m_bagForm.getContentPane().getX() - 1);
      m_bagForm.getContentPane().setY(m_bagForm.getContentPane().getY() + 1);
      m_bagForm.setBackground(new Color(0, 0, 0, 70));
      m_bagForm.setResizable(false);
      m_bagForm.setDraggable(false);
View Full Code Here


    m_release.setLocation(m_changeBox.getX() + m_changeBox.getWidth(), 192);
    m_release.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        setVisible(false);

        final Frame confirm = new Frame("Release");
        confirm.getCloseButton().setVisible(false);

        confirm.setResizable(false);
        confirm.setSize(370, 70);
        confirm.setLocationRelativeTo(null);
        Label yousure = new Label(
            "Are you sure you want to release your Pokemon?");
        yousure.pack();
        Button yes = new Button("Release");
        yes.pack();
        yes.setLocation(0, confirm.getHeight()
            - confirm.getTitleBar().getHeight() - yes.getHeight());
        yes.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            confirm.setVisible(false);
            getDisplay().remove(confirm);

            GameClient.getInstance().getPacketGenerator().writeTcpMessage(
                "BR" + m_boxIndex + "," + m_buttonChosen);

            GameClient.getInstance().getPacketGenerator().writeTcpMessage("Bf");
            GameClient.getInstance().getUi().stopUsingBox();
          }
        });
        Button no = new Button("Keep");
        no.pack();
        no.setLocation(yes.getWidth(), confirm.getHeight()
            - confirm.getTitleBar().getHeight() - no.getHeight());
        no.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            confirm.setVisible(false);
            getDisplay().remove(confirm);

            GameClient.getInstance().getPacketGenerator().writeTcpMessage("Bf");
            GameClient.getInstance().getUi().stopUsingBox();

          }
        });
        confirm.getContentPane().add(yousure);
        confirm.getContentPane().add(yes);
        confirm.getContentPane().add(no);

        getDisplay().add(confirm);
      }
    });
    m_release.setEnabled(false);
View Full Code Here

TOP

Related Classes of mdes.slick.sui.Frame

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.