Examples of SGMouseListener


Examples of squidpony.squidgrid.gui.SGMouseListener

        outputPanel.put(outputPanel.gridWidth() - 1, outputPanel.gridHeight() - 1, downChar, SColor.DARK_BLUE_DYE);
        for (int y = 1; y < outputPanel.gridHeight() - 1; y++) {//fill in vertical line between scroll arrowheads
            outputPanel.put(outputPanel.gridWidth() - 1, y, SColor.SILVER);
        }
        updateOutput();
        outputPanel.addMouseListener(new SGMouseListener(outputPanel.cellWidth(), outputPanel.cellHeight(), new OutputMouseListener()));

        frame.add(outputPanel, BorderLayout.SOUTH);

        keyListener = initKeyListener();
        frame.addKeyListener(keyListener);
View Full Code Here

Examples of squidpony.squidgrid.gui.SGMouseListener

        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.repaint();

        DemoInputListener dil = new DemoInputListener();
        MouseInputListener mil = new SGMouseListener(cellWidth, cellHeight, dil);
        display.addMouseListener(mil);//listens for clicks and releases
        display.addMouseMotionListener(mil);//listens for movement based events
        frame.addKeyListener(dil);
    }
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.