Class DelegatingEditActionHandlerFocusAdapter
- java.lang.Object
-
- java.awt.event.FocusAdapter
-
- com.inductiveautomation.ignition.designer.model.DelegatingEditActionHandlerFocusAdapter
-
- All Implemented Interfaces:
java.awt.event.FocusListener,java.util.EventListener
public class DelegatingEditActionHandlerFocusAdapter extends java.awt.event.FocusAdapterAFocusAdapterwhich sets the injectedDelegatingEditActionHandler'sdelegate to the injectedEditActionHandlerdelegate when the target gains focus. When the target loses focus, theDelegatingEditActionHandler'sdelegate is set to null only if its delegate is still set to the injected delegate and if the component that the target lost focus to descends from the injected parentComponent(since focus could be on the Designer's edit menu bar, in this case the edit action delegation chain will not break).- See Also:
SwingUtilities.isDescendingFrom(Component, Component)
-
-
Constructor Summary
Constructors Constructor Description DelegatingEditActionHandlerFocusAdapter(java.awt.Component parent, DelegatingEditActionHandler delegator, EditActionHandler delegate)Constructor for injecting the parent, delegator, and delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfocusGained(java.awt.event.FocusEvent e)voidfocusLost(java.awt.event.FocusEvent e)
-
-
-
Constructor Detail
-
DelegatingEditActionHandlerFocusAdapter
public DelegatingEditActionHandlerFocusAdapter(java.awt.Component parent, DelegatingEditActionHandler delegator, EditActionHandler delegate) throws java.lang.NullPointerExceptionConstructor for injecting the parent, delegator, and delegate.- Parameters:
parent- The parentComponentdelegator- The delegatordelegate- The delegate to whom the delegator will delegate handling of edit actions- Throws:
java.lang.NullPointerException- when parent or delegator is null
-
-
Method Detail
-
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGainedin interfacejava.awt.event.FocusListener- Overrides:
focusGainedin classjava.awt.event.FocusAdapter
-
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLostin interfacejava.awt.event.FocusListener- Overrides:
focusLostin classjava.awt.event.FocusAdapter
-
-