17 Commits

Author SHA1 Message Date
88277865f1 Update 'README.md' 2019-03-16 12:26:53 +01:00
9f15ff25a7 Update 'README.md' 2018-12-06 12:04:03 +01:00
344bd29850 Update README.md 2018-01-23 10:26:11 +01:00
5f0186c12d Update README.md 2017-09-17 21:54:57 +02:00
5ba1f8ebb3 updated desciption 2017-04-15 00:45:08 +02:00
d0853d3a88 Update README.md 2017-02-07 20:17:03 +01:00
a8143e402b Update README.md 2017-01-08 23:59:36 +01:00
e6ccd3eb6b new year ... 2017-01-08 23:59:03 +01:00
bf01e4e62e Merge pull request #2 from Seil0/Bergerboard_calvin
Added Menubar
2016-11-21 21:26:24 +01:00
a7f29125f1 Added Menubar
-added menubar
2016-11-21 21:25:16 +01:00
bf1094ffd5 Merge pull request #1 from Seil0/Bergerboard_calvin
FileOpenDialog added
2016-11-21 16:07:38 +01:00
0dceecec47 FileOpenDialog added
-FileOpenDialog
-minor text fixes
2016-11-21 15:35:19 +01:00
620d3c9277 nothing important 2016-10-25 17:46:10 +02:00
34aafcfb0a initial release 2016-08-13 14:53:19 +02:00
3670335f6a test 2016-08-13 14:52:43 +02:00
8313df06b7 test 2016-08-13 14:51:39 +02:00
6b87240041 Update README.md 2016-08-13 14:48:13 +02:00
16 changed files with 120 additions and 7 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.mp3
config.xml

View File

@ -1,5 +1,5 @@
# BergerBoard
Latest changes and newest Features will be posted here.This version is not ready for use, compiling necessary.
Latest changes and newest Features will be posted here.This version is not ready for use, compiling necessary.
Bergerboard Software © 2016 Software Development Kellerkinder (SDK) www.kellerkinder.xyz
Bergerboard Software © 2016-2018 mosad www.mosad.xyz

17
bin/.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
/GUI$1.class
/GUI$10.class
/GUI$2.class
/GUI$3.class
/GUI$4.class
/GUI$5.class
/GUI$6.class
/GUI$7.class
/GUI$8.class
/GUI$9.class
/GUI$SoundJLayer.class
/GUI.class
/Main.class
/SoundJLayer.class
/jaggob$1.class
/jaggob$2.class
/jaggob.class

Binary file not shown.

BIN
bin/GUI$10.class Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/GUI$9.class Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -39,13 +39,18 @@ import java.util.ArrayList;
import java.util.Properties;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import javazoom.jl.player.advanced.AdvancedPlayer;
import javazoom.jl.player.advanced.PlaybackEvent;
@ -60,6 +65,18 @@ public class GUI extends JFrame {
private int anzahlBtn = 0;
private int zY = 0; // z<>hler f<>r posX
//stuff Calvin////////////////////////////////////////////////
//Init
private JButton btn_browse;
private JMenuBar menubar;
private JMenu file;
private JMenuItem exit;
//////////////////////////////////////////////////////////////
ArrayList<JButton> myButton = new ArrayList<JButton>();
ArrayList<String> eventPath = new ArrayList<String>();
@ -94,7 +111,7 @@ public class GUI extends JFrame {
*/
public GUI() {
setBackground(Color.DARK_GRAY);
setTitle("Sir Berger Board V0.3.5 alpha Kevin Edition");
setTitle("Sir Berger Board V0.3.6 beta Calvin Edition");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 1126, 702);
contentPane = new JPanel();
@ -108,7 +125,7 @@ public class GUI extends JFrame {
label.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
JOptionPane.showMessageDialog(null,"Sir Berger Board v0.3.5 \n Changelog: \n -automatisches speichern und laden \n der Buttons implementiert \n <20> 2016 Kellerkinder \n <20> 2016 Jaggob Edition by Seilo \n www.kellerkinder.xyz","<EFBFBD>ber",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null,"Sir Berger Board v0.3.6 \n Changelog: \n -Added Menubar\n -Added File-Open-Dialog\n <20> 2016-2017 Kellerkinder \n <20> 2016-2017 Jaggob Edition by Seilo \n www.kellerkinder.xyz","<EFBFBD>ber",JOptionPane.INFORMATION_MESSAGE);
}
});
label.setForeground(Color.WHITE);
@ -153,11 +170,60 @@ public class GUI extends JFrame {
btnNewButton.setBounds(851, 76, 249, 23);
contentPane.add(btnNewButton);
//breite verkleinert
textField = new JTextField();
textField.setBounds(851, 14, 249, 20);
textField.setBounds(851, 14, 210, 20);
contentPane.add(textField);
textField.setColumns(10);
//Men<65>bar einrichten
menubar = new JMenuBar();
file = new JMenu("File...");
exit = new JMenuItem("Exit");
exit.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
file.add(exit);
menubar.add(file);
setJMenuBar(menubar);
//browse Button hinzuf<75>gen
btn_browse = new JButton("...");
btn_browse.setBounds(1065, 14, 20, 20);
btn_browse.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
//erstelle <20>ffnen-Dialog
JFileChooser fileChooser = new JFileChooser();
//erstelle Filter f<>r "Mp3" und "WAV"
fileChooser.setFileFilter(new FileNameExtensionFilter("mp3", "mp3"));
fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("wav", "wav"));
//Nur einzelne Dateien sollen ausw<73>hlbar sein
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
//<2F>ffnen Dialog anzeigen
fileChooser.showOpenDialog(null);
//Pfad der ausgew<65>hlten Datei in Textfeld kopieren
String path = fileChooser.getSelectedFile().getAbsolutePath();
textField.setText(path);
}
});
contentPane.add(btn_browse);
JLabel lblNewLabel = new JLabel("Dateiname");
lblNewLabel.setForeground(Color.WHITE);
lblNewLabel.setFont(new Font("Arial", Font.PLAIN, 14));
@ -176,6 +242,7 @@ public class GUI extends JFrame {
textField_1.setColumns(10);
JButton btnSave = new JButton("save");
btnSave.setEnabled(false);
btnSave.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
speichern();
@ -185,6 +252,7 @@ public class GUI extends JFrame {
contentPane.add(btnSave);
JButton btnLoad = new JButton("load");
btnLoad.setEnabled(false);
btnLoad.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
laden();
@ -204,7 +272,7 @@ public class GUI extends JFrame {
JButton button = new JButton();
myButton.add(button);
button.setText(setName()); //setzte den Button Text auf Wert von setName()
contentPane.add(button); //f<>gt Butoon zur cPane hinzu
contentPane.add(button); //f<>gt Button zur cPane hinzu
button.setFont(new Font("Arial", Font.PLAIN, 18)); //Schriftart und Gr<47><72>e
button.setBounds(getPosX(), getPosY(), 200, 50); //position (x, y(j+160), width, height)
button.setVisible(true);
@ -336,10 +404,34 @@ public class GUI extends JFrame {
public SoundJLayer(String filePath)
{
this.filePath = filePath;
}
}
public void play()
{
//versuche von Pfad zu laden (unsauber, funktioniert aber)
try{
String urlAsString = null;
File temp = new File(filePath);
urlAsString = "file:///"+temp.getAbsolutePath();
//urlAsString.replaceAll(" ", "%20");
System.out.println(urlAsString);
this.player = new AdvancedPlayer(
new java.net.URL(urlAsString).openStream(),
javazoom.jl.player.FactoryRegistry.systemRegistry().createAudioDevice()
);
this.player.setPlayBackListener(this);
this.playerThread = new Thread(this, "AudioPlayerThread");
this.playerThread.start();
}catch(Exception e){
//Debug Nachricht, falls lesen aus Pfad nicht funktioniert
System.out.println("Failed to load from path: checking home directory.");
try
{
String urlAsString =
@ -363,6 +455,8 @@ public class GUI extends JFrame {
{
ex.printStackTrace();
}
}
}
// PlaybackListener members