void handleAddKey ( ) { String key = m_addKeyInput . getValue ( ) ; if ( m_listener . handleAddKey ( key ) ) { Notification . show ( key . isEmpty ( ) ? m_messages . key ( Messages . GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_EMPTY_KEY_SUCCESSFULLY_ADDED_0 ) : m_messages . key ( Messages . GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_SUCCESSFULLY_ADDED_1 , key ) ) ; } else { CmsMessageBundleEditorTypes . showWarning ( m_messages . key ( Messages . GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_CAPTION_0 ) , m_messages . key ( Messages . GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_KEY_ALREADEY_EXISTS_DESCRIPTION_1 , key ) ) ; } m_addKeyInput . focus ( ) ; m_addKeyInput . selectAll ( ) ; }
Handles adding a key . Calls the registered listener and wraps it s method in some GUI adjustments .