improved menu design #3
This commit is contained in:
parent
243f419106
commit
d105337acd
@ -61,7 +61,7 @@ public class BackupPanel extends JPanel
|
||||
*
|
||||
*/
|
||||
static final ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.gui.messages"); //$NON-NLS-1$
|
||||
private JTextField textField;
|
||||
static JTextField textField;
|
||||
private JTextField textField_1;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,8 @@ public class CheckPanel extends JPanel
|
||||
{
|
||||
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.gui.messages"); //$NON-NLS-1$
|
||||
private static final long serialVersionUID = -1580485684838045920L;
|
||||
private JTextField textField;
|
||||
private File choosenFile;
|
||||
static File choosenFile;
|
||||
static JTextField textField;
|
||||
|
||||
/**
|
||||
* This is the constructor for this panel.
|
||||
|
@ -30,6 +30,7 @@ import java.awt.Point;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.File;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
@ -184,20 +185,61 @@ public class SibaGUI
|
||||
menuBar.setBackground(new Color(152, 251, 152));
|
||||
this.frmSimpleBackup.setJMenuBar(menuBar);
|
||||
|
||||
JMenuItem mntmNewMenuItem_1 = new JMenuItem(BUNDLE.getString("SibaGUI.mntmNewMenuItem_1.text")); //$NON-NLS-1$
|
||||
mntmNewMenuItem_1.setMaximumSize(new Dimension(100, 32767));
|
||||
mntmNewMenuItem_1.setHorizontalTextPosition(SwingConstants.LEFT);
|
||||
mntmNewMenuItem_1.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
mntmNewMenuItem_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
mntmNewMenuItem_1.addActionListener(new ActionListener()
|
||||
JMenu mnFile = new JMenu(BUNDLE.getString("SibaGUI.mnFile.text")); //$NON-NLS-1$
|
||||
mnFile.setForeground(Color.BLACK);
|
||||
menuBar.add(mnFile);
|
||||
|
||||
JMenuItem mntmBackup = new JMenuItem(BUNDLE.getString("SibaGUI.mntmBackup.text")); //$NON-NLS-1$
|
||||
mntmBackup.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e)
|
||||
{
|
||||
tabbedPane.setSelectedIndex(0);
|
||||
File file = SourceDirectorySelector.showSelectorDialog(null, null);
|
||||
if (file == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
BackupPanel.textField.setText(file.getPath());
|
||||
// panel.setVisible(true);
|
||||
}
|
||||
});
|
||||
mnFile.add(mntmBackup);
|
||||
|
||||
JMenuItem mntmCheck = new JMenuItem(BUNDLE.getString("SibaGUI.mntmCheck.text")); //$NON-NLS-1$
|
||||
mntmCheck.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e)
|
||||
{
|
||||
tabbedPane.setSelectedIndex(1);
|
||||
File result;
|
||||
|
||||
CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null);
|
||||
if (!(CheckPanel.choosenFile == null) && CheckPanel.choosenFile.exists())
|
||||
{
|
||||
CheckPanel.textField.setText(CheckPanel.choosenFile.getName());
|
||||
result = CheckPanel.choosenFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
mnFile.add(mntmCheck);
|
||||
|
||||
JMenuItem mntmQuit = new JMenuItem(BUNDLE.getString("SibaGUI.mntmQuit.text")); //$NON-NLS-1$
|
||||
mntmQuit.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent arg0)
|
||||
{
|
||||
SibaGUI.this.frmSimpleBackup.dispose();
|
||||
}
|
||||
});
|
||||
menuBar.add(mntmNewMenuItem_1);
|
||||
mnFile.add(mntmQuit);
|
||||
|
||||
JMenu mnNewMenu = new JMenu(BUNDLE.getString("SibaGUI.mnNewMenu.text")); //$NON-NLS-1$
|
||||
mnNewMenu.setLocation(new Point(500, 0));
|
||||
|
@ -1,30 +1,34 @@
|
||||
#Field ResourceBundle: BUNDLE
|
||||
#Tue Apr 26 16:39:35 CEST 2016
|
||||
#Tue May 31 16:44:12 CEST 2016
|
||||
BackupPanel.TitleBackupPanel.text=Backup
|
||||
BackupPanel.TitleCheckPanel.text=Check
|
||||
BackupPanel.TitleWarning.text=Warning
|
||||
BackupPanel.btnNewButton.text=\u2026
|
||||
BackupPanel.btnNewButton_1.text=\u2026
|
||||
BackupPanel.btnNewButton_2.text=Backup
|
||||
BackupPanel.checkFileChooserButton.text=File to check
|
||||
BackupPanel.confirmDialogMessage.text=Your directory has been backup \n in the file \:\n
|
||||
BackupPanel.confirmDialogTitle.text=Backup done
|
||||
BackupPanel.dataMissing.text=Data Missing
|
||||
BackupPanel.lblNewLabel_2.text=<html><p style\="margin-bottom\: 0cm; line-height\: 100%">Choose \:</p><p style\="margin-bottom\: 0cm; line-height\: 100%">- 1 \: The directory to backup</p><p style\="margin-bottom\: 0cm; line-height\: 100%">- 2 \: The directory where you want to put the backup</p><p style\="margin-bottom\: 0cm; line-height\: 100%">- 3 \: Click Backup</p></html>
|
||||
BackupPanel.lblSourceDirectory.text=Source Directory :
|
||||
BackupPanel.lblTargetDirectory.text=Target Directory :
|
||||
BackupPanel.lblSourceDirectory.text=Source Directory \:
|
||||
BackupPanel.lblTargetDirectory.text=Target Directory \:
|
||||
BackupPanel.sourceFileChooserButton.text=Source Directory
|
||||
BackupPanel.targetFileChooserButton.text=Target Directory
|
||||
CheckDirectorySelector.this.dialogTitle=Directory where is the backup
|
||||
CheckPanel.btnNewButton.text=\u2026
|
||||
CheckPanel.btnNewButton_1.text=Check
|
||||
CheckPanel.confirmDialogBad.text=is corrupted
|
||||
CheckPanel.confirmDialogGood.text=has been check and is good
|
||||
CheckPanel.confirmDialogTitle.text=Check done
|
||||
CheckPanel.confirmDialogYourString.text=Your File
|
||||
CheckPanel.lblNewLabel.text=File to be Checked
|
||||
SibaGUI.mnFile.text=File
|
||||
SibaGUI.mnNewMenu.text=Help
|
||||
SibaGUI.mntmBackup.text=Backup
|
||||
SibaGUI.mntmCheck.text=Check
|
||||
SibaGUI.mntmNewMenuItem_1.text=End
|
||||
SibaGUI.mntmNewMenuItem_2.text=About
|
||||
SibaGUI.mntmQuit.text=Quit
|
||||
SourceDirectorySelector.this.dialogTitle=Directory to backup
|
||||
TargetDirectorySelector.this.dialogTitle=Directory for the backup
|
||||
BackupPanel.checkFileChooserButton.text= File to check
|
||||
BackupPanel.confirmDialogTitle.text = Backup done
|
||||
BackupPanel.confirmDialogMessage.text = Your directory has been backup \n in the file :\n
|
||||
CheckPanel.confirmDialogTitle.text = Check done
|
||||
CheckPanel.confirmDialogYourString.text = Your File
|
||||
CheckPanel.confirmDialogGood.text = has been check and is good
|
||||
CheckPanel.confirmDialogBad.text = is corrupted
|
||||
BackupPanel.dataMissing.text = Data Missing
|
||||
BackupPanel.TitleWarning.text = Warning
|
||||
|
@ -15,7 +15,6 @@ CheckPanel.btnNewButton.text=\u2026
|
||||
CheckPanel.btnNewButton_1.text=Vérifier
|
||||
CheckPanel.lblNewLabel.text=Sauvegarde \u00E0 v\u00E9rifier
|
||||
SibaGUI.mnNewMenu.text=Aide
|
||||
SibaGUI.mntmNewMenuItem_1.text=Sortir
|
||||
SibaGUI.mntmNewMenuItem_2.text=A propos
|
||||
SourceDirectorySelector.this.dialogTitle=Choix du répertoire à sauvegarder
|
||||
TargetDirectorySelector.this.dialogTitle=Choix du répertoire de destination
|
||||
@ -28,3 +27,7 @@ CheckPanel.confirmDialogGood.text = a
|
||||
CheckPanel.confirmDialogBad.text = comporte des erreurs
|
||||
BackupPanel.dataMissing.text = Données incomplètes
|
||||
BackupPanel.TitleWarning.text = Attention
|
||||
SibaGUI.mnFile.text=Fichier
|
||||
SibaGUI.mntmBackup.text=Sauvegarde
|
||||
SibaGUI.mntmQuit.text=Sortir
|
||||
SibaGUI.mntmCheck.text=Vérification
|
Loading…
Reference in New Issue
Block a user