public class SearchFieldUI extends SIPCommTextFieldUI implements Skinnable
Modifier and Type | Field and Description |
---|---|
protected boolean |
isCallIconVisible
Indicates if the call icon is currently visible.
|
protected boolean |
isSMSIconVisible
Indicates if the sms icon is currently visible.
|
BUTTON_GAP, deleteButton, isDeleteMouseOver, isDeleteMousePressed
Constructor and Description |
---|
SearchFieldUI()
Creates a GenericSearchFieldUI.
|
Modifier and Type | Method and Description |
---|---|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Creates a UI for a SearchFieldUI.
|
protected void |
customPaintBackground(java.awt.Graphics g)
Paints the background of the associated component.
|
protected java.awt.Rectangle |
getCallButtonRect()
Calculates the call button rectangle.
|
protected java.awt.Rectangle |
getSMSButtonRect()
Calculates the sms button rectangle.
|
protected java.awt.Rectangle |
getVisibleEditorRect()
If we are in the case of disabled delete button, we simply call the
parent implementation of this method, otherwise we recalculate the editor
rectangle in order to leave place for the delete button.
|
void |
loadSkin()
Reloads UI icons.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Updates the call button when the mouse was clicked.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Updates the delete icon when the mouse is dragged over.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Updates the call button when the mouse is enters the component area.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Updates the call button when the mouse exits the component area.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Updates the delete icon when the mouse is moved over.
|
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
protected void |
paintSafely(java.awt.Graphics g)
Implements parent paintSafely method and enables antialiasing.
|
void |
setCallButtonEnabled(boolean isEnabled)
Enables/disabled the call button in the search field.
|
void |
setSMSButtonEnabled(boolean isEnabled)
Enables/disabled the sms button in the search field.
|
protected void |
updateIcon(java.awt.event.MouseEvent evt)
Updates the delete icon, changes the cursor and deletes the content of
the associated text component when the mouse is pressed over the delete
icon.
|
getDeleteButtonRect, installListeners, isDeleteButtonEnabled, setBgBorderEndColor, setBgBorderStartColor, setBgEndColor, setBgStartColor, setDeleteButtonEnabled, uninstallListeners, updateDeleteIcon
create, getBaseline, getBaselineResizeBehavior, getPropertyPrefix
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, installDefaults, installKeyboardActions, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, setView, uninstallDefaults, uninstallKeyboardActions, uninstallUI, update, viewToModel, viewToModel
protected boolean isCallIconVisible
protected boolean isSMSIconVisible
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
c
- the text fieldprotected void customPaintBackground(java.awt.Graphics g)
customPaintBackground
in class SIPCommTextFieldUI
g
- the Graphics object used for paintingprotected java.awt.Rectangle getCallButtonRect()
protected java.awt.Rectangle getSMSButtonRect()
protected java.awt.Rectangle getVisibleEditorRect()
getVisibleEditorRect
in class SIPCommTextFieldUI
public void loadSkin()
loadSkin
in interface Skinnable
loadSkin
in class SIPCommTextFieldUI
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class SIPCommTextFieldUI
e
- the MouseEvent that notified us of the clickpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class SIPCommTextFieldUI
e
- the MouseEvent that notified uspublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
mouseEntered
in class SIPCommTextFieldUI
e
- the MouseEvent that notified uspublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class SIPCommTextFieldUI
e
- the MouseEvent that notified uspublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class SIPCommTextFieldUI
e
- the MouseEvent that notified uspublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class SIPCommTextFieldUI
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class SIPCommTextFieldUI
protected void paintSafely(java.awt.Graphics g)
paintSafely
in class javax.swing.plaf.basic.BasicTextUI
g
- the Graphics object that notified uspublic void setCallButtonEnabled(boolean isEnabled)
isEnabled
- indicates if the call button is enabledpublic void setSMSButtonEnabled(boolean isEnabled)
isEnabled
- indicates if the sms button is enabledprotected void updateIcon(java.awt.event.MouseEvent evt)
evt
- the mouse event that has prompted us to update the delete
icon.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.