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 widget
    protected void applyPromptLook()
    Apply the prompt look of the widget
    protected abstract void fillPromptText()
    Fill the prompt text
    void 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 control
    protected abstract boolean isFilled()  
    protected void storeInitialLook()
    Store the initial look of the widget

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 interface org.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 interface org.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