/*----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Fever Framework code. The Initial Developer of the Original Code is Romain Ecarnot. Portions created by Initial Developer are Copyright (C) 2006 the Initial Developer. All Rights Reserved. Contributor(s): Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -----------------------------------------------------------------------------*/ import fever.app.local.LocalisationEvent; import fever.core.Resources; import fever.log.FeverDebug; /** * Localisation properties for {@link fvaswing.components.FvAlert} * component. * * @author Romain Ecarnot */ class fvaswing.components.FvAlertResources extends Resources { //------------------------------------------------------------------------- // Private properties //------------------------------------------------------------------------- private static var _instance : FvAlertResources; //------------------------------------------------------------------------- // Public Properties //------------------------------------------------------------------------- public var okLabel : String; public var yesLabel : String; public var noLabel : String; public var abortLabel : String; public var cancelLabel : String; public var ignoreLabel : String; public var retryLabel : String; //------------------------------------------------------------------------- // Public API //------------------------------------------------------------------------- /** * Returns {@link FvAlertResources} instance. * *

Singleton design */ public static function getInstance() : FvAlertResources { if( !_instance ) _instance = new FvAlertResources(); return _instance; } /** * Triggered when Localisation language change. */ public function onLocalisationUpdate( event : LocalisationEvent ) : Void { FeverDebug.WARN( 'FvAlert onLocalisation update' ); okLabel = getTranslation( 'okLabel' ); yesLabel = getTranslation( 'yesLabel' ); noLabel = getTranslation( 'noLabel' ); abortLabel = getTranslation( 'abortLabel' ); cancelLabel = getTranslation( 'cancelLabel' ); ignoreLabel = getTranslation( 'ignoreLabel' ); retryLabel = getTranslation( 'retryLabel' ); } //------------------------------------------------------------------------- // Private implementation //------------------------------------------------------------------------- /** * Constructor. */ private function FvAlertResources() { super( 'fvaswing:alert' ); } private function _initDefault() : Void { okLabel = 'ok'; yesLabel = 'yes'; noLabel = 'no'; abortLabel = 'abort'; cancelLabel = 'cancel'; ignoreLabel = 'ignore'; retryLabel = 'retry'; FeverDebug.WARN( 'Default location for ' + toString() ); } }