mouse over a hyperlink shows the href of the link in the bottom status panel of the chat

cusax-fix
Yana Stamcheva 20 years ago
parent 94ee1be3b2
commit d2a64d79ba

@ -375,8 +375,8 @@ public void requestFocusInWriteArea(){
/**
* Sets the current contact typing status.
*/
public void setContactTypingStatus(String statusMessage){
this.sendPanel.setTypingStatus(statusMessage);
public void setChatStatus(String statusMessage){
this.sendPanel.setChatStatus(statusMessage);
}
/**
@ -471,4 +471,11 @@ public void sendMessage(){
sendButton.requestFocus();
sendButton.doClick();
}
/**
* Moves the caret to the end of the conversation panel.
*/
public void setCaretToEnd(){
this.conversationPanel.setCarretToEnd();
}
}

@ -24,11 +24,13 @@
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import net.java.sip.communicator.impl.gui.main.customcontrols.SIPCommSelectorBox;
import net.java.sip.communicator.impl.gui.main.i18n.Messages;
import net.java.sip.communicator.impl.gui.utils.AntialiasingManager;
import net.java.sip.communicator.impl.gui.utils.Constants;
import net.java.sip.communicator.impl.gui.utils.StringUtils;
import net.java.sip.communicator.service.contactlist.MetaContact;
import net.java.sip.communicator.service.protocol.Contact;
import net.java.sip.communicator.service.protocol.Message;
@ -100,7 +102,7 @@ public void paint(Graphics g) {
}
/**
* Defines actions when send buttons is pressed.
* Defines actions when send button is pressed.
* @param e The ActionEvent object.
*/
public void actionPerformed(ActionEvent e) {
@ -135,7 +137,10 @@ public void actionPerformed(ActionEvent e) {
}
}
/**
* Returns the send button.
* @return The send button.
*/
public JButton getSendButton() {
return sendButton;
}
@ -158,7 +163,29 @@ public void addProtocolContacts(MetaContact metaContact) {
}
}
public void setTypingStatus(String statusMessage) {
/**
* Sets a text to the status panel at the bottom of the chat window.
*
* @param statusMessage The text to be displayed.
*/
public void setChatStatus(String statusMessage) {
int stringWidth = StringUtils
.getStringWidth(statusLabel, statusMessage);
while (stringWidth > statusPanel.getWidth() - 10) {
if (statusMessage.endsWith("...")) {
statusMessage = statusMessage
.substring(0, statusMessage.indexOf("...") - 1)
.concat("...");
}
else {
statusMessage = statusMessage
.substring(0, statusMessage.length() - 3)
.concat("...");
}
stringWidth = StringUtils
.getStringWidth(statusLabel, statusMessage);
}
statusLabel.setText(statusMessage);
}

Loading…
Cancel
Save