Skip to content

Commit

Permalink
immediately display new instant message when sent via button in header.
Browse files Browse the repository at this point in the history
close #2168
  • Loading branch information
j-dimension committed Nov 2, 2023
1 parent 4a5ae93 commit 292deb9
Show file tree
Hide file tree
Showing 32 changed files with 10,878 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,10 @@ private void toggleEventUi() {
}

}

public void triggerNewReviewAction() {
this.cmdNewReviewActionPerformed(null);
}

private void cmdNewReviewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdNewReviewActionPerformed
if (this.txtEventBeginDateField.getText().length() == 10) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,12 @@ public boolean isCellEditable(int row, int column) {
}
}

public void tblMailsMouseClicked() {
java.awt.event.MouseEvent me=new java.awt.event.MouseEvent(this.tblMails, -1, System.currentTimeMillis(), -1, -1, -1, 1, false, MouseEvent.BUTTON1);

this.tblMailsMouseClicked(me);
}

private void tblMailsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblMailsMouseClicked

int selected = this.tblMails.getSelectedRowCount();
Expand Down Expand Up @@ -2453,11 +2459,34 @@ private void displayMessage() {
}
}

CreateNewCasePanel cncp=new CreateNewCasePanel(this.getClass().getName());
Address[] senders = msgC.getMessage().getFrom();
AddressBean[] relevantAddresses=null;
String senderName="";
String senderAddress="";
if (senders != null) {
if (senders.length > 0) {
Address sender = senders[0];
if (sender instanceof javax.mail.internet.InternetAddress) {
relevantAddresses = ads.searchSimple(((javax.mail.internet.InternetAddress) sender).getAddress());
senderName=((javax.mail.internet.InternetAddress) sender).getPersonal();
if(senderName==null)
senderName="";
senderAddress=((javax.mail.internet.InternetAddress) sender).getAddress();
if(senderAddress==null)
senderAddress="";
}

}
}
body=this.mailContentUI.getBody();
if(this.mailContentUI.getContentType()!=null && this.mailContentUI.getContentType().toLowerCase().contains("html")) {
body=EmailUtils.Html2Text(this.mailContentUI.getBody());
}

CreateNewCasePanel cncp=new CreateNewCasePanel(this.getClass().getName(), this, relevantAddresses, msgC.getMessage().getSubject(), body, senderName, senderAddress);
actionPanelEntries.add(cncp);

ArrayList<ArchiveFileBean> addressRelatedCases=new ArrayList<>();
Address[] senders = msgC.getMessage().getFrom();
if (senders != null) {
if (senders.length > 0) {
Address sender = senders[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="btnGrpDuplex">
</Component>
<Component class="javax.swing.ButtonGroup" name="btnGrpColor">
</Component>
</NonVisualComponents>
<Properties>
<Property name="name" type="java.lang.String" value="Kalendereintrag erstellen" noResource="true"/>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
<Component id="newEventPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel1" pref="876" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="chkCreateEvent" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="lblStatus" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="chkCreateEvent" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblStatus" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="newEventPanel1" pref="599" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="99" green="99" red="99" type="rgb"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&lt;p&gt;Wiedervorlage erstellen&lt;/html&gt;"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder roundedCorners="true"/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="com.jdimension.jlawyer.client.editors.files.NewEventPanel" name="newEventPanel1">
</Component>
<Component class="javax.swing.JCheckBox" name="chkCreateEvent">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Kalendereintrag erstellen"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblStatus">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true">
<Font bold="true" component="lblStatus" property="font" relativeSize="true" size="0"/>
</FontInfo>
</Property>
<Property name="text" type="java.lang.String" value=" "/>
</Properties>
</Component>
</SubComponents>
</Form>
Loading

0 comments on commit 292deb9

Please sign in to comment.