diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/README.md b/README.md index b238f8e..d0d366f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Please feel free to fork and Contribute!😁 Drop Pull Requests and push some stars ⭐⭐⭐ ## Download v1.0 -[![image](https://user-images.githubusercontent.com/40875400/164351899-3d23de26-69ce-40a2-b750-94f2c4c428c8.png)](https://github.com/MedouneSGB/Tawfekh-Editor/raw/89b632e277d587f22034cb1b5127b0e3104b4672/exe/Tawfekh%20Editor.exe) +[![image](https://user-images.githubusercontent.com/40875400/164351899-3d23de26-69ce-40a2-b750-94f2c4c428c8.png)](https://raw.githubusercontent.com/MedouneSGB/Tawfekh-Editor/main/distros/exe/Tawfekh%20Editor.exe) ## Screens ![image](https://user-images.githubusercontent.com/40875400/164351287-98e2ecfe-309a-4c31-811f-aeaddf522550.png) diff --git a/distros/exe/Tawfekh Editor.exe b/distros/exe/Tawfekh Editor.exe new file mode 100644 index 0000000..8c7c97b Binary files /dev/null and b/distros/exe/Tawfekh Editor.exe differ diff --git a/exe/Tawfekh Editor.exe b/distros/jar/Tawfekh_editor.jar similarity index 66% rename from exe/Tawfekh Editor.exe rename to distros/jar/Tawfekh_editor.jar index dc0ad1b..548bfd8 100644 Binary files a/exe/Tawfekh Editor.exe and b/distros/jar/Tawfekh_editor.jar differ diff --git a/src/Tawfekh_editor/Tawfekh_editor.form b/src/Tawfekh_editor/Tawfekh_editor.form index 64c6f37..892b14c 100644 --- a/src/Tawfekh_editor/Tawfekh_editor.form +++ b/src/Tawfekh_editor/Tawfekh_editor.form @@ -54,42 +54,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -109,6 +75,11 @@ + + + + + @@ -127,6 +98,11 @@ + + + + + @@ -145,6 +121,11 @@ + + + + + @@ -159,6 +140,11 @@ + + + + + @@ -641,7 +627,7 @@ - + @@ -664,7 +650,7 @@ - + @@ -679,7 +665,7 @@ - + @@ -692,7 +678,7 @@ - + @@ -705,7 +691,7 @@ - + @@ -727,7 +713,7 @@ - + @@ -749,15 +735,21 @@ - + + + + + + + @@ -766,12 +758,15 @@ + + + - + @@ -784,15 +779,21 @@ - + + + + + + + @@ -800,11 +801,11 @@ - + - + @@ -812,11 +813,11 @@ - + - + @@ -836,7 +837,7 @@ - + @@ -850,11 +851,11 @@ - + - + diff --git a/src/Tawfekh_editor/Tawfekh_editor.java b/src/Tawfekh_editor/Tawfekh_editor.java index 93f1694..47ecedb 100644 --- a/src/Tawfekh_editor/Tawfekh_editor.java +++ b/src/Tawfekh_editor/Tawfekh_editor.java @@ -77,9 +77,9 @@ private void initComponents() { cbPolice = new javax.swing.JComboBox<>(); lblParamPolice = new javax.swing.JLabel(); btnUploadBg = new javax.swing.JButton(); - lblParamPolice1 = new javax.swing.JLabel(); + lblParamUpBG = new javax.swing.JLabel(); lblSignature = new javax.swing.JLabel(); - btnThemeBlack1 = new javax.swing.JButton(); + btnThemePink = new javax.swing.JButton(); imgBackground = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); @@ -92,6 +92,7 @@ private void initComponents() { panelGlobale.setLayout(null); panelAccueil.setOpaque(false); + panelAccueil.setLayout(null); btnNouveau.setBackground(new java.awt.Color(138, 92, 1)); btnNouveau.setFont(new java.awt.Font("Garamond", 2, 48)); // NOI18N @@ -103,6 +104,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { btnNouveauActionPerformed(evt); } }); + panelAccueil.add(btnNouveau); + btnNouveau.setBounds(260, 211, 408, 61); btnParametre.setBackground(new java.awt.Color(153, 102, 0)); btnParametre.setFont(new java.awt.Font("Garamond", 2, 48)); // NOI18N @@ -114,6 +117,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { btnParametreActionPerformed(evt); } }); + panelAccueil.add(btnParametre); + btnParametre.setBounds(260, 301, 218, 61); btnQuitter.setBackground(new java.awt.Color(153, 102, 0)); btnQuitter.setFont(new java.awt.Font("Garamond", 2, 48)); // NOI18N @@ -125,6 +130,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { btnQuitterActionPerformed(evt); } }); + panelAccueil.add(btnQuitter); + btnQuitter.setBounds(504, 301, 164, 61); lblTitre.setFont(new java.awt.Font("Garamond", 2, 78)); // NOI18N lblTitre.setForeground(new java.awt.Color(153, 51, 0)); @@ -132,36 +139,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { lblTitre.setText("Tawfekh Mémorial"); lblTitre.setToolTipText(""); lblTitre.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - - javax.swing.GroupLayout panelAccueilLayout = new javax.swing.GroupLayout(panelAccueil); - panelAccueil.setLayout(panelAccueilLayout); - panelAccueilLayout.setHorizontalGroup( - panelAccueilLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelAccueilLayout.createSequentialGroup() - .addContainerGap() - .addComponent(lblTitre, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelAccueilLayout.createSequentialGroup() - .addContainerGap(270, Short.MAX_VALUE) - .addGroup(panelAccueilLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(btnNouveau) - .addGroup(panelAccueilLayout.createSequentialGroup() - .addComponent(btnParametre, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(26, 26, 26) - .addComponent(btnQuitter, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(262, 262, 262)) - ); - panelAccueilLayout.setVerticalGroup( - panelAccueilLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelAccueilLayout.createSequentialGroup() - .addComponent(lblTitre, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 111, Short.MAX_VALUE) - .addComponent(btnNouveau) - .addGap(29, 29, 29) - .addGroup(panelAccueilLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(btnParametre) - .addComponent(btnQuitter)) - .addGap(98, 98, 98)) - ); + panelAccueil.add(lblTitre); + lblTitre.setBounds(6, 0, 934, 100); panelGlobale.add(panelAccueil); panelAccueil.setBounds(10, 110, 940, 460); @@ -415,7 +394,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); panelParametre.add(btnParamSave); - btnParamSave.setBounds(60, 317, 218, 61); + btnParamSave.setBounds(42, 317, 230, 61); btnParamRetour.setBackground(new java.awt.Color(153, 102, 0)); btnParamRetour.setFont(new java.awt.Font("Garamond", 2, 48)); // NOI18N @@ -428,22 +407,22 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); panelParametre.add(btnParamRetour); - btnParamRetour.setBounds(304, 317, 164, 61); + btnParamRetour.setBounds(296, 317, 170, 61); txtChangeTitre.setFont(new java.awt.Font("Cormorant Garamond", 0, 24)); // NOI18N panelParametre.add(txtChangeTitre); - txtChangeTitre.setBounds(215, 41, 253, 39); + txtChangeTitre.setBounds(197, 41, 270, 39); txtChangeTitre.setText(lblTitre.getText()); lblParamTitre.setFont(new java.awt.Font("Cormorant Garamond", 0, 36)); // NOI18N lblParamTitre.setText("Titre :"); panelParametre.add(lblParamTitre); - lblParamTitre.setBounds(59, 34, 150, 45); + lblParamTitre.setBounds(40, 34, 150, 45); lblParamTheme.setFont(new java.awt.Font("Cormorant Garamond", 0, 36)); // NOI18N lblParamTheme.setText("Thème : "); panelParametre.add(lblParamTheme); - lblParamTheme.setBounds(60, 100, 150, 47); + lblParamTheme.setBounds(40, 100, 150, 47); btnThemeClassique.setBackground(new java.awt.Color(212, 161, 8)); btnThemeClassique.setFont(new java.awt.Font("Cormorant Garamond", 0, 20)); // NOI18N @@ -455,7 +434,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); panelParametre.add(btnThemeClassique); - btnThemeClassique.setBounds(215, 107, 98, 39); + btnThemeClassique.setBounds(197, 107, 105, 39); btnThemeBlack.setBackground(new java.awt.Color(0, 0, 0)); btnThemeBlack.setFont(new java.awt.Font("Cormorant Garamond", 0, 20)); // NOI18N @@ -467,19 +446,28 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); panelParametre.add(btnThemeBlack); - btnThemeBlack.setBounds(320, 107, 70, 39); + btnThemeBlack.setBounds(307, 107, 78, 39); + cbPolice.setBackground(new java.awt.Color(168, 111, 0)); cbPolice.setFont(new java.awt.Font("Cormorant Garamond", 0, 24)); // NOI18N + cbPolice.setForeground(new java.awt.Color(255, 255, 255)); cbPolice.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Garamond", "Cormorant Garamond", "Times New Roman" })); + cbPolice.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cbPoliceActionPerformed(evt); + } + }); panelParametre.add(cbPolice); - cbPolice.setBounds(215, 173, 252, 41); + cbPolice.setBounds(197, 173, 270, 41); lblParamPolice.setFont(new java.awt.Font("Cormorant Garamond", 0, 36)); // NOI18N lblParamPolice.setText("Police :"); panelParametre.add(lblParamPolice); - lblParamPolice.setBounds(60, 170, 150, 40); + lblParamPolice.setBounds(40, 170, 150, 40); + btnUploadBg.setBackground(new java.awt.Color(168, 111, 0)); btnUploadBg.setFont(new java.awt.Font("Cormorant Garamond", 0, 24)); // NOI18N + btnUploadBg.setForeground(new java.awt.Color(255, 255, 255)); btnUploadBg.setText("Upload BackGround"); btnUploadBg.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -487,13 +475,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); panelParametre.add(btnUploadBg); - btnUploadBg.setBounds(215, 248, 252, 39); + btnUploadBg.setBounds(197, 248, 270, 39); - lblParamPolice1.setFont(new java.awt.Font("Cormorant Garamond", 1, 23)); // NOI18N - lblParamPolice1.setForeground(new java.awt.Color(153, 51, 0)); - lblParamPolice1.setText(" Format 960 x 678"); - panelParametre.add(lblParamPolice1); - lblParamPolice1.setBounds(60, 250, 150, 29); + lblParamUpBG.setFont(new java.awt.Font("Cormorant Garamond", 1, 23)); // NOI18N + lblParamUpBG.setForeground(new java.awt.Color(153, 51, 0)); + lblParamUpBG.setText("Use 960 x 678 px"); + panelParametre.add(lblParamUpBG); + lblParamUpBG.setBounds(37, 250, 160, 29); lblSignature.setFont(new java.awt.Font("Freestyle Script", 3, 36)); // NOI18N lblSignature.setForeground(new java.awt.Color(116, 77, 0)); @@ -501,17 +489,17 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { panelParametre.add(lblSignature); lblSignature.setBounds(580, 470, 120, 40); - btnThemeBlack1.setBackground(new java.awt.Color(255, 51, 102)); - btnThemeBlack1.setFont(new java.awt.Font("Cormorant Garamond", 0, 20)); // NOI18N - btnThemeBlack1.setForeground(new java.awt.Color(255, 255, 255)); - btnThemeBlack1.setText("Pink"); - btnThemeBlack1.addActionListener(new java.awt.event.ActionListener() { + btnThemePink.setBackground(new java.awt.Color(255, 51, 102)); + btnThemePink.setFont(new java.awt.Font("Cormorant Garamond", 0, 20)); // NOI18N + btnThemePink.setForeground(new java.awt.Color(255, 255, 255)); + btnThemePink.setText("Pink"); + btnThemePink.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - btnThemeBlack1ActionPerformed(evt); + btnThemePinkActionPerformed(evt); } }); - panelParametre.add(btnThemeBlack1); - btnThemeBlack1.setBounds(395, 107, 70, 39); + panelParametre.add(btnThemePink); + btnThemePink.setBounds(389, 107, 78, 39); panelGlobale.add(panelParametre); panelParametre.setBounds(220, 110, 730, 560); @@ -634,12 +622,18 @@ private void btnColorYellowActionPerformed(java.awt.event.ActionEvent evt) {//GE private void btnParamSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnParamSaveActionPerformed - int x = 0; - String choix = cbPolice.getSelectedItem().toString(); - if ("Garamond".equals(choix)) { - x = 2; + try { + int x = 0; + String choix = cbPolice.getSelectedItem().toString(); + if ("Garamond".equals(choix)) { + x = 2; + } + lblTitre.setText(txtChangeTitre.getText()); + changeTextFont(choix, x); + + } catch (Exception e) { + System.out.println("Erreur Change Police" + e); } - lblTitre.setText(txtChangeTitre.getText()); }//GEN-LAST:event_btnParamSaveActionPerformed public void changeTextFont(String choix, int x) { @@ -650,10 +644,29 @@ public void changeTextFont(String choix, int x) { lblParamTheme.setFont(new java.awt.Font(choix, x, 36)); lblParamPolice.setFont(new java.awt.Font(choix, x, 36)); + lblParamUpBG.setFont(new java.awt.Font(choix, x, 23)); + btnUploadBg.setFont(new java.awt.Font(choix, x, 24)); + txtChangeTitre.setFont(new java.awt.Font(choix, x, 24)); - btnThemeClassique.setFont(new java.awt.Font(choix, x, 24)); - btnThemeBlack.setFont(new java.awt.Font(choix, x, 24)); cbPolice.setFont(new java.awt.Font(choix, x, 24)); + + btnThemeClassique.setFont(new java.awt.Font(choix, x, 20)); + btnThemeBlack.setFont(new java.awt.Font(choix, x, 20)); + btnThemePink.setFont(new java.awt.Font(choix, x, 20)); + + btnParamSave.setFont(new java.awt.Font(choix, x, 24)); + btnParamRetour.setFont(new java.awt.Font(choix, x, 24)); + + btnNouveau.setFont(new java.awt.Font(choix, x, 24)); + btnParametre.setFont(new java.awt.Font(choix, x, 24)); + btnQuitter.setFont(new java.awt.Font(choix, x, 24)); + + jTextArea1.setFont(new java.awt.Font(choix, x, 24)); + jTextArea2.setFont(new java.awt.Font(choix, x, 24)); + + btnFichierOuvert1.setFont(new java.awt.Font(choix, x, 24)); + btnFichierOuvert2.setFont(new java.awt.Font(choix, x, 24)); + btnFichierOuvert3.setFont(new java.awt.Font(choix, x, 24)); repaint(); } @@ -706,6 +719,7 @@ public void changeTitreEtMenuColor(Color colorTitre, Color colorMenu) { lblParamTheme.setForeground(Color.getColor("", colorMenu)); lblParamPolice.setForeground(Color.getColor("", colorMenu)); lblSignature.setForeground(Color.getColor("", colorMenu)); + lblParamUpBG.setForeground(Color.getColor("", colorMenu)); } @@ -857,9 +871,9 @@ private void btnCloseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN- // TODO add your handling code here: }//GEN-LAST:event_btnCloseFileActionPerformed - private void btnThemeBlack1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemeBlack1ActionPerformed + private void btnThemePinkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemePinkActionPerformed - imgBackground.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/bg3.png"))); + imgBackground.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/bg4.png"))); Color colorTitre = new Color(255, 255, 255); Color colorMenu = new Color(255, 255, 255); @@ -870,12 +884,16 @@ private void btnThemeBlack1ActionPerformed(java.awt.event.ActionEvent evt) {//GE repaint(); - }//GEN-LAST:event_btnThemeBlack1ActionPerformed + }//GEN-LAST:event_btnThemePinkActionPerformed private void lblSaveMessageFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_lblSaveMessageFocusLost lblSaveMessage.setVisible(false); }//GEN-LAST:event_lblSaveMessageFocusLost + private void cbPoliceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPoliceActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cbPoliceActionPerformed + public void openText(String fileName) { try { @@ -970,8 +988,8 @@ public static void main(String args[]) { private javax.swing.JButton btnSave; private javax.swing.JButton btnSaveAs; private javax.swing.JButton btnThemeBlack; - private javax.swing.JButton btnThemeBlack1; private javax.swing.JButton btnThemeClassique; + private javax.swing.JButton btnThemePink; private javax.swing.JButton btnUploadBg; private javax.swing.JComboBox cbPolice; private javax.swing.JLabel imgBackground; @@ -980,9 +998,9 @@ public static void main(String args[]) { private javax.swing.JTextArea jTextArea1; private javax.swing.JTextArea jTextArea2; private javax.swing.JLabel lblParamPolice; - private javax.swing.JLabel lblParamPolice1; private javax.swing.JLabel lblParamTheme; private javax.swing.JLabel lblParamTitre; + private javax.swing.JLabel lblParamUpBG; private javax.swing.JLabel lblSaveMessage; private javax.swing.JLabel lblSignature; private javax.swing.JLabel lblTitre; diff --git a/src/img/bg3.png b/src/img/bg3.png deleted file mode 100644 index 0b9f232..0000000 Binary files a/src/img/bg3.png and /dev/null differ diff --git a/src/img/bg4.png b/src/img/bg4.png new file mode 100644 index 0000000..e960578 Binary files /dev/null and b/src/img/bg4.png differ diff --git a/src/img/document(1).png b/src/img/document(1).png deleted file mode 100644 index 1baee9b..0000000 Binary files a/src/img/document(1).png and /dev/null differ diff --git a/src/img/document.png b/src/img/document.png deleted file mode 100644 index 6db80c0..0000000 Binary files a/src/img/document.png and /dev/null differ diff --git a/src/img/file.png b/src/img/file.png deleted file mode 100644 index 361189a..0000000 Binary files a/src/img/file.png and /dev/null differ diff --git a/src/img/folder.png b/src/img/folder.png deleted file mode 100644 index 4cfa229..0000000 Binary files a/src/img/folder.png and /dev/null differ diff --git a/src/img/save-file(1).png b/src/img/save-file(1).png deleted file mode 100644 index 7acfa7d..0000000 Binary files a/src/img/save-file(1).png and /dev/null differ