-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Genesis: Improve visibility of checkboxes in installed column by usin…
…g Jewel checkbox (reference #10)
- Loading branch information
1 parent
9cc2eaf
commit 34309f4
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...l_Royale/src/net/apacheRoyaleTemplatedApp/view/renderers/NonEditableCheckboxRenderer.mxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<j:DataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" | ||
xmlns:j="library://ns.apache.org/royale/jewel" | ||
xmlns:js="library://ns.apache.org/royale/basic" | ||
xmlns:itemRenderers="org.apache.royale.jewel.beads.itemRenderers.*" | ||
className="gridJSRendererClean" initComplete="onRendererInitComplete(event)"> | ||
<j:beads> | ||
<j:VerticalCenteredLayout /> | ||
<j:Disabled disabled="true"/> | ||
</j:beads> | ||
<fx:Script> | ||
<![CDATA[ | ||
override public function get data():Object | ||
{ | ||
return _data; | ||
} | ||
override public function set data(value:Object):void | ||
{ | ||
if (_data != value) | ||
{ | ||
_data = value; | ||
this.refreshCheckbox(); | ||
} | ||
} | ||
private function onRendererInitComplete(event:Event):void | ||
{ | ||
this.refreshCheckbox(); | ||
} | ||
private function refreshCheckbox():void | ||
{ | ||
if (!checkbox) return; | ||
if (dataField && data) | ||
{ | ||
checkbox.selected = data[dataField]; | ||
} | ||
else | ||
{ | ||
checkbox.selected = false; | ||
} | ||
} | ||
]]> | ||
</fx:Script> | ||
<j:CheckBox localId="checkbox" /> | ||
</j:DataGridItemRenderer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters