[fix/typo] Fix the tafseer word typos

This commit is contained in:
Anas Elgarhy 2023-05-25 23:54:58 +03:00
parent e8a0dd8ed6
commit 5920e1bc08
No known key found for this signature in database
GPG key ID: 0501802A1D496528
2 changed files with 14 additions and 14 deletions

View file

@ -73,11 +73,11 @@
<gridbag weightx="0.0" weighty="1.0"/> <gridbag weightx="0.0" weighty="1.0"/>
</constraints> </constraints>
<properties> <properties>
<text value="Tafser/Translation"/> <text value="Tafseer/Translation"/>
<verifyInputWhenFocusTarget value="false"/> <verifyInputWhenFocusTarget value="false"/>
</properties> </properties>
</component> </component>
<component id="1bfe0" class="javax.swing.JComboBox" binding="tafserAndTranslationComboBox"> <component id="1bfe0" class="javax.swing.JComboBox" binding="tafseerAndTranslationComboBox">
<constraints> <constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/> <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="1.0"/> <gridbag weightx="1.0" weighty="1.0"/>
@ -196,7 +196,7 @@
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<component id="db36" class="javax.swing.JTextArea" binding="tafserTextArea"> <component id="db36" class="javax.swing.JTextArea" binding="tafseerTextArea">
<constraints/> <constraints/>
<properties> <properties>
<editable value="false"/> <editable value="false"/>

View file

@ -32,8 +32,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
private JButton previousButton; private JButton previousButton;
private JButton nextButton; private JButton nextButton;
private JCheckBox autoPlayCheckBox; private JCheckBox autoPlayCheckBox;
private JTextArea tafserTextArea; private JTextArea tafseerTextArea;
private JComboBox<ReadableEdition> tafserAndTranslationComboBox; private JComboBox<ReadableEdition> tafseerAndTranslationComboBox;
private JComboBox<ReadableEdition> editionComboBox; private JComboBox<ReadableEdition> editionComboBox;
private boolean isPlaying; private boolean isPlaying;
private AudioPlayer audioPlayer; private AudioPlayer audioPlayer;
@ -76,7 +76,7 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
} }
}); });
tafserAndTranslationComboBox.setModel(tafserAndTranslationComboBoxModel); tafseerAndTranslationComboBox.setModel(tafserAndTranslationComboBoxModel);
editionComboBox.setModel(editionComboBoxModel); editionComboBox.setModel(editionComboBoxModel);
// Set the default selected item for the editionComboBox // Set the default selected item for the editionComboBox
@ -91,8 +91,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
surahNameLabel.setText(ayah.getSurah().getName()); surahNameLabel.setText(ayah.getSurah().getName());
numberOfAyahInSuarhLabel.setText("آية رقم: " + ayah.getNumberInSurah()); numberOfAyahInSuarhLabel.setText("آية رقم: " + ayah.getNumberInSurah());
ayahRevelationType.setText(ayah.getSurah().getRevelationType().getArabicName()); ayahRevelationType.setText(ayah.getSurah().getRevelationType().getArabicName());
// Update the tafser or translation // Update the tafseer or translation
updateTheTauserTextArea(); updateTheTauseerTextArea();
} }
private void addListeners() { private void addListeners() {
@ -133,8 +133,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
} }
}); });
tafserAndTranslationComboBox.addActionListener(e -> { tafseerAndTranslationComboBox.addActionListener(e -> {
updateTheTauserTextArea(); updateTheTauseerTextArea();
}); });
editionComboBox.addActionListener(e -> { editionComboBox.addActionListener(e -> {
@ -167,15 +167,15 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
} }
private void updateTheTauserTextArea() { private void updateTheTauseerTextArea() {
final var selectedEdition = ((ReadableEdition) Objects.requireNonNull( final var selectedEdition = ((ReadableEdition) Objects.requireNonNull(
tafserAndTranslationComboBox.getSelectedItem())).getEdition(); tafseerAndTranslationComboBox.getSelectedItem())).getEdition();
try { try {
tafserTextArea.setText(Ayah.getAyah(ayah.getNumber(), selectedEdition).getText()); tafseerTextArea.setText(Ayah.getAyah(ayah.getNumber(), selectedEdition).getText());
} catch (final IOException ioException) { } catch (final IOException ioException) {
ioException.printStackTrace(); ioException.printStackTrace();
JOptionPane.showMessageDialog(this, JOptionPane.showMessageDialog(this,
"Error while loading the tafser - check your internet connection", "Error while loading the tafseer - check your internet connection",
"Error", JOptionPane.ERROR_MESSAGE); "Error", JOptionPane.ERROR_MESSAGE);
} }
} }