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.ControlListener
Abstract class that contains code for the FocusLost, FocusGained and ControlResized events
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.swt.widgets.Control
control
protected static java.lang.String
EMPTY_STRING
private boolean
firstDraw
private org.eclipse.swt.graphics.Color
initialBackgroundColor
private org.eclipse.swt.graphics.Font
initialFont
private org.eclipse.swt.graphics.Color
initialForegroundColor
-
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 void
applyBackgroundColor()
Apply the background color for the promptprivate void
applyFontStyle()
Apply the font style to the promptprivate void
applyForegroundColor()
Apply the foreground color for the promptprivate void
applyInitialLook()
Apply the initial look of the widgetvoid
controlMoved(org.eclipse.swt.events.ControlEvent e)
void
controlResized(org.eclipse.swt.events.ControlEvent e)
protected 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"protected abstract boolean
isFilled()
private void
storeInitialLook()
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:
focusGained
in 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:
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
-
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:
controlMoved
in 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:
controlResized
in 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
-
-