Class BaseFocusControlListener<T extends org.eclipse.swt.widgets.Control>
java.lang.Object
org.eclipse.nebula.widgets.opal.promptsupport.BaseFocusControlListener<T>
- All Implemented Interfaces:
java.util.EventListener
,org.eclipse.swt.events.FocusListener
,org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
CComboFocusControlListener
,ComboFocusControlListener
,StyledTextFocusControlListener
,TextFocusControlListener
abstract class BaseFocusControlListener<T extends org.eclipse.swt.widgets.Control>
extends java.lang.Object
implements org.eclipse.swt.events.FocusListener
Abstract class that contains code for the FocusLost, FocusGained and
ControlResized events
-
Field Summary
Fields Modifier and Type Field Description protected T
control
protected static java.lang.String
EMPTY_STRING
-
Constructor Summary
Constructors Constructor Description BaseFocusControlListener(T control)
Constructor -
Method Summary
Modifier and Type Method Description protected void
applyInitialLook()
Apply the initial look of the widgetprotected void
applyPromptLook()
Apply the prompt look of the widgetprotected abstract void
fillPromptText()
Fill the prompt textvoid
focusGained(org.eclipse.swt.events.FocusEvent e)
void
focusLost(org.eclipse.swt.events.FocusEvent e)
protected abstract void
hidePrompt()
Code when the focus behiaviour is "Hide"protected abstract void
highLightPrompt()
Code when the focus behiaviour is "Highlight"(package private) void
hookControl()
Attach listeners to the controlprotected abstract boolean
isFilled()
protected void
storeInitialLook()
Store the initial look of the widget
-
Field Details
-
control
-
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING- See Also:
- Constant Field Values
-
-
Constructor Details
-
BaseFocusControlListener
BaseFocusControlListener(T control)Constructor- Parameters:
control
- control on which this listener will be attached
-
-
Method Details
-
focusGained
public void focusGained(org.eclipse.swt.events.FocusEvent e)- Specified by:
focusGained
in interfaceorg.eclipse.swt.events.FocusListener
- See Also:
FocusListener.focusGained(org.eclipse.swt.events.FocusEvent)
-
applyInitialLook
protected void applyInitialLook()Apply the initial look of the widget -
applyPromptLook
protected void applyPromptLook()Apply the prompt 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:
focusLost
in interfaceorg.eclipse.swt.events.FocusListener
- See Also:
FocusListener.focusLost(org.eclipse.swt.events.FocusEvent)
-
isFilled
protected abstract boolean isFilled()- Returns:
true
if the widget is filled,false
otherwise
-
fillPromptText
protected abstract void fillPromptText()Fill the prompt text -
storeInitialLook
protected void storeInitialLook()Store the initial look of the widget -
hookControl
void hookControl()Attach listeners to the control
-