Android Open Source - smartcar Joystick G U I






From Project

Back to project page smartcar.

License

The source code is released under:

GNU General Public License

If you think the Android project smartcar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**/*  ww w .  j a  va 2s.  co m*/
 * The JFrame containing the joystick. More components can be added through here.
 * @author Team Pegasus (dimi)
 *
 */
@SuppressWarnings("serial")
public class JoystickGUI extends JFrame {
  public JoystickGUI(ClientOutput userOutput){
    
    setTitle("SmartCar Joystick");
    setSize(480,500);
    setLocationRelativeTo(null);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
    
    JPanel totalWrapper = new JPanel();
    getContentPane().add(totalWrapper, BorderLayout.CENTER);
    totalWrapper.setLayout(new BorderLayout(0, 0));

    JPanel centralPanel = new JPanel();
    totalWrapper.add(centralPanel, BorderLayout.CENTER);
    centralPanel.setLayout(new BorderLayout(0, 0));
    
    DrawingCanvas mainCanvas = new DrawingCanvas(getContentPane().getSize(), userOutput);
    totalWrapper.add(mainCanvas);
    mainCanvas.setLayout(new BorderLayout(0, 0));
    validate(); //otherwise the window sometimes doesn't appear
  }
}




Java Source Code List

.ClientOutput.java
.DrawingCanvas.java
.JoystickGUI.java
.JoystickMain.java
piSockets.SerialOutput.java
piSockets.SocketReceive.java
piSockets.SocketsMain.java
se.chalmers.balmung.smartcar.JoystickView.java
se.chalmers.balmung.smartcar.MainActivity.java
se.chalmers.balmung.smartcar.SettingsActivity.java