Removes call icon from call conference and call transfer search fields.

cusax-fix
Yana Stamcheva 14 years ago
parent d3afc76a3a
commit 173b96c6e5

@ -184,7 +184,9 @@ public MainFrame()
this.accountStatusPanel = new AccountStatusPanel(this);
this.searchField = new SearchField(this, TreeContactList.searchFilter);
this.searchField = new SearchField( this,
TreeContactList.searchFilter,
true);
menu = new MainMenu(this);

@ -66,11 +66,13 @@ public class SearchField
* Creates the <tt>SearchField</tt>.
*
* @param frame the main application window
* @param contactList the contact list, which we're searching
* @param searchFilter the filter to apply on search
* @param isCallButtonEnabled indicates if the call button should be
* enabled in this search field
*/
public SearchField( MainFrame frame,
ContactListSearchFilter searchFilter)
ContactListSearchFilter searchFilter,
boolean isCallButtonEnabled)
{
super(GuiActivator.getResources()
.getI18NString("service.gui.ENTER_NAME_OR_NUMBER"));
@ -79,7 +81,10 @@ public SearchField( MainFrame frame,
this.searchFilter = searchFilter;
if(getUI() instanceof SearchFieldUI)
{
((SearchFieldUI)getUI()).setDeleteButtonEnabled(true);
((SearchFieldUI)getUI()).setCallButtonEnabled(isCallButtonEnabled);
}
this.setBorder(null);
this.setOpaque(false);

@ -89,6 +89,16 @@ public SearchFieldUI()
loadSkin();
}
/**
* Enables/disabled the call button in the search field.
*
* @param isEnabled indicates if the call button is enabled
*/
public void setCallButtonEnabled(boolean isEnabled)
{
this.isCallButtonEnabled = isEnabled;
}
/**
* Implements parent paintSafely method and enables antialiasing.
* @param g the <tt>Graphics</tt> object that notified us
@ -138,7 +148,6 @@ protected void customPaintBackground(Graphics g)
}
else
isCallIconVisible = false;
}
finally
{

@ -143,7 +143,7 @@ public InviteDialog (String title)
srcContactList.setDefaultFilter(inviteFilter);
searchField = new SearchField(null, inviteFilter);
searchField = new SearchField(null, inviteFilter, false);
searchField.setPreferredSize(new Dimension(200, 25));
searchField.setContactList(srcContactList);
searchField.addFocusListener(new FocusAdapter()

@ -105,7 +105,7 @@ public OneChoiceInviteDialog (String title)
contactList.setDefaultFilter(inviteFilter);
searchField = new SearchField(null, inviteFilter);
searchField = new SearchField(null, inviteFilter, false);
searchField.setPreferredSize(new Dimension(200, 25));
searchField.setContactList(contactList);
searchField.addFocusListener(new FocusAdapter()

Loading…
Cancel
Save