public void updateShownOptions ( boolean showModeSwitch , boolean showAddKeyOption ) { if ( showModeSwitch != m_showModeSwitch ) { m_upperLeftComponent . removeAllComponents ( ) ; m_upperLeftComponent . addComponent ( m_languageSwitch ) ; if ( showModeSwitch ) { m_upperLeftComponent . addComponent ( m_modeSwitch ) ; } m_upperLeftComponent . addComponent ( m_filePathLabel ) ; m_showModeSwitch = showModeSwitch ; } if ( showAddKeyOption != m_showAddKeyOption ) { if ( showAddKeyOption ) { m_optionsComponent . addComponent ( m_lowerLeftComponent , 0 , 1 ) ; m_optionsComponent . addComponent ( m_lowerRightComponent , 1 , 1 ) ; } else { m_optionsComponent . removeComponent ( 0 , 1 ) ; m_optionsComponent . removeComponent ( 1 , 1 ) ; } m_showAddKeyOption = showAddKeyOption ; } }
Update which options are shown .