com.aptana.ide.ui.editors.preferences.formatter
Class ModifyDialogTabPage.DefaultFocusManager

java.lang.Object
  extended by org.eclipse.swt.events.FocusAdapter
      extended by com.aptana.ide.ui.editors.preferences.formatter.ModifyDialogTabPage.DefaultFocusManager
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.internal.SWTEventListener
Enclosing class:
ModifyDialogTabPage

protected static final class ModifyDialogTabPage.DefaultFocusManager
extends org.eclipse.swt.events.FocusAdapter

This class provides the default way to preserve and re-establish the focus over multiple modify sessions. Each ModifyDialogTabPage has its own instance, and it should add all relevant controls upon creation, always in the same sequence. This established a mapping of controls to indexes, which allows to restore the focus in a later session. The index is saved in the dialog settings, and there is only one common preference for all tab pages. It is always the currently active tab page which stores its focus index.


Constructor Summary
ModifyDialogTabPage.DefaultFocusManager()
           
 
Method Summary
 void add(org.eclipse.swt.widgets.Control control)
           
 void add(ModifyDialogTabPage.Preference preference)
           
 void focusGained(org.eclipse.swt.events.FocusEvent e)
           
 boolean isUsed()
           
 void resetFocus()
           
 void restoreFocus()
           
 
Methods inherited from class org.eclipse.swt.events.FocusAdapter
focusLost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyDialogTabPage.DefaultFocusManager

public ModifyDialogTabPage.DefaultFocusManager()
Method Detail

focusGained

public void focusGained(org.eclipse.swt.events.FocusEvent e)
Specified by:
focusGained in interface org.eclipse.swt.events.FocusListener
Overrides:
focusGained in class org.eclipse.swt.events.FocusAdapter
See Also:
FocusAdapter.focusGained(org.eclipse.swt.events.FocusEvent)

add

public void add(org.eclipse.swt.widgets.Control control)
Parameters:
control -

add

public void add(ModifyDialogTabPage.Preference preference)
Parameters:
preference -

isUsed

public boolean isUsed()
Returns:
is used

restoreFocus

public void restoreFocus()

resetFocus

public void resetFocus()