|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
javax.swing.plaf.basic.BasicTextUI
javax.swing.plaf.basic.BasicTextFieldUI
javax.swing.plaf.metal.MetalTextFieldUI
net.java.sip.communicator.util.swing.plaf.SIPCommTextFieldUI
public class SIPCommTextFieldUI
SIPCommTextFieldUI implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI |
|---|
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter |
| Field Summary | |
|---|---|
protected static int |
BUTTON_GAP
The gap between the delete button and the text in the field. |
protected SIPCommButton |
deleteButton
The delete text button shown on the right of the field. |
protected boolean |
isDeleteMouseOver
Indicates if the mouse is currently over the delete button. |
| Constructor Summary | |
|---|---|
SIPCommTextFieldUI()
Creates a SIPCommTextFieldUI. |
|
| Method Summary | |
|---|---|
static ComponentUI |
createUI(JComponent c)
Creates a UI for a SIPCommTextFieldUI. |
protected void |
customPaintBackground(Graphics g)
Paints the background of the associated component. |
protected Rectangle |
getDeleteButtonRect()
Calculates the delete button rectangle. |
protected 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. |
protected void |
installListeners()
Adds the custom mouse listeners defined in this class to the installed listeners. |
boolean |
isDeleteButtonEnabled()
Returns true if the delete buttons is enabled and false -
otherwise. |
void |
loadSkin()
Reloads skin information. |
void |
mouseClicked(MouseEvent e)
Updates the delete icon when the mouse was clicked. |
void |
mouseDragged(MouseEvent e)
Updates the delete icon when the mouse is dragged over. |
void |
mouseEntered(MouseEvent e)
Updates the delete icon when the mouse is enters the component area. |
void |
mouseExited(MouseEvent e)
Updates the delete icon when the mouse exits the component area. |
void |
mouseMoved(MouseEvent e)
Updates the delete icon when the mouse is moved over. |
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
setBgBorderEndColor(Color bgBorderEndColor)
|
void |
setBgBorderStartColor(Color bgBorderStartColor)
|
void |
setBgEndColor(Color bgEndColor)
|
void |
setBgStartColor(Color bgStartColor)
|
void |
setDeleteButtonEnabled(boolean isDeleteButtonEnabled)
Updates the isDeleteButtonEnabled field. |
protected void |
uninstallListeners()
Uninstalls listeners for the UI. |
protected void |
updateDeleteIcon(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. |
| Methods inherited from class javax.swing.plaf.metal.MetalTextFieldUI |
|---|
propertyChange |
| Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI |
|---|
create, getBaseline, getBaselineResizeBehavior, getPropertyPrefix |
| Methods inherited from class javax.swing.plaf.basic.BasicTextUI |
|---|
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, installDefaults, installKeyboardActions, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallUI, update, viewToModel, viewToModel |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isDeleteMouseOver
protected static int BUTTON_GAP
protected SIPCommButton deleteButton
| Constructor Detail |
|---|
public SIPCommTextFieldUI()
| Method Detail |
|---|
public boolean isDeleteButtonEnabled()
true if the delete buttons is enabled and false -
otherwise.
true if the delete buttons is enabled and false -
otherwisepublic void setDeleteButtonEnabled(boolean isDeleteButtonEnabled)
isDeleteButtonEnabled - indicates if the delete buttons is enabled
or notprotected void installListeners()
installListeners in class BasicTextUIprotected void uninstallListeners()
uninstallListeners in class BasicTextUIprotected void customPaintBackground(Graphics g)
g - the Graphics object used for paintingprotected void updateDeleteIcon(MouseEvent evt)
evt - the mouse event that has prompted us to update the delete
icon.protected Rectangle getDeleteButtonRect()
protected Rectangle getVisibleEditorRect()
getVisibleEditorRect in class BasicTextUIpublic void setBgStartColor(Color bgStartColor)
bgStartColor - the bgStartColor to setpublic void setBgEndColor(Color bgEndColor)
bgEndColor - the bgEndColor to setpublic void setBgBorderStartColor(Color bgBorderStartColor)
bgBorderStartColor - the bgBorderStartColor to setpublic void setBgBorderEndColor(Color bgBorderEndColor)
bgBorderEndColor - the bgBorderEndColor to setpublic void loadSkin()
loadSkin in interface Skinnablepublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEvent that notified us of the clickpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - the MouseEvent that notified uspublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - the MouseEvent that notified uspublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - the MouseEvent that notified uspublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - the MouseEvent that notified uspublic static ComponentUI createUI(JComponent c)
c - the text field
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||