Class BaseFocusControlListener
- java.lang.Object
-
- org.eclipse.nebula.widgets.opal.promptsupport.BaseFocusControlListener
-
- All Implemented Interfaces:
java.util.EventListener,org.eclipse.swt.events.ControlListener,org.eclipse.swt.events.FocusListener,org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
CComboFocusControlListener,ComboFocusControlListener,StyledTextFocusControlListener,TextFocusControlListener
abstract class BaseFocusControlListener extends java.lang.Object implements org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.ControlListenerAbstract class that contains code for the FocusLost, FocusGained and ControlResized events
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.swt.widgets.Controlcontrolprotected static java.lang.StringEMPTY_STRINGprivate booleanfirstDrawprivate org.eclipse.swt.graphics.ColorinitialBackgroundColorprivate org.eclipse.swt.graphics.FontinitialFontprivate org.eclipse.swt.graphics.ColorinitialForegroundColor
-
Constructor Summary
Constructors Constructor Description BaseFocusControlListener(org.eclipse.swt.widgets.Control control)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidapplyBackgroundColor()Apply the background color for the promptprivate voidapplyFontStyle()Apply the font style to the promptprivate voidapplyForegroundColor()Apply the foreground color for the promptprivate voidapplyInitialLook()Apply the initial look of the widgetvoidcontrolMoved(org.eclipse.swt.events.ControlEvent e)voidcontrolResized(org.eclipse.swt.events.ControlEvent e)protected abstract voidfillPromptText()Fill the prompt textvoidfocusGained(org.eclipse.swt.events.FocusEvent e)voidfocusLost(org.eclipse.swt.events.FocusEvent e)protected abstract voidhidePrompt()Code when the focus behiaviour is "Hide"protected abstract voidhighLightPrompt()Code when the focus behiaviour is "Highlight"protected abstract booleanisFilled()private voidstoreInitialLook()Store the initial look of the widget
-
-
-
Field Detail
-
control
protected org.eclipse.swt.widgets.Control control
-
firstDraw
private boolean firstDraw
-
initialFont
private org.eclipse.swt.graphics.Font initialFont
-
initialBackgroundColor
private org.eclipse.swt.graphics.Color initialBackgroundColor
-
initialForegroundColor
private org.eclipse.swt.graphics.Color initialForegroundColor
-
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
focusGained
public void focusGained(org.eclipse.swt.events.FocusEvent e)
- Specified by:
focusGainedin interfaceorg.eclipse.swt.events.FocusListener- See Also:
FocusListener.focusGained(org.eclipse.swt.events.FocusEvent)
-
applyInitialLook
private void applyInitialLook()
Apply the initial look of the widget
-
hidePrompt
protected abstract void hidePrompt()
Code when the focus behiaviour is "Hide"
-
highLightPrompt
protected abstract void highLightPrompt()
Code when the focus behiaviour is "Highlight"
-
focusLost
public void focusLost(org.eclipse.swt.events.FocusEvent e)
- Specified by:
focusLostin interfaceorg.eclipse.swt.events.FocusListener- See Also:
FocusListener.focusLost(org.eclipse.swt.events.FocusEvent)
-
isFilled
protected abstract boolean isFilled()
- Returns:
trueif the widget is filled,falseotherwise
-
applyForegroundColor
private void applyForegroundColor()
Apply the foreground color for the prompt
-
applyBackgroundColor
private void applyBackgroundColor()
Apply the background color for the prompt
-
applyFontStyle
private void applyFontStyle()
Apply the font style to the prompt
-
fillPromptText
protected abstract void fillPromptText()
Fill the prompt text
-
controlMoved
public void controlMoved(org.eclipse.swt.events.ControlEvent e)
- Specified by:
controlMovedin interfaceorg.eclipse.swt.events.ControlListener- See Also:
ControlListener.controlMoved(org.eclipse.swt.events.ControlEvent)
-
controlResized
public void controlResized(org.eclipse.swt.events.ControlEvent e)
- Specified by:
controlResizedin interfaceorg.eclipse.swt.events.ControlListener- See Also:
ControlListener.controlResized(org.eclipse.swt.events.ControlEvent)
-
storeInitialLook
private void storeInitialLook()
Store the initial look of the widget
-
-