Author: remi
Date: 2008-08-15 15:25:53 +0200 (Fri, 15 Aug 2008)
New Revision: 1503
Added:
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages_fr.properties
Modified:
software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java
software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages.properties
Log:
* added "hide / show" block properties button. And the main panel to
configuring / testing and validating the blocks.
Modified:
software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java
===================================================================
---
software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java
2008-08-15 13:23:17 UTC (rev 1502)
+++
software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java
2008-08-15 13:25:53 UTC (rev 1503)
@@ -24,7 +24,7 @@
public AttituneStatusBar(String lab1, String lab2, String lab3)
{
GridLayout pl = new GridLayout(0, 3);
- pl.setHgap(3);
+ pl.setHgap(1);
setLayout(pl);
label1 = new JLabel(lab1, JLabel.CENTER);
Modified:
software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java
===================================================================
--- software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java
2008-08-15 13:23:17 UTC (rev 1502)
+++ software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java
2008-08-15 13:25:53 UTC (rev 1503)
@@ -5,11 +5,13 @@
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
import java.awt.*;
import java.util.Hashtable;
import java.util.List;
import javax.swing.*;
+import javax.swing.border.BevelBorder;
import com.tuxisalive.attitunes.*;
import com.tuxisalive.attitunes.format.*;
@@ -31,6 +33,10 @@
{
private static final long serialVersionUID = 724080299924475945L;
+ private static final int WINDOW_WIDTH = 644;
+ private static final int WINDOW_HEIGHT_WBP = 380;
+ private static final int WINDOW_HEIGHT_BP = 583;
+
private GridBagLayout frameLayout;
private AttituneMenuBar menuBar;
@@ -48,7 +54,18 @@
private ATTSButton pastButton;
private ATTSButton playButton;
private ATTSButton stopButton;
+ private JButton jButtonShowHideBlockProperties;
+ private JPanel jPanelBlProperties;
+ private JButton jButtonValidateBlock;
+ private JButton jButtonTestBlock;
+ private JComboBox jComboBoxCmdName;
+ private JLabel jLabelCmdName;
+ private JPanel jPanelBlockAction;
+ private JPanel jPanelCmdName;
+ private JPanel jPanelBlocConf;
+ private JPanel jPanelBlockHead;
+
private JFileChooser fileChooser;
private boolean confirmExit = false;
@@ -71,6 +88,8 @@
initGUI();
this.setIconImage(new
ImageIcon(getClass().getResource("/icone.png")).getImage());
this.setTitle(ATTMessages.getString("MainFrame.1"));
//$NON-NLS-1$
+ this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT_WBP);
+ this.setResizable(false);
}
/*
@@ -99,8 +118,8 @@
/* Add a layout to the frame */
frameLayout = new GridBagLayout();
frameLayout.columnWidths = new int[] {7};
- frameLayout.rowWeights = new double[] {0.1, 0.1, 0.1};
- frameLayout.rowHeights = new int[] {7, 7, 7};
+ frameLayout.rowWeights = new double[] {0.1, 0.1, 0.1,
0.1, 0.1};
+ frameLayout.rowHeights = new int[] {262, 25, 18, 0, 18};
frameLayout.columnWeights = new double[] {0.1};
setLayout(frameLayout);
@@ -250,23 +269,120 @@
});
jPanelBlock.add(zoomFullButton, new
GridBagConstraints(8, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
+ /* Show hide block configuration button */
+ jButtonShowHideBlockProperties = new
JButton(ATTMessages.getString("MainFrame.99"));
+ jButtonShowHideBlockProperties.setSize(new
java.awt.Dimension(640, 18));
+ jButtonShowHideBlockProperties.setPreferredSize(new
java.awt.Dimension(640, 18));
+ jButtonShowHideBlockProperties.setMinimumSize(new
java.awt.Dimension(640, 18));
+ jButtonShowHideBlockProperties.setMaximumSize(new
java.awt.Dimension(640, 18));
+ jButtonShowHideBlockProperties.addMouseListener(new
MouseAdapter() {
+ public void mousePressed(MouseEvent evt)
+ {
+
jButtonShowHideBlockPropertiesMouseClicked(evt);
+ }
+ });
+ this.add(jButtonShowHideBlockProperties, new
GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ /* Block properties */
+ jPanelBlProperties = new JPanel();
+ this.add(jPanelBlProperties, new GridBagConstraints(0,
3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new
Insets(0, 0, 0, 0), 0, 0));
+ jPanelBlProperties.setSize(new java.awt.Dimension(640,
200));
+ jPanelBlProperties.setPreferredSize(new
java.awt.Dimension(640, 200));
+ jPanelBlProperties.setMinimumSize(new
java.awt.Dimension(640, 200));
+ jPanelBlProperties.setMaximumSize(new
java.awt.Dimension(640, 200));
+ jPanelBlProperties.setVisible(false);
+ GridBagLayout panelBlPropertiesLayout = new
GridBagLayout();
+ panelBlPropertiesLayout.rowWeights = new double[] {0.1,
0.1};
+ panelBlPropertiesLayout.rowHeights = new int[] {25,
168};
+ panelBlPropertiesLayout.columnWeights = new double[]
{0.1};
+ panelBlPropertiesLayout.columnWidths = new int[] {7};
+ jPanelBlProperties.setLayout(panelBlPropertiesLayout);
+
+ {
+ jPanelBlockHead = new JPanel();
+
jPanelBlockHead.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+ jPanelBlProperties.add(jPanelBlockHead, new
GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ jPanelBlockHead.setSize(new
java.awt.Dimension(631, 25));
+ jPanelBlockHead.setMaximumSize(new
java.awt.Dimension(631, 25));
+ jPanelBlockHead.setMinimumSize(new
java.awt.Dimension(631, 25));
+ jPanelBlockHead.setPreferredSize(new
java.awt.Dimension(631, 25));
+ GridBagLayout jPanelBlockHeadLayout = new
GridBagLayout();
+ jPanelBlockHeadLayout.rowWeights = new double[]
{0.1};
+ jPanelBlockHeadLayout.rowHeights = new int[]
{7};
+ jPanelBlockHeadLayout.columnWeights = new
double[] {0.1, 0.1};
+ jPanelBlockHeadLayout.columnWidths = new int[]
{7, 7};
+
jPanelBlockHead.setLayout(jPanelBlockHeadLayout);
+ {
+ jPanelCmdName = new JPanel();
+ GridBagLayout jPanelCmdNameLayout = new
GridBagLayout();
+ jPanelBlockHead.add(jPanelCmdName, new
GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ jPanelCmdNameLayout.rowWeights = new
double[] {0.1};
+ jPanelCmdNameLayout.rowHeights = new
int[] {7};
+ jPanelCmdNameLayout.columnWeights = new
double[] {0.0, 0.0, 0.0, 0.1, 0.0};
+ jPanelCmdNameLayout.columnWidths = new
int[] {7, 98, 7, 7, 7};
+
jPanelCmdName.setLayout(jPanelCmdNameLayout);
+ {
+ jLabelCmdName = new JLabel();
+
jPanelCmdName.add(jLabelCmdName, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0,
0), 0, 0));
+
jLabelCmdName.setText(ATTMessages.getString("MainFrame.100"));
+ }
+ {
+ ComboBoxModel
jComboBoxCmdNameModel =
+ new
DefaultComboBoxModel(
+ new
String[] { });
+ jComboBoxCmdName = new
JComboBox();
+
jPanelCmdName.add(jComboBoxCmdName, new GridBagConstraints(3, 0, 1, 1, 0.0,
0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0,
0, 0), 0, 0));
+
jComboBoxCmdName.setModel(jComboBoxCmdNameModel);
+ }
+ }
+ {
+ jPanelBlockAction = new JPanel();
+ GridBagLayout jPanelBlockActionLayout =
new GridBagLayout();
+ jPanelBlockHead.add(jPanelBlockAction,
new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ jPanelBlockActionLayout.rowWeights =
new double[] {0.1};
+ jPanelBlockActionLayout.rowHeights =
new int[] {7};
+ jPanelBlockActionLayout.columnWeights =
new double[] {0.0, 0.1, 0.0, 0.1};
+ jPanelBlockActionLayout.columnWidths =
new int[] {7, 7, 7, 7};
+
jPanelBlockAction.setLayout(jPanelBlockActionLayout);
+ {
+ jButtonTestBlock = new
JButton();
+
jPanelBlockAction.add(jButtonTestBlock, new GridBagConstraints(1, 0, 1, 1, 0.0,
0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0,
0, 0), 0, 0));
+
jButtonTestBlock.setText(ATTMessages.getString("MainFrame.101"));
+ }
+ {
+ jButtonValidateBlock = new
JButton();
+
jPanelBlockAction.add(jButtonValidateBlock, new GridBagConstraints(3, 0, 1, 1,
0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new
Insets(0, 0, 0, 0), 0, 0));
+
jButtonValidateBlock.setText(ATTMessages.getString("MainFrame.102"));
+ }
+ }
+ }
+
+
+ {
+ jPanelBlocConf = new JPanel();
+ jPanelBlProperties.add(jPanelBlocConf, new
GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ jPanelBlocConf.setSize(new
java.awt.Dimension(631, 168));
+ jPanelBlocConf.setMaximumSize(new
java.awt.Dimension(631, 168));
+ jPanelBlocConf.setMinimumSize(new
java.awt.Dimension(631, 168));
+ jPanelBlocConf.setPreferredSize(new
java.awt.Dimension(631, 168));
+
jPanelBlocConf.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+ }
+
/* Status bar */
statusBar = new AttituneStatusBar("Hello", "world",
"coucou"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- statusBar.setSize(new java.awt.Dimension(640, 15));
- statusBar.setPreferredSize(new java.awt.Dimension(640,
15));
- statusBar.setMinimumSize(new java.awt.Dimension(640,
15));
- statusBar.setMaximumSize(new java.awt.Dimension(640,
15));
- this.add(statusBar, new GridBagConstraints(0, 2, 1, 1,
0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0,
0, 0), 0, 0));
+ statusBar.setSize(new java.awt.Dimension(640, 18));
+ statusBar.setPreferredSize(new java.awt.Dimension(640,
18));
+ statusBar.setMinimumSize(new java.awt.Dimension(640,
18));
+ statusBar.setMaximumSize(new java.awt.Dimension(640,
18));
+ this.add(statusBar, new GridBagConstraints(0, 4, 1, 1,
0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0,
0, 0), 0, 0));
/* Create the file chooser */
fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
fileChooser.addChoosableFileFilter(new
AttituneFileFilter());
- /* Pack the components and set the frame size */
+ /* Pack the components */
pack();
- setSize(648, 400);
attBlockViewer.repaint();
/* Load the template file */
@@ -536,6 +652,23 @@
System.out.println("About"); //$NON-NLS-1$
}
+ /*
+ * Event on hide/show block properties button
+ */
+ private void jButtonShowHideBlockPropertiesMouseClicked(MouseEvent evt)
+ {
+ if (jPanelBlProperties.isVisible())
+ {
+ jPanelBlProperties.setVisible(false);
+ this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT_WBP);
+ }
+ else
+ {
+ jPanelBlProperties.setVisible(true);
+ this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT_BP);
+ }
+ }
+
/*
------------------------------------------------------------------------
* Blocks viewer events
*
--------------------------------------------------------------------- */
@@ -597,6 +730,11 @@
public void onBlockSelected(ATTBlock block)
{
statusBar.setLabel3(ATTMessages.getString("MainFrame.87") +
ATTMisc.timeToString(block.getPosition())); //$NON-NLS-1$
+ if (!jPanelBlProperties.isVisible())
+ {
+ jPanelBlProperties.setVisible(true);
+ this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT_BP);
+ }
}
/*
Modified:
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages.properties
===================================================================
---
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages.properties
2008-08-15 13:23:17 UTC (rev 1502)
+++
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages.properties
2008-08-15 13:25:53 UTC (rev 1503)
@@ -18,6 +18,10 @@
MainFrame.95=You are sure that do you want deleting this block ?
MainFrame.96=Block deleting
MainFrame.98=Attitunes studio is still under developpement
+MainFrame.99=Show / Hide the block properties
+MainFrame.100=Command :
+MainFrame.101=Test
+MainFrame.102=Validate
AttitunePropertiesFrame.1=Attitunes studio - Properties
AttitunePropertiesFrame.55=The parameters marked as red color are missing.
AttitunePropertiesFrame.56=Name :
Added:
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages_fr.properties
===================================================================
---
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages_fr.properties
(rev 0)
+++
software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/messages_fr.properties
2008-08-15 13:25:53 UTC (rev 1503)
@@ -0,0 +1,60 @@
+MainFrame.1=Attitunes studio
+MainFrame.50=Cr�er
+MainFrame.53=Supprimer
+MainFrame.56=Copier
+MainFrame.59=Coller
+MainFrame.62=Jouer
+MainFrame.65=Stopper
+MainFrame.0=Attitunes studio -
+MainFrame.97=Sauver les changements avant de continuer ?
+MainFrame.72=La sc�ne a chang�e
+MainFrame.77=L'attitune a bien �t� charg�e
+MainFrame.78=Avant de sauvegarder, vous devez configurer votre attitune.\n
Allez au menu <Fichier|Propri�t�s>
+MainFrame.85=Position :
+MainFrame.86=Dur�e :
+MainFrame.87=Position du bloc :
+MainFrame.91=Position du bloc : 00:00:00
+MainFrame.93=Votre attitune a bien �t� sauvegard�e
+MainFrame.95=Vous �tes sur de vouloir supprimer ce bloc ?
+MainFrame.96=Suppression de bloc
+MainFrame.98=Attitunes studio est encore en d�veloppement
+MainFrame.99=Afficher / cacher les propri�t�s du bloc
+MainFrame.100=Commande :
+MainFrame.101=Tester
+MainFrame.102=Valider
+AttitunePropertiesFrame.1=Attitunes studio - Propri�t�s
+AttitunePropertiesFrame.55=Les param�tres marqu�s en rouge sont manquant.
+AttitunePropertiesFrame.56=Nom :
+AttitunePropertiesFrame.57=Auteur :
+AttitunePropertiesFrame.58=Description :
+AttitunePropertiesFrame.59=Version :
+AttitunePropertiesFrame.60=Cat�gorie :
+AttitunePropertiesFrame.61=Sous cat�gorie :
+AttitunePropertiesFrame.62=Mots-clefs :
+AttitunePropertiesFrame.64=Ajouter
+AttitunePropertiesFrame.65=Supprimer
+AttitunePropertiesFrame.66=Valider
+AttitunePropertiesFrame.67=Fermer
+AttitunePropertiesFrame.77=Entrez le mot-clef :
+AttitunePropertiesFrame.80=Quelques param�tres sont manquant.
+AttituneMenuBar.12=Fichier
+AttituneMenuBar.13=Editer
+AttituneMenuBar.14=Aide
+AttituneMenuBar.15=Nouveau
+AttituneMenuBar.17=Charger
+AttituneMenuBar.19=Sauvegarder
+AttituneMenuBar.21=Sauvegarder sous...
+AttituneMenuBar.23=Propri�t�s
+AttituneMenuBar.25=Quitter
+AttituneMenuBar.27=Cr�er
+AttituneMenuBar.29=Supprimer
+AttituneMenuBar.31=Copier
+AttituneMenuBar.33=Coller
+AttituneMenuBar.35=En ligne
+AttituneMenuBar.37=A propos
+ATTBlockViewer.7=Leds
+ATTBlockViewer.9=Bec\n& yeux
+ATTBlockViewer.11=Ailes
+ATTBlockViewer.13=Rotation
+ATTBlockViewer.15=Sons
+ATTBlockViewer.17=TTS
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn