Examples of JMEDesktop

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics
  • com.jmex.awt.swingui.JMEDesktop

  • Examples of com.jme3.swingGui.JMEDesktop

            setupScene();

        }
        private void setupGUI() {
        this.jmeDesktop = new JMEDesktop("Swing Desktop",settings.getWidth(),settings.getHeight(),
            FastMath.nearestPowerOfTwo(settings.getWidth()),FastMath.nearestPowerOfTwo(settings.getHeight()),
            false/*no mipmap*/,inputManager,
            settings /*we pass it in so desktop will rescale on resizing*/, renderManager);
        jmeDesktop.getJDesktop().setBackground( new Color( 1, 1, 1, 0.0f ) );
        jmeDesktop.setCullHint( Spatial.CullHint.Never );
    View Full Code Here

    Examples of com.jme3.swingGui.JMEDesktop

       *
       * @param root The SceneRoot to be used for attaching the desktop node
       * @param input The default input handler to be used (will be put on the base stack of the InputController)
       */
      public void initialize(AppSettings settings, RenderManager renderMan) {
        this.jmeDesktop = new JMEDesktop("Swing Desktop",settings.getWidth(),settings.getHeight(),
            FastMath.nearestPowerOfTwo(settings.getWidth()),FastMath.nearestPowerOfTwo(settings.getHeight()),
            false/*no mipmap*/,Singleton.get().getInputController().getInputManager(),
            settings /*we pass it in so desktop will rescale on resizing*/, renderMan);
        jmeDesktop.getJDesktop().setBackground( new Color( 1, 1, 1, 0.0f ) );
        jmeDesktop.setCullHint( Spatial.CullHint.Never );
    View Full Code Here

    Examples of com.jmex.awt.swingui.JMEDesktop

        //create a node for our GUI and change which render queue it's in
        guiNode = new Node("gui node");
        guiNode.setRenderQueueMode(Renderer.QUEUE_ORTHO); //this is make sure it is drawn correctly
       
        //create the actual desktop object and attach it to our node
        final JMEDesktop gui = new JMEDesktop("GUI", 500, 400, input);
        guiNode.attachChild(gui);
       
        //set the desktop's location
        gui.getLocalTranslation().set(display.getWidth() / 2 - 30, display.getHeight() / 2 + 50, 0);
       
        //Swing stuff can't happen in the jMonkey thread, so we use SwingUtilities's
        //invokeLater method to create a new thread in which all the Swing stuff is
        //setup. It's a round-about way of doing things, but it's necessary.
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            gui.getJDesktop().setBackground(new Color(0f, .6f, .2f, .8f)); //set the background color
           
            //create our GUI components
            JTextArea txtChat = new JTextArea("Hello World", 4, 20);
            JButton btnSubmit = new JButton("Submit");
           
            //add our components to the desktop
            gui.getJDesktop().add(txtChat);
            gui.getJDesktop().add(btnSubmit);
           
            //set their locations and sizes
            txtChat.setLocation(200, 200);
            btnSubmit.setLocation(200, 275);
            txtChat.setSize(txtChat.getPreferredSize());
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. 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.