You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2013/06/12 16:42:48 UTC
git commit: [flex-asjs] [refs/heads/develop] - Added labels to the
Alert model.
Updated Branches:
refs/heads/develop 5e153cf77 -> b501d00ed
Added labels to the Alert model.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b501d00e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b501d00e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b501d00e
Branch: refs/heads/develop
Commit: b501d00ed6557dfd38a03c3f21f0a8e729868e4d
Parents: 5e153cf
Author: Peter Ent <pe...@apache.org>
Authored: Wed Jun 12 10:42:39 2013 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Jun 12 10:42:39 2013 -0400
----------------------------------------------------------------------
.../as/src/org/apache/flex/core/IAlertModel.as | 12 +++++
.../flex/html/staticControls/beads/AlertBead.as | 8 +--
.../staticControls/beads/models/AlertModel.as | 56 ++++++++++++++++++++
3 files changed, 72 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b501d00e/frameworks/as/src/org/apache/flex/core/IAlertModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/IAlertModel.as b/frameworks/as/src/org/apache/flex/core/IAlertModel.as
index 577ba2e..03707cc 100644
--- a/frameworks/as/src/org/apache/flex/core/IAlertModel.as
+++ b/frameworks/as/src/org/apache/flex/core/IAlertModel.as
@@ -36,5 +36,17 @@ package org.apache.flex.core
function get flags():uint;
function set flags(value:uint):void;
+
+ function get okLabel():String;
+ function set okLabel(value:String):void;
+
+ function get cancelLabel():String;
+ function set cancelLabel(value:String):void;
+
+ function get yesLabel():String;
+ function set yesLabel(value:String):void;
+
+ function get noLabel():String;
+ function set noLabel(value:String):void;
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b501d00e/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertBead.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertBead.as
index 6f4fb4e..ac05a9a 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertBead.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/AlertBead.as
@@ -59,28 +59,28 @@ package org.apache.flex.html.staticControls.beads
if( flags & Alert.OK ) {
_okButton = new TextButton();
_okButton.initModel();
- _okButton.text = "OK";
+ _okButton.text = IAlertModel(UIBase(_strand).model).okLabel;
_okButton.initSkin();
_okButton.addEventListener("click",handleOK);
}
if( flags & Alert.CANCEL ) {
_cancelButton = new TextButton();
_cancelButton.initModel();
- _cancelButton.text = "Cancel";
+ _cancelButton.text = IAlertModel(UIBase(_strand).model).cancelLabel;
_cancelButton.initSkin();
_cancelButton.addEventListener("click",handleCancel);
}
if( flags & Alert.YES ) {
_yesButton = new TextButton();
_yesButton.initModel();
- _yesButton.text = "YES";
+ _yesButton.text = IAlertModel(UIBase(_strand).model).yesLabel;
_yesButton.initSkin();
_yesButton.addEventListener("click",handleYes);
}
if( flags & Alert.NO ) {
_noButton = new TextButton();
_noButton.initModel();
- _noButton.text = "NO";
+ _noButton.text = IAlertModel(UIBase(_strand).model).noLabel;
_noButton.initSkin();
_noButton.addEventListener("click",handleNo);
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b501d00e/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/AlertModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/AlertModel.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/AlertModel.as
index 51ca335..12deea4 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/AlertModel.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/AlertModel.as
@@ -103,5 +103,61 @@ package org.apache.flex.html.staticControls.beads.models
dispatchEvent( new Event("flagsChange") );
}
}
+
+ private var _okLabel:String = "OK";
+ public function get okLabel():String
+ {
+ return _okLabel;
+ }
+ public function set okLabel(value:String):void
+ {
+ if( value != _okLabel )
+ {
+ _okLabel = value;
+ dispatchEvent( new Event("okLabelChange") );
+ }
+ }
+
+ private var _cancelLabel:String = "Cancel";
+ public function get cancelLabel():String
+ {
+ return _cancelLabel;
+ }
+ public function set cancelLabel(value:String):void
+ {
+ if( value != _cancelLabel )
+ {
+ _cancelLabel = value;
+ dispatchEvent( new Event("cancelLabelChange") );
+ }
+ }
+
+ private var _yesLabel:String = "YES";
+ public function get yesLabel():String
+ {
+ return _yesLabel;
+ }
+ public function set yesLabel(value:String):void
+ {
+ if( value != _yesLabel )
+ {
+ _yesLabel = value;
+ dispatchEvent( new Event("yesLabelChange") );
+ }
+ }
+
+ private var _noLabel:String = "NO";
+ public function get noLabel():String
+ {
+ return _noLabel;
+ }
+ public function set noLabel(value:String):void
+ {
+ if( value != _noLabel )
+ {
+ _noLabel = value;
+ dispatchEvent( new Event("noLabelChange") );
+ }
+ }
}
}
\ No newline at end of file