Commit 66cb1322 authored by angermue's avatar angermue
Browse files

The revision includes several smaller changes:

- PostProcessorPanel: new title "Dozentenvideo" for camCheckBox
- PostProcessorPanel: camCheckBox is only enabled if there is a pjpg file
- PostProcessorPanel: is resizeable now so that buttons are accessible when using a lower screen resolution
- TTT.addInternalFrameCenter: correct centering of frames
- usage of the ttt icon
 

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@40 0463f305-d864-43cb-8a47-61cf597d4139
parent 3083cfe8
......@@ -93,7 +93,7 @@
<Component id="resolutionField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="titleField" alignment="0" min="-2" pref="433" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="112" max="32767" attributes="0"/>
<EmptySpace pref="177" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
......@@ -257,25 +257,21 @@
<Component id="mp4CheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="camCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="ocrStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="thumbnailsStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="htmlStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="pdfStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="thumbnailsStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="htmlStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="mp3StatusField" min="-2" max="-2" attributes="0"/>
<Component id="flashStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="mp4StatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="camStatusField" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="435" max="32767" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="createHelpButton" linkSize="4" min="-2" max="-2" attributes="1"/>
<Component id="createButton" linkSize="4" alignment="1" min="-2" max="-2" attributes="1"/>
</Group>
</Group>
<Component id="ocrStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="mp3StatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="flashStatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="mp4StatusField" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="camStatusField" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="405" max="32767" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="createHelpButton" linkSize="4" min="-2" max="-2" attributes="1"/>
<Component id="createButton" linkSize="4" alignment="1" min="-2" max="-2" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
......@@ -330,7 +326,7 @@
<Component id="camCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="camStatusField" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="22" max="32767" attributes="0"/>
<EmptySpace pref="24" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
......@@ -352,7 +348,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="htmlCheckBox">
......@@ -364,7 +359,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="pdfCheckBox">
......@@ -376,7 +370,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="ocrCheckBox">
......@@ -388,7 +381,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="flashCheckBox">
......@@ -400,7 +392,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="createButton">
......@@ -459,7 +450,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="mp3StatusField">
......@@ -476,7 +466,6 @@
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="mp4StatusField">
......@@ -487,13 +476,12 @@
<Component class="javax.swing.JCheckBox" name="camCheckBox">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Cam"/>
<Property name="text" type="java.lang.String" value="Dozentenvideo"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="camStatusField">
......@@ -532,7 +520,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="openSearchbaseFileDialogButton" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="117" max="32767" attributes="0"/>
<EmptySpace pref="150" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="importSearchbaseButton" linkSize="5" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="searchHelpButton" linkSize="5" alignment="1" min="-2" max="-2" attributes="0"/>
......@@ -668,12 +656,12 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="userField" linkSize="6" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="295" max="32767" attributes="0"/>
<EmptySpace pref="322" max="32767" attributes="0"/>
<Component id="publishHelpButton" linkSize="7" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="pathField" linkSize="6" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="295" max="32767" attributes="0"/>
<EmptySpace pref="322" max="32767" attributes="0"/>
<Component id="publishButton" linkSize="7" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="serverField" linkSize="6" alignment="0" min="-2" pref="238" max="-2" attributes="0"/>
......
......@@ -77,7 +77,7 @@ public class PostProcessorPanel extends GradientPanel {
// create GUI
initComponents();
// set previously used fields
userField.setText(TTT.userPrefs.get("publish_user", "<enter user name>"));
serverField.setText(TTT.userPrefs.get("publish_server", "ttt.in.tum.de"));
......@@ -147,10 +147,15 @@ public class PostProcessorPanel extends GradientPanel {
mp4CheckBox.setSelected(false);
mp4CheckBox.setEnabled(false);
}
camCheckBox.setToolTipText("generating a CamVid file");
camCheckBox.setSelected(true);
if (recording.getExistingFileBySuffix("bjpg").exists()) {
camCheckBox.setToolTipText("generating a CamVid file");
} else {
camCheckBox.setToolTipText("bjpg file not found");
camCheckBox.setSelected(false);
camCheckBox.setEnabled(false);
}
createButton.setToolTipText("generate the selected components");
searchFilenameField.setToolTipText("specify searchbase file (XML or ASCII)");
openSearchbaseFileDialogButton.setToolTipText("open file dialog");
importSearchbaseButton
......@@ -556,7 +561,7 @@ public class PostProcessorPanel extends GradientPanel {
.add(dateField)
.add(resolutionField)
.add(titleField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 433, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(112, Short.MAX_VALUE))
.addContainerGap(177, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
......@@ -606,27 +611,22 @@ public class PostProcessorPanel extends GradientPanel {
thumbnailsCheckBox.setSelected(true);
thumbnailsCheckBox.setText("Thumbnails");
thumbnailsCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
thumbnailsCheckBox.setOpaque(false);
htmlCheckBox.setSelected(true);
htmlCheckBox.setText("HTML script");
htmlCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
htmlCheckBox.setOpaque(false);
pdfCheckBox.setSelected(true);
pdfCheckBox.setText("PDF script");
pdfCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
pdfCheckBox.setOpaque(false);
ocrCheckBox.setSelected(true);
ocrCheckBox.setText("OCR input");
ocrCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
ocrCheckBox.setOpaque(false);
flashCheckBox.setSelected(true);
flashCheckBox.setText("Flash/SWF");
flashCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
flashCheckBox.setOpaque(false);
createButton.setText("Create");
createButton.setMargin(new java.awt.Insets(0, 8, 0, 8));
......@@ -657,21 +657,18 @@ public class PostProcessorPanel extends GradientPanel {
mp3CheckBox.setSelected(true);
mp3CheckBox.setText("MP3 audio");
mp3CheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
mp3CheckBox.setOpaque(false);
mp3StatusField.setText("not found");
mp4CheckBox.setSelected(true);
mp4CheckBox.setText("MP4 podcast");
mp4CheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
mp4CheckBox.setOpaque(false);
mp4StatusField.setText("not found");
camCheckBox.setSelected(true);
camCheckBox.setText("Cam");
camCheckBox.setText("Dozentenvideo");
camCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
camCheckBox.setOpaque(false);
camStatusField.setBackground(new java.awt.Color(100, 208, 200));
camStatusField.setText("not found");
......@@ -691,22 +688,20 @@ public class PostProcessorPanel extends GradientPanel {
.add(flashCheckBox)
.add(mp4CheckBox)
.add(camCheckBox))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(28, 28, 28)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(ocrStatusField)
.add(thumbnailsStatusField)
.add(htmlStatusField)
.add(pdfStatusField)
.add(jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(thumbnailsStatusField)
.add(htmlStatusField)
.add(mp3StatusField)
.add(flashStatusField)
.add(mp4StatusField)
.add(camStatusField))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 435, Short.MAX_VALUE)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(createHelpButton)
.add(createButton))))
.add(ocrStatusField)
.add(mp3StatusField)
.add(flashStatusField)
.add(mp4StatusField)
.add(camStatusField))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 405, Short.MAX_VALUE)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(createHelpButton)
.add(createButton))
.addContainerGap())
);
......@@ -751,7 +746,7 @@ public class PostProcessorPanel extends GradientPanel {
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(camCheckBox)
.add(camStatusField))
.addContainerGap(22, Short.MAX_VALUE))
.addContainerGap(24, Short.MAX_VALUE))
.add(jPanel2Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(createButton)
......@@ -816,7 +811,7 @@ public class PostProcessorPanel extends GradientPanel {
.add(searchStatusField))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(openSearchbaseFileDialogButton)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 117, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 150, Short.MAX_VALUE)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, importSearchbaseButton)
.add(org.jdesktop.layout.GroupLayout.TRAILING, searchHelpButton))
......@@ -899,11 +894,11 @@ public class PostProcessorPanel extends GradientPanel {
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(userField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 295, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 322, Short.MAX_VALUE)
.add(publishHelpButton))
.add(jPanel4Layout.createSequentialGroup()
.add(pathField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 295, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 322, Short.MAX_VALUE)
.add(publishButton))
.add(serverField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 238, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
......@@ -1011,6 +1006,7 @@ public class PostProcessorPanel extends GradientPanel {
ctrlSatus.put(flashCheckBox, flashCheckBox.isEnabled());
ctrlSatus.put(mp3CheckBox, mp3CheckBox.isEnabled());
ctrlSatus.put(mp4CheckBox, mp4CheckBox.isEnabled());
ctrlSatus.put(camCheckBox, camCheckBox.isEnabled());
ctrlSatus.put(userField, userField.isEnabled());
ctrlSatus.put(serverField, serverField.isEnabled());
ctrlSatus.put(pathField, pathField.isEnabled());
......@@ -1018,26 +1014,26 @@ public class PostProcessorPanel extends GradientPanel {
}
super.setEnabled(enabled);
titleField.setEnabled(enabled);
thumbnailsCheckBox.setEnabled(enabled && ctrlSatus.get(thumbnailsCheckBox)); //---
thumbnailsCheckBox.setEnabled(enabled && ctrlSatus.get(thumbnailsCheckBox));
htmlCheckBox.setEnabled(enabled);
pdfCheckBox.setEnabled(enabled && ctrlSatus.get(pdfCheckBox)); //---
pdfCheckBox.setEnabled(enabled && ctrlSatus.get(pdfCheckBox));
ocrCheckBox.setEnabled(enabled);
flashCheckBox.setEnabled(enabled && ctrlSatus.get(flashCheckBox)); //---
camCheckBox.setEnabled(enabled);
mp3CheckBox.setEnabled(enabled && ctrlSatus.get(mp3CheckBox)); //---
mp4CheckBox.setEnabled(enabled && ctrlSatus.get(mp4CheckBox)); //---
flashCheckBox.setEnabled(enabled && ctrlSatus.get(flashCheckBox));
mp3CheckBox.setEnabled(enabled && ctrlSatus.get(mp3CheckBox));
mp4CheckBox.setEnabled(enabled && ctrlSatus.get(mp4CheckBox));
camCheckBox.setEnabled(enabled && ctrlSatus.get(camCheckBox));
createHelpButton.setEnabled(enabled);
createButton.setEnabled(enabled);
searchFilenameField.setEnabled(enabled);
openSearchbaseFileDialogButton.setEnabled(enabled);
searchHelpButton.setEnabled(enabled);
importSearchbaseButton.setEnabled(enabled);
userField.setEnabled(enabled && ctrlSatus.get(userField)); //---
serverField.setEnabled(enabled && ctrlSatus.get(serverField)); //---
pathField.setEnabled(enabled && ctrlSatus.get(pathField)); //---
userField.setEnabled(enabled && ctrlSatus.get(userField));
serverField.setEnabled(enabled && ctrlSatus.get(serverField));
pathField.setEnabled(enabled && ctrlSatus.get(pathField));
publishHelpButton.setEnabled(enabled);
publishButton.setEnabled(enabled && ctrlSatus.get(publishButton)); //---
publishButton.setEnabled(enabled && ctrlSatus.get(publishButton));
doneButton.setEnabled(enabled);
}
......
......@@ -46,6 +46,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.beans.PropertyVetoException;
import java.io.File;
import java.io.IOException;
......@@ -498,8 +499,8 @@ public class TTT extends JFrame {
// internal frame
frame.setContentPane(new PostProcessorPanel(recording));
frame.pack();
frame.setVisible(true);
frame.setResizable(true);
// post processing
TTT ttt = getInstance();
ttt.showTTT();
......@@ -1039,7 +1040,7 @@ public class TTT extends JFrame {
setSize(width, height);
setExtendedState(MAXIMIZED_BOTH);
setIconImage(Toolkit.getDefaultToolkit().getImage(ttt.getClass().getResource("resources/ttt16.png")));
setVisible(true);
getContentPane().setBackground(Color.WHITE);
showMemoryMonitor(false);
......@@ -1091,9 +1092,12 @@ public class TTT extends JFrame {
private int position;
void addInternalFrameCentered(JInternalFrame frame) {
frame.pack();
frame.pack();
frame.setFrameIcon(new ImageIcon(getClass().getResource("resources/ttt16.png")));
frame.setVisible(true);
Rectangle rect = TTT.getInstance().getBounds();
Rectangle rect = TTT.getInstance().desktop.getBounds();
TTT.getInstance().addInternalFrame(frame, rect.width / 2 - frame.getWidth() / 2,
rect.height / 2 - frame.getHeight() / 2, 10);
// TODO: think about layering
......@@ -1118,7 +1122,7 @@ public class TTT extends JFrame {
height = ttt.desktop.getHeight() - y;
if (width != internalFrame.getWidth() || height != internalFrame.getHeight())
internalFrame.setSize(width, height);
internalFrame.setFrameIcon(new ImageIcon(getClass().getResource("resources/ttt16.png")));
ttt.desktop.add(internalFrame);
try {
internalFrame.setSelected(true);
......
Supports Markdown
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