Example usage for com.badlogic.gdx.backends.lwjgl LwjglCanvas LwjglCanvas

List of usage examples for com.badlogic.gdx.backends.lwjgl LwjglCanvas LwjglCanvas

Introduction

In this page you can find the example usage for com.badlogic.gdx.backends.lwjgl LwjglCanvas LwjglCanvas.

Prototype

public LwjglCanvas(ApplicationListener listener) 

Source Link

Usage

From source file:com.github.fauu.helix.editor.EditorFrame.java

License:Open Source License

public EditorFrame() {
    setTitle("helix");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    final MenuBar menuBar = new MenuBar(this);
    setJMenuBar(menuBar);//from   w w  w  . j  a  va2s  .c om

    mainContainer = getContentPane();
    mainContainer.setLayout(new BorderLayout());

    sidebar = new Sidebar(this);
    mainContainer.add(sidebar, BorderLayout.LINE_START);

    final LwjglCanvas canvas = new LwjglCanvas(new World(this));
    canvas.getCanvas().setPreferredSize(new Dimension(800, 600));
    mainContainer.add(canvas.getCanvas(), BorderLayout.CENTER);

    statusBar = new StatusBar();
    mainContainer.add(statusBar, BorderLayout.PAGE_END);

    pack();
    setVisible(true);
}

From source file:com.lynk.gdx.tool.particleeditor.ParticleEditor.java

License:Apache License

public ParticleEditor() {
    super("Particle Editor");

    lwjglCanvas = new LwjglCanvas(new Renderer());
    addWindowListener(new WindowAdapter() {
        public void windowClosed(WindowEvent event) {
            System.exit(0);//from  w w w  . ja  v  a 2 s.  com
            // Gdx.app.quit();
        }
    });

    initializeComponents();

    setSize(1000, 950);
    setLocationRelativeTo(null);
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    setVisible(true);
}