SMS message received interface.

cusax-fix
Yana Stamcheva 19 years ago
parent ab0523c30b
commit 2d8930efbb

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45.1"
sodipodi:docbase="/home/yana/workspace/NewProject/resources/images/impl/gui/common/src"
sodipodi:docname="gsm.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.7501663"
inkscape:cx="170.97208"
inkscape:cy="572.94653"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1432"
inkscape:window-height="843"
inkscape:window-x="0"
inkscape:window-y="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#5d5d5d;stroke-width:0.21988384;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect9068"
width="1.5795845"
height="4.3504252"
x="161.46323"
y="471.54114"
rx="1.5"
ry="1.5"
inkscape:export-filename="/home/yana/workspace/NewProject/resources/images/impl/gui/common/gsm.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#d2d5e8;fill-opacity:1;stroke:#000000;stroke-width:0.37483144;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2162"
width="8.1949053"
height="13.15696"
x="154.86119"
y="474.08682"
rx="1.5"
ry="1.5"
inkscape:export-filename="/home/yana/workspace/NewProject/resources/images/impl/gui/common/gsm.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.23416792;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4147"
width="5.9918089"
height="4.3417587"
x="155.97798"
y="475.02893"
rx="1.5"
ry="1.5"
inkscape:export-filename="/home/yana/workspace/NewProject/resources/images/impl/gui/common/gsm.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<g
id="g11009"
transform="matrix(0.9186391,0,0,0.9640044,12.931138,17.034351)"
inkscape:export-filename="/home/yana/workspace/NewProject/resources/images/impl/gui/common/gsm.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<rect
ry="5.1866984"
rx="5.4428334"
y="480.44638"
x="155.34554"
height="1.3017812"
width="2.0054467"
id="rect5118"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="480.4288"
x="157.9315"
height="1.3017812"
width="2.0054467"
id="rect7058"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="480.4288"
x="160.49989"
height="1.3017812"
width="2.0054467"
id="rect7060"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="482.18796"
x="155.35434"
height="1.3017812"
width="2.0054467"
id="rect7062"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="482.20554"
x="157.94031"
height="1.3017812"
width="2.0054467"
id="rect7064"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="482.17035"
x="160.50868"
height="1.3017812"
width="2.0054467"
id="rect7066"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="483.91193"
x="155.35434"
height="1.3017812"
width="2.0054467"
id="rect7068"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="483.92953"
x="157.94031"
height="1.3017812"
width="2.0054467"
id="rect7070"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="483.89435"
x="160.50868"
height="1.3017812"
width="2.0054467"
id="rect7072"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="485.56555"
x="155.35434"
height="1.3017812"
width="2.0054467"
id="rect7074"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="485.58313"
x="157.94031"
height="1.3017812"
width="2.0054467"
id="rect7076"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="5.1866984"
rx="5.4428334"
y="485.54794"
x="160.50868"
height="1.3017812"
width="2.0054467"
id="rect7078"
style="opacity:1;fill:#111111;fill-opacity:0.94117647;stroke:#5d5d5d;stroke-width:0.18664756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
id="text7080"
y="481.43152"
x="156.08438"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="481.43152"
x="156.08438"
id="tspan7082"
sodipodi:role="line">1</tspan></text>
<text
id="text8053"
y="481.37106"
x="158.64136"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="481.37106"
x="158.64136"
id="tspan8055"
sodipodi:role="line">2</tspan></text>
<text
id="text8057"
y="481.39633"
x="161.22115"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="481.39633"
x="161.22115"
id="tspan8059"
sodipodi:role="line">3</tspan></text>
<text
id="text9030"
y="483.12033"
x="156.01402"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="483.12033"
x="156.01402"
id="tspan9032"
sodipodi:role="line">4</tspan></text>
<text
id="text9034"
y="483.15549"
x="158.61758"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="483.15549"
x="158.61758"
id="tspan9036"
sodipodi:role="line">5</tspan></text>
<text
id="text9038"
y="483.15906"
x="161.25739"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="483.15906"
x="161.25739"
id="tspan9040"
sodipodi:role="line">6</tspan></text>
<text
id="text9042"
y="484.88895"
x="156.0426"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="484.88895"
x="156.0426"
id="tspan9044"
sodipodi:role="line">7</tspan></text>
<text
id="text9046"
y="484.87949"
x="158.65276"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="484.87949"
x="158.65276"
id="tspan9048"
sodipodi:role="line">8</tspan></text>
<text
id="text9050"
y="484.81857"
x="161.25301"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="484.81857"
x="161.25301"
id="tspan9052"
sodipodi:role="line">9</tspan></text>
<text
id="text9056"
y="486.61295"
x="156.11931"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="486.61295"
x="156.11931"
id="tspan9058"
sodipodi:role="line">*</tspan></text>
<text
id="text9060"
y="486.53635"
x="158.67506"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="486.53635"
x="158.67506"
id="tspan9062"
sodipodi:role="line">0</tspan></text>
<text
id="text9064"
y="486.54257"
x="161.14746"
style="font-size:0.89590824px;font-style:normal;font-weight:normal;text-align:justify;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="486.54257"
x="161.14746"
id="tspan9066"
sodipodi:role="line">#</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

@ -283,6 +283,21 @@ public void addProtocolSupportedOperationSets(
.getChatRoomsList()
.addChatServer(protocolProvider, multiUserChat);
}
// Obtain the basic instant messaging operation set.
String smsOpSetClassName = OperationSetSmsMessaging.class.getName();
if (supportedOperationSets.containsKey(smsOpSetClassName))
{
OperationSetSmsMessaging smsOpSet
= (OperationSetSmsMessaging)
supportedOperationSets.get(smsOpSetClassName);
//Add to all instant messaging operation sets the Message
//listener implemented in the ContactListPanel, which handles
//all received messages.
smsOpSet.addMessageListener(getContactListPanel());
}
}
/**

@ -256,7 +256,7 @@ public String processMessage(String contactName, Date date,
+ msgHeaderID
+ "\" date=\""
+ msgDate + "\">";
endHeaderTag = "</h2>";
chatString += timeString + contactName + " at "
@ -264,6 +264,20 @@ public String processMessage(String contactName, Date date,
+ startPlainTextTag + formatMessage(message, contentType)
+ endPlainTextTag + endDivTag;
}
else if (messageType.equals(Constants.SMS_MESSAGE))
{
chatString = "<h2 identifier=\""
+ msgHeaderID
+ "\" date=\""
+ msgDate + "\">";
endHeaderTag = "</h2>";
chatString += "SMS: " + timeString + contactName + " at "
+ GuiUtils.formatTime(date) + endHeaderTag + startDivTag
+ startPlainTextTag + formatMessage(message, contentType)
+ endPlainTextTag + endDivTag;
}
else if (messageType.equals(Constants.OUTGOING_MESSAGE))
{
chatString = "<h3 identifier=\""

@ -111,7 +111,12 @@ public MetaContactChatPanel( ChatWindow chatWindow,
getChatSendPanel().getSendPanel().add(sendSmsCheckBox, 0);
if (protocolContact.getProtocolProvider()
.getOperationSet(OperationSetSmsMessaging.class) != null)
{
sendSmsCheckBox.setEnabled(true);
sendSmsCheckBox.setSelected(true);
}
else
sendSmsCheckBox.setEnabled(false);
//Enables to change the protocol provider by simply pressing the CTRL-P
//key combination

@ -311,6 +311,10 @@ else if(eventType == MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED)
{
messageType = Constants.SYSTEM_MESSAGE;
}
else if(eventType == MessageReceivedEvent.SMS_MESSAGE_RECEIVED)
{
messageType = Constants.SMS_MESSAGE;
}
chatPanel.processMessage(protocolContact.getDisplayName(), date,
messageType, message.getContent(),
@ -318,17 +322,17 @@ else if(eventType == MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED)
// Opens the chat panel with the new message.
chatWindowManager.openChat(chatPanel, false);
// Fire notification
String title = Messages.getI18NString("msgReceived",
new String[]{evt.getSourceContact().getDisplayName()}).getText();
NotificationManager.fireChatNotification(
protocolContact,
NotificationManager.INCOMING_MESSAGE,
title,
message.getContent());
chatPanel.treatReceivedMessage(protocolContact);
}
else

@ -108,6 +108,11 @@ public class Constants
*/
public static final String SYSTEM_MESSAGE = "SystemMessage";
/**
* The message type representing sms messages.
*/
public static final String SMS_MESSAGE = "SmsMessage";
/**
* The message type representing error messages.
*/

Loading…
Cancel
Save