Blame view

VRGNYMusicLights/Sources/PlayJPanel.java 938 Bytes
278cdee0   pfrison   VRGNYMusicLights ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  import java.awt.BorderLayout;
  import java.awt.Font;
  
  import javax.swing.Box;
  import javax.swing.BoxLayout;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  
  public class PlayJPanel extends JPanel {
  	private static final long serialVersionUID = 1L;
  	private static final Font titleFont = new Font(new JLabel().getFont().getName(), Font.BOLD, 14);
  	
  	public PlayJPanel(Interface interf, LightCanvasJPanel lightCanvas) {
  		super(new BorderLayout());
  		
  		// title
  		JLabel title = new JLabel("Visualizer :");
  		title.setFont(titleFont);
  		add(title, BorderLayout.NORTH);
  		
  		// lights
  		JPanel centerPanel = new JPanel();
  		centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.LINE_AXIS));
  		centerPanel.add(Box.createHorizontalGlue());
  		centerPanel.add(lightCanvas);
  		add(centerPanel, BorderLayout.CENTER);
  		
  		// controls
  		interf.animPlayer = new AnimationPlayer(interf);
  		add(interf.animPlayer, BorderLayout.SOUTH);
  	}
  }