final implementation

This commit is contained in:
2024-11-04 21:51:00 +05:30
commit e0dd0c850a
85 changed files with 2966 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListCell?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<fx:root editable="false" focusTraversable="false" graphicTextGap="0.0" prefHeight="111.0" prefWidth="85.0" type="javafx.scene.control.ListCell" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<graphic>
<AnchorPane id="attach-pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="111.0" prefWidth="85.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label id="attach-label" fx:id="attachmentName" layoutX="11.0" layoutY="84.0" prefHeight="17.0" prefWidth="64.0" />
<ImageView id="attach-view" fx:id="attachmentImg" fitHeight="61.0" fitWidth="61.0" layoutX="12.0" layoutY="15.0" pickOnBounds="true" preserveRatio="true" />
</children>
</AnchorPane>
</graphic>
<styleClass>
<String fx:value="email-cell" />
<String fx:value="attach-cell" />
</styleClass>
</fx:root>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.secure_mailer.backend.SecretCodeController">
<children>
<AnchorPane layoutX="173.0" layoutY="40.0" prefHeight="138.0" prefWidth="194.0" />
<Label layoutX="290.0" layoutY="262.0" prefHeight="26.0" prefWidth="84.0" text="Email Id :" textAlignment="RIGHT" textOverrun="WORD_ELLIPSIS" wrapText="true">
<font>
<Font size="18.0" />
</font>
</Label>
<Label layoutX="290.0" layoutY="310.0" prefHeight="26.0" prefWidth="84.0" text="Secret Key :" textAlignment="RIGHT" textOverrun="WORD_ELLIPSIS" wrapText="true">
<font>
<Font size="15.0" />
</font>
</Label>
<Button layoutX="290.0" layoutY="346.0" mnemonicParsing="false" onAction="#handleAdd" prefHeight="27.0" prefWidth="78.0" text="Add Key" />
<Button layoutX="397.0" layoutY="347.0" mnemonicParsing="false" onAction="#handleUpdate" text="Update Key" />
<Button layoutX="510.0" layoutY="347.0" mnemonicParsing="false" onAction="#handleDelete" text="Delete Key" />
<Button layoutX="431.0" layoutY="67.0" mnemonicParsing="false" onAction="#handleViewAll" text="View All Key" />
<TableView fx:id="secretCodesTable" layoutY="2.0" prefHeight="181.0" prefWidth="401.0">
<columns>
<TableColumn fx:id="emailColumn" prefWidth="200" text="Email" />
<TableColumn fx:id="secretCodeColumn" prefWidth="200" text="Secret Code" />
</columns>
</TableView>
<TextField fx:id="emailField" layoutX="397.0" layoutY="263.0" promptText="Email Id" />
<TextField fx:id="secretCodeField" layoutX="397.0" layoutY="311.0" promptText="Secret Key" />
</children>
</AnchorPane>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListCell?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<fx:root editable="false" focusTraversable="false" graphicTextGap="0.0" prefHeight="100.0" prefWidth="300.0" styleClass="email-cell" type="javafx.scene.control.ListCell" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<graphic>
<AnchorPane id="email-cell-pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="100.0" prefWidth="300.0" stylesheets="@../css/themeDefault.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="100.0" fitWidth="301.0" layoutX="-1.0" opacity="0.57" visible="false" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
<image>
<Image url="@../img/email-cell-template.png" />
</image>
</ImageView>
<Label id="email-cell-name" fx:id="sender" focusTraversable="false" layoutX="24.0" layoutY="11.0" prefHeight="17.0" prefWidth="177.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass></Label>
<Label id="email-cell-date" fx:id="date" alignment="CENTER_RIGHT" focusTraversable="false" layoutX="222.0" layoutY="11.0" prefHeight="17.0" prefWidth="61.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass></Label>
<Label id="email-cell-title" fx:id="title" focusTraversable="false" layoutX="24.0" layoutY="29.0" prefHeight="17.0" prefWidth="192.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-bold" />
</styleClass></Label>
<TextArea id="email-cell-message" fx:id="message" editable="false" focusTraversable="false" layoutX="15.0" layoutY="48.0" mouseTransparent="true" prefHeight="43.0" prefWidth="219.0" wrapText="true">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass></TextArea>
<ImageView id="email-cell-clip" fx:id="attachment" fitHeight="34.0" fitWidth="33.0" layoutX="257.0" layoutY="60.0" pickOnBounds="true" preserveRatio="true" visible="false" />
<Pane id="email-cell-focused" fx:id="selected" layoutY="-1.0" prefHeight="100.0" prefWidth="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="290.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</graphic>
</fx:root>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Line?>
<AnchorPane id="login-pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@../css/themeDefault.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button id="login-key" layoutX="116.0" layoutY="248.0" mnemonicParsing="false" onAction="#loginAction" prefHeight="95.0" prefWidth="367.0" styleClass="font-rockwell" text="Sign in" />
<Line endX="235.199951171875" endY="1.52587890625E-5" layoutX="301.0" layoutY="140.0" startX="-237.99996948242188" startY="1.52587890625E-5" strokeLineCap="ROUND" strokeWidth="2.0" />
<TextField fx:id="emailField" layoutX="119.0" layoutY="90.0" prefHeight="36.0" prefWidth="390.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="login-field" />
</styleClass>
</TextField>
<PasswordField fx:id="passwordField" layoutX="119.0" layoutY="155.0" prefHeight="36.0" prefWidth="390.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-bold" />
<String fx:value="login-field" />
</styleClass>
</PasswordField>
<ImageView id="login-email-icon" fitHeight="35.0" fitWidth="35.0" layoutX="69.0" layoutY="94.0" pickOnBounds="true" preserveRatio="true" />
<ImageView id="login-pass-icon" fitHeight="35.0" fitWidth="35.0" layoutX="69.0" layoutY="153.0" pickOnBounds="true" preserveRatio="true" />
</children>
</AnchorPane>

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TreeView?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.web.HTMLEditor?>
<?import javafx.scene.web.WebView?>
<AnchorPane id="main-window-pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="674.0" prefWidth="1000.0" stylesheets="@../css/themeDefault.css" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fx:id="defaultMessageViewBG" fitHeight="376.0" fitWidth="376.0" layoutX="552.0" layoutY="149.0">
<image>
<Image url="@../img/EmailBackground-01.png" />
</image>
</ImageView>
<ImageView fitHeight="705.0" fitWidth="1000.0" layoutX="4.0" layoutY="-29.0" opacity="0.57" visible="false">
<image>
<Image url="@../img/EmailUIcompose.png" />
</image>
</ImageView>
<ImageView fitHeight="672.0" fitWidth="1200.0" layoutX="260.0" layoutY="287.0" visible="false" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
<image>
<Image url="@../img/EmailUI.png" />
</image>
</ImageView>
<AnchorPane id="message-pane" fx:id="messagePane" layoutX="492.0" layoutY="159.0" prefHeight="200.0" prefWidth="508.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="492.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label fx:id="messageDate" alignment="TOP_RIGHT" layoutX="340.0" layoutY="14.0" prefHeight="17.0" prefWidth="139.0" AnchorPane.rightAnchor="29.0" AnchorPane.topAnchor="14.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass>
</Label>
<Label id="message-title" fx:id="messageTitle" layoutX="17.0" layoutY="19.0" prefHeight="23.0" prefWidth="319.0" AnchorPane.leftAnchor="17.0" AnchorPane.topAnchor="19.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-bold" />
</styleClass>
</Label>
<Label fx:id="messageSenderName" layoutX="17.0" layoutY="43.0" prefHeight="17.0" prefWidth="302.0" AnchorPane.leftAnchor="17.0" AnchorPane.topAnchor="43.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass>
</Label>
<Button fx:id="decrypt" layoutX="230.0" layoutY="10.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="78.0" text="Decrypt" onAction="#decryptEmail"/>
<Button id="key-trash" layoutX="-183.0" layoutY="-591.0" mnemonicParsing="false" onAction="#trashKeyAction" prefHeight="25.0" prefWidth="25.0" stylesheets="@../css/themeDefault.css" AnchorPane.rightAnchor="-603.0" AnchorPane.topAnchor="-591.0" />
<Button id="key-star" layoutX="-209.0" layoutY="-591.0" mnemonicParsing="false" onAction="#starKeyAction" prefHeight="25.0" prefWidth="25.0" stylesheets="@../css/themeDefault.css" AnchorPane.rightAnchor="-577.0" AnchorPane.topAnchor="-591.0" />
<Line endX="336.5999755859375" layoutX="126.0" layoutY="79.0" startX="-99.4000244140625" strokeLineCap="ROUND" strokeWidth="2.0" styleClass="line" AnchorPane.leftAnchor="26.0" AnchorPane.rightAnchor="44.0" AnchorPane.topAnchor="78.0" />
<WebView id="message-long-view" fx:id="messageViewLong" layoutX="9.0" layoutY="86.0" prefHeight="579.0" prefWidth="489.0" AnchorPane.bottomAnchor="9.0" AnchorPane.leftAnchor="9.0" AnchorPane.rightAnchor="9.0" AnchorPane.topAnchor="86.0" />
<WebView id="message-long-view" fx:id="messageViewShort" layoutX="9.0" layoutY="88.0" prefHeight="427.0" prefWidth="489.0" AnchorPane.bottomAnchor="159.0" AnchorPane.leftAnchor="9.0" AnchorPane.rightAnchor="9.0" AnchorPane.topAnchor="88.0" />
<Line fx:id="footerDiv" endX="336.5999755859375" layoutX="126.0" layoutY="548.0" startX="-99.4000244140625" strokeLineCap="ROUND" strokeWidth="2.0" styleClass="line" visible="false" AnchorPane.bottomAnchor="125.0" AnchorPane.leftAnchor="26.0" AnchorPane.rightAnchor="44.0" />
<Label id="attachments-label" fx:id="messageAttachmentLabel" layoutX="24.0" layoutY="523.0" prefHeight="17.0" prefWidth="116.0" text="ATTACHMENTS" visible="false" AnchorPane.bottomAnchor="134.0" AnchorPane.leftAnchor="24.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass>
</Label>
<ListView id="attachment-list" fx:id="attachmentList" layoutY="555.0" orientation="HORIZONTAL" prefHeight="111.0" prefWidth="508.0" visible="false" AnchorPane.bottomAnchor="8.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
</children>
</AnchorPane>
<AnchorPane id="composer-pane" fx:id="composePane" layoutX="492.0" layoutY="159.0" prefHeight="200.0" prefWidth="508.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="492.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<HTMLEditor id="editor" fx:id="htmlEditor" htmlText="&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body contenteditable=&quot;true&quot;&gt;&lt;/body&gt;&lt;/html&gt;" layoutY="86.0" prefHeight="518.0" prefWidth="508.0" AnchorPane.bottomAnchor="70.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="86.0" />
<TextField id="field-send-to" fx:id="composeTo" layoutX="20.0" layoutY="13.0" prefHeight="26.0" prefWidth="469.0" promptText="to:" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="13.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass></TextField>
<TextField id="field-title" fx:id="composeTitle" layoutX="20.0" layoutY="50.0" prefHeight="26.0" prefWidth="469.0" promptText="title:" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="50.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-grey" />
</styleClass></TextField>
<ImageView fitHeight="41.0" fitWidth="148.0" layoutX="340.0" layoutY="619.0" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="20.0">
<image>
<Image url="@../img/default/idle/composer-tools-box.png" />
</image>
</ImageView>
<Button id="send-key" layoutX="245.00000000000006" layoutY="428.00000000000006" mnemonicParsing="false" onAction="#composeSendPressed" prefHeight="45.0" prefWidth="45.0" stylesheets="@../css/themeDefault.css" AnchorPane.bottomAnchor="-179.20000000000005" AnchorPane.rightAnchor="-170.20000000000005" />
<Button id="attach-key" layoutX="183.00000000000006" layoutY="427.00000000000006" mnemonicParsing="false" onAction="#addAttachment" prefHeight="30.0" prefWidth="30.0" stylesheets="@../css/themeDefault.css" AnchorPane.bottomAnchor="-178.20000000000005" AnchorPane.rightAnchor="-108.20000000000005" />
<Button id="compose-cancel-key" layoutX="148.00000000000006" layoutY="427.00000000000006" mnemonicParsing="false" onAction="#composeCancel" prefHeight="30.0" prefWidth="30.0" stylesheets="@../css/themeDefault.css" AnchorPane.bottomAnchor="-178.20000000000005" AnchorPane.rightAnchor="-73.20000000000005" />
<ImageView id="compose-attached-icon" fx:id="composeAttachIcon" fitHeight="45.0" fitWidth="45.0" layoutX="10.0" layoutY="614.0" pickOnBounds="true" preserveRatio="true" visible="false" AnchorPane.bottomAnchor="15.0" AnchorPane.leftAnchor="10.0" />
<Line fx:id="footerDiv1" endX="336.5999755859375" layoutX="135.0" layoutY="604.0" startX="-99.4000244140625" strokeLineCap="ROUND" strokeWidth="2.0" styleClass="line" AnchorPane.bottomAnchor="69.0" AnchorPane.rightAnchor="35.0" />
</children>
</AnchorPane>
<AnchorPane id="account-pane" layoutY="474.0" prefHeight="70.0" prefWidth="190.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0">
<children>
<Label fx:id="userNameLabel" layoutX="8.0" layoutY="14.0" prefHeight="17.0" prefWidth="165.0">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-bold" />
<String fx:value="font-white" />
</styleClass>
</Label>
</children>
</AnchorPane>
<AnchorPane>
</AnchorPane>
<AnchorPane id="settings-pane" layoutX="-13.0" layoutY="-1.0" minHeight="-Infinity" minWidth="-Infinity" prefHeight="32.0" prefWidth="492.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<TextField id="search-bar" focusTraversable="false" layoutX="226.0" layoutY="3.0" prefHeight="25.0" prefWidth="232.0">
<padding>
<Insets left="20.0" />
</padding></TextField>
<Button id="settings-key" layoutX="462.0" layoutY="9.0" mnemonicParsing="false" prefHeight="390.0" prefWidth="0.0" />
<ImageView fitHeight="14.0" fitWidth="14.0" layoutX="230.0" layoutY="9.0">
<image>
<Image url="@../img/default/idle/search-icon.png" />
</image>
</ImageView>
<VBox prefHeight="200.0" prefWidth="100.0" />
</children></AnchorPane>
<TreeView id="folder-view" fx:id="folderSelection" layoutY="113.0" prefHeight="491.0" prefWidth="190.0" AnchorPane.bottomAnchor="70.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="113.0">
<styleClass>
<String fx:value="font-myriad" />
<String fx:value="font-white" />
</styleClass></TreeView>
<ListView id="email-cell-view" fx:id="emailSelection" focusTraversable="false" layoutX="190.0" prefHeight="674.0" prefWidth="302.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="190.0" AnchorPane.topAnchor="30.0" />
<Pane id="compose-key-pane" layoutY="30.0" prefHeight="84.0" prefWidth="190.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="30.0">
<children>
<Button id="compose-key" layoutX="23.0" layoutY="23.0" mnemonicParsing="false" onAction="#composeKeyPressed" prefHeight="38.0" prefWidth="139.0" text="COMPOSE">
<styleClass>
<String fx:value="font-rockwell" />
<String fx:value="font-bold" />
<String fx:value="font-white" />
</styleClass></Button>
</children>
</Pane>
<Button layoutX="62.0" layoutY="512.0" mnemonicParsing="false" onAction="#openCRUDWindow" opacity="0.72" text="Enter Key" textFill="#373d04" />
</children>
</AnchorPane>