Commit 4f58caed authored by petter's avatar petter

Moved Toolbar to the right to be consistent with the mobile App

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@173 0463f305-d864-43cb-8a47-61cf597d4139
parent d43cd06f
......@@ -25,6 +25,7 @@
package ttt;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.Closeable;
......@@ -36,6 +37,7 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.zip.DeflaterOutputStream;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.JButton;
......@@ -44,6 +46,7 @@ import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import ttt.audio.AudioRecorder;
import ttt.gui.GradientPanel;
......@@ -236,8 +239,8 @@ public class Recorder implements MessageConsumer, Closeable {
stopButton.addActionListener(actionListener);
playButton.addActionListener(actionListener);
controlPanel = new GradientPanel();
controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.X_AXIS));
controlPanel = new GradientPanel(SwingConstants.VERTICAL);
controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.Y_AXIS));
JComponent volumeLevelComponent;
if (audioVideoRecorder != null) {
......@@ -252,7 +255,7 @@ public class Recorder implements MessageConsumer, Closeable {
}
controlPanel.add(Box.createRigidArea(new Dimension(0, 10)));
controlPanel.add(recordButton);
controlPanel.add(stopButton);
controlPanel.add(playButton);
......
......@@ -105,7 +105,7 @@ import ttt.record.LectureProfileDialog;
import ttt.record.Recording;
public class TTT extends JFrame {
static final String version = "31.07.2014";
static final String version = "19.09.2014";
public static boolean debug = !true;
public static boolean verbose = true;
......
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universit�t M�nchen
//
// This file is part of TeleTeachingTool.
//
......@@ -34,10 +34,13 @@ import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EtchedBorder;
import ttt.gui.GradientPanel;
public class AudioMonitorPanel extends JPanel {
public class AudioMonitorPanel extends GradientPanel {
public static void main(String[] args) throws Exception {
JFrame frame = new JFrame("Audio Volume Meter");
......@@ -50,6 +53,7 @@ public class AudioMonitorPanel extends JPanel {
private JSAAudioRecorder wavAudioRecorder;
public AudioMonitorPanel(boolean active) throws Exception {
super(SwingConstants.VERTICAL);
setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
if (active) {
......
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universit�t M�nchen
//
// This file is part of TeleTeachingTool.
//
......@@ -53,19 +53,30 @@ public class GradientPanel extends JPanel {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
if (vertical) {
if (vertical)
//{
// A non-cyclic gradient
double change = 0.65;
Color startColor = new Color(221, 232, 243);
Color endColor = new Color(184, 207, 229);
// double change = 0.65;
// Color startColor = new Color(221, 232, 243);
// Color endColor = new Color(184, 207, 229);
{
// A non-cyclic gradient
double change = 0.35;
double change2 = 0.35;
Color startColor = new Color(221, 232, 243);
Color endColor = new Color(221, 232, 243);
GradientPaint gradient = new GradientPaint(0, 0, startColor, 0, (int) (change * getHeight()), Color.white);
g2d.setPaint(gradient);
g2d.fillRect(0, 0, getWidth(), (int) (change * getHeight()));
gradient = new GradientPaint(0, (int) (change * getHeight()), Color.white, 0, getHeight(), endColor);
g2d.setPaint(Color.WHITE);
g2d.fillRect(0, (int) (change * getHeight()), getWidth(), (int) (change2 * getHeight()));
gradient = new GradientPaint(0, (int) (change2 * getHeight()), Color.white, 0, getHeight(), endColor);
g2d.setPaint(gradient);
g2d.fillRect(0, (int) (change * getHeight()), getWidth(), getHeight());
g2d.fillRect(0, (int) (change2 * getHeight()), getWidth(), getHeight());
} else {
// A non-cyclic gradient
......
......@@ -31,18 +31,17 @@ import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;
import ttt.Constants;
import ttt.gui.GradientPanel;
......@@ -71,6 +70,7 @@ public class PaintControls extends GradientPanel {
private PaintListener paintListener;
public PaintControls(PaintListener paintListener) {
super(SwingConstants.VERTICAL);
this.paintListener = paintListener;
paintListener.setPaintControls(this);
......@@ -251,16 +251,16 @@ public class PaintControls extends GradientPanel {
whiteboardNext.setToolTipText("next whiteboard page");
whiteboardNext.setFocusable(false);
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(Box.createRigidArea(new Dimension(20, 0)));
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
add(Box.createRigidArea(new Dimension(0, 10)));
add(activateButton);
add(Box.createRigidArea(new Dimension(20, 0)));
add(Box.createRigidArea(new Dimension(0, 10)));
add(colorButtons[0]);
add(colorButtons[1]);
add(colorButtons[2]);
add(colorButtons[3]);
add(colorButtons[4]);
add(Box.createRigidArea(new Dimension(20, 0)));
add(Box.createRigidArea(new Dimension(0, 10)));
add(mouseButton);
add(textButton);
add(freeButton);
......@@ -268,9 +268,9 @@ public class PaintControls extends GradientPanel {
add(lineButton);
add(rectangleButton);
add(deleteButton);
add(Box.createRigidArea(new Dimension(20, 0)));
add(Box.createRigidArea(new Dimension(0, 10)));
add(deleteAllButton);
add(Box.createRigidArea(new Dimension(80, 0)));
add(Box.createRigidArea(new Dimension(0, 10)));
add(whiteboardPrevious);
add(whiteboardEnable);
......
......@@ -93,7 +93,7 @@ public class Player extends JInternalFrame {
public static void main(String[] args){
try {
JFrame jay = new JFrame("Player");
Player play = new Player("/home/ludwig/testLecture/Theoretische_Informatik_2010_05_03.ttt");
Player play = new Player("/home/petter/ttt/testrecordings/Diskrete_Strukturen_2013_10_29.ttt");
jay.add(play);
// jay.setSize(300,300);
jay.pack();
......@@ -496,13 +496,13 @@ public class Player extends JInternalFrame {
}
JPanel panel = new GradientPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.setBorder(BorderFactory.createEmptyBorder());
// Paint Controls
panel.add(new PaintControls(listener));
panel.add(Box.createHorizontalGlue());
//panel.add(Box.createVerticalGlue());
if (recorder != null) {
// Recorder Controls
......@@ -512,17 +512,17 @@ public class Player extends JInternalFrame {
else{
panel.add(recorder.getVideoControls());
}
panel.add(Box.createHorizontalGlue());
panel.add(Box.createVerticalGlue());
}
// Fullscreen Controls
panel.add(getFullscreenButton());
panel.add(Box.createRigidArea(new Dimension(20, 0)));
panel.add(Box.createRigidArea(new Dimension(0, 10)));
panel.add(getReconnectButton(connection));
panel.add(Box.createRigidArea(new Dimension(20, 0)));
panel.add(Box.createRigidArea(new Dimension(0, 10)));
pane.add(panel, BorderLayout.NORTH);
pane.add(panel, BorderLayout.EAST);
panel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
pack();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment