Package com.l2client.gui.dialogs

Examples of com.l2client.gui.dialogs.CharCreateJPanel


    //for the first just display the menu for char selection which steers the display
    //Name, Sex, Race, Class, (HairStyle, HairColor, Face)
    SwingUtilities.invokeLater(new Runnable() {

      public void run() {
        final CharCreateJPanel pan = Singleton.get().getGuiController()
            .displayCharCreateJPanel();
       
        // action that gets executed in the update thread:
        pan.addCreateActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
                clientInfo.sendGamePacket(new CharacterCreate(pan.getNewCharSummary()));
                //dialog will stay open, will be closed on
                //create ok package or cancel       
              }
            });
        pan.addCancelActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // this gets executed in jme thread
            // do 3d system calls in jme thread only!
            doCharPresentation();
          }
        });
        pan.addModelchangedListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // this gets executed in jme thread
            // do 3d system calls in jme thread only!

            Singleton.get().getSceneManager().removeChar();
           
            //FIXME reevaluate model composition
            charSummary.setNewCharSummary(pan.getNewCharSummary());
            charSummary.attachVisuals();
            charSummary.setLocalTranslation(.126f, -0.1224f, 7.76f);
            Singleton.get().getSceneManager().changeCharNode(charSummary,Action.ADD);
            //FIXME end of move this out
          }
        });
        pan.afterDisplayInit();
      }
    });
    //NICE TO HAVE:
    //display x characters for x races
    //change input handler to only allow left,right, escape and enter
View Full Code Here


    final JInternalFrame internalFrame = new JInternalFrame();

    internalFrame.setLocation(20, 20);
    internalFrame.setResizable(false);
    internalFrame.setFrameIcon(null);
    final CharCreateJPanel pan = new CharCreateJPanel();
    internalFrame.add(pan);
   
    internalFrame.setVisible(true);
    internalFrame.setSize(new java.awt.Dimension(200, 180));
    internalFrame.pack();

    desktopPane.add(internalFrame);
   
    wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
   
     // standard swing action:
    pan.addCancelActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        // this gets executed in swing thread
        // alter swing components only in swing thread!
        internalFrame.setVisible(false);
        desktopPane.remove(internalFrame);
View Full Code Here

TOP

Related Classes of com.l2client.gui.dialogs.CharCreateJPanel

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.