[new/ui] Add the Tafser text area in the details dialog

This commit is contained in:
Anas Elgarhy 2023-05-25 20:30:01 +03:00
parent 0053f4ba72
commit f183a2d5e3
No known key found for this signature in database
GPG key ID: 0501802A1D496528
2 changed files with 64 additions and 5 deletions

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.anas.intellij.plugins.ayah.dialogs.AyahDetailsDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="577" height="355"/>
<xy x="48" y="54" width="836" height="472"/>
</constraints>
<properties>
<maximumSize width="500" height="300"/>
@ -13,7 +13,7 @@
<grid id="94766" layout-manager="GridLayoutManager" row-count="2" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@ -107,7 +107,7 @@
</component>
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="e3588" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@ -137,6 +137,63 @@
</component>
</children>
</scrollpane>
<scrollpane id="6058b">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="db36" class="javax.swing.JTextArea" binding="tafserTextArea">
<constraints/>
<properties>
<editable value="false"/>
<focusable value="false"/>
<lineWrap value="true"/>
<preferredSize width="549" height="18"/>
<wrapStyleWord value="true"/>
</properties>
</component>
</children>
</scrollpane>
</children>
</grid>
<grid id="e3ffd" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="c14dc" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Label"/>
</properties>
</component>
<component id="1bfe0" class="javax.swing.JComboBox" binding="comboBox1" default-binding="true">
<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"/>
</constraints>
<properties/>
</component>
<component id="82c3f" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Label"/>
</properties>
</component>
<component id="3ac9d" class="javax.swing.JComboBox" binding="comboBox2" default-binding="true">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
</children>

View file

@ -4,7 +4,6 @@ import com.anas.alqurancloudapi.Ayah;
import com.anas.alqurancloudapi.consts.Constants;
import com.anas.intellij.plugins.ayah.audio.AudioPlayer;
import com.anas.intellij.plugins.ayah.audio.PlayerListener;
import javazoom.jl.player.advanced.PlaybackEvent;
import javax.swing.*;
import java.awt.event.KeyEvent;
@ -28,6 +27,9 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
private JButton previousButton;
private JButton nextButton;
private JCheckBox autoPlayCheckBox;
private JTextArea tafserTextArea;
private JComboBox comboBox1;
private JComboBox comboBox2;
private boolean isPlaying;
private AudioPlayer audioPlayer;
private Ayah ayah;