-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: Some more Swedish translations (#1836) Updated Menu_tr.properties Updated jabref_tr.properties Add check for obsolete database structure. Add help popup. (#1818) Updated dependencies (#1831) Removed one Globals call from MetaData (#1782)
- Loading branch information
Showing
41 changed files
with
471 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/main/java/net/sf/jabref/gui/shared/MigrationHelpDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package net.sf.jabref.gui.shared; | ||
|
||
import java.awt.BorderLayout; | ||
import java.awt.Component; | ||
import java.awt.Dimension; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.KeyEvent; | ||
|
||
import javax.swing.AbstractAction; | ||
import javax.swing.Action; | ||
import javax.swing.Box; | ||
import javax.swing.BoxLayout; | ||
import javax.swing.JButton; | ||
import javax.swing.JComponent; | ||
import javax.swing.JDialog; | ||
import javax.swing.JLabel; | ||
import javax.swing.JPanel; | ||
import javax.swing.KeyStroke; | ||
import javax.swing.border.EmptyBorder; | ||
|
||
import net.sf.jabref.gui.help.HelpAction; | ||
import net.sf.jabref.logic.help.HelpFile; | ||
import net.sf.jabref.logic.l10n.Localization; | ||
|
||
public class MigrationHelpDialog extends JDialog { | ||
|
||
public MigrationHelpDialog(OpenSharedDatabaseDialog openSharedDatabaseDialog) { | ||
super(openSharedDatabaseDialog, Localization.lang("Migration help information")); | ||
setModal(true); | ||
|
||
String migrationMessage = Localization | ||
.lang("Entered database has obsolete structure and is no longer supported."); | ||
JLabel migrationLabel = new JLabel(migrationMessage); | ||
migrationLabel.setAlignmentX(Component.LEFT_ALIGNMENT); | ||
|
||
String helpMessage = Localization.lang("Click here to learn about the migration of pre-3.6 databases."); | ||
JLabel helpLabel = new HelpAction(HelpFile.SQL_DATABASE_MIGRATION).getHelpLabel(helpMessage); | ||
helpLabel.setAlignmentX(Component.LEFT_ALIGNMENT); | ||
|
||
String informationMessage = Localization.lang("However, a new database was created alongside the pre-3.6 one."); | ||
JLabel informationLabel = new JLabel(informationMessage); | ||
informationLabel.setAlignmentX(Component.LEFT_ALIGNMENT); | ||
|
||
Action openAction = new AbstractAction() { | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
openSharedDatabaseDialog.openSharedDatabase(); | ||
} | ||
}; | ||
|
||
JButton okButton = new JButton(Localization.lang("OK")); | ||
okButton.addActionListener(openAction); | ||
okButton.setAlignmentX(Component.CENTER_ALIGNMENT); | ||
okButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), | ||
"Enter_pressed"); | ||
okButton.getActionMap().put("Enter_pressed", openAction); | ||
|
||
JPanel buttonPanel = new JPanel(); | ||
buttonPanel.add(okButton, BorderLayout.CENTER); | ||
|
||
JPanel contentPanel = new JPanel(); | ||
contentPanel.setBorder(new EmptyBorder(9, 9, 9, 9)); | ||
contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS)); | ||
|
||
contentPanel.add(migrationLabel); | ||
contentPanel.add(Box.createRigidArea(new Dimension(0, 10))); | ||
contentPanel.add(helpLabel); | ||
contentPanel.add(Box.createRigidArea(new Dimension(0, 10))); | ||
contentPanel.add(informationLabel); | ||
contentPanel.add(Box.createRigidArea(new Dimension(0, 20))); | ||
contentPanel.add(buttonPanel); | ||
|
||
add(contentPanel); | ||
|
||
setResizable(false); | ||
pack(); | ||
setLocationRelativeTo(openSharedDatabaseDialog); | ||
} | ||
} |
Oops, something went wrong.