Author: rwhitcomb Date: Mon Feb 26 18:54:35 2018 New Revision: 1825402 URL: http://svn.apache.org/viewvc?rev=1825402&view=rev Log: PIVOT-1031: Add some Gauge examples to the KitchenSink tutorial.
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.bxml pivot/trunk/tutorials/src/org/apache/pivot/tutorials/meters.bxml pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.bxml URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.bxml?rev=1825402&r1=1825401&r2=1825402&view=diff ============================================================================== --- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.bxml (original) +++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.bxml Mon Feb 26 18:54:35 2018 @@ -74,7 +74,7 @@ limitations under the License. </Rollup> <Rollup bxml:id="metersRollup" styles="{buttonColor:13}"> <heading> - <Label text="Meters & Activity Indicators" styles="{font:{size:'110%', bold:true}, color:13}"/> + <Label text="Meters, Gauges & Activity Indicators" styles="{font:{size:'110%', bold:true}, color:13}"/> </heading> </Rollup> <Rollup bxml:id="spinnersRollup" styles="{buttonColor:13}"> Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/meters.bxml URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/meters.bxml?rev=1825402&r1=1825401&r2=1825402&view=diff ============================================================================== --- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/meters.bxml (original) +++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/meters.bxml Mon Feb 26 18:54:35 2018 @@ -44,6 +44,30 @@ limitations under the License. </BoxPane> </BoxPane> + <BoxPane orientation="vertical" styles="{padding:6, spacing:8, horizontalAlignment:'center'}"> + <Label text="Gauges" styles="{font:{bold:true}}"/> + <BoxPane orientation="vertical" styles="{spacing:6, horizontalAlignment:'center'}"> + <Gauge origin="NORTH" type="Integer" minValue="0" maxValue="100" value="50" warningLevel="70" criticalLevel="90" text="50%" + styles="{backgroundColor:10, criticalColor:23, font:{size:20}, thickness:10.0, padding:4, showTickMarks:true, tickFrequency:10}"/> + <Label text="North origin: ticks at 10"/> + </BoxPane> + <BoxPane orientation="vertical" styles="{spacing:6, horizontalAlignment:'center'}"> + <Gauge origin="EAST" type="Integer" minValue="0" maxValue="100" value="40" warningLevel="70" criticalLevel="90" text="40%" + styles="{backgroundColor:10, criticalColor:23, font:{size:20}, thickness:10.0, padding:4, showTickMarks:true, tickFrequency:25}"/> + <Label text="East origin: ticks at 25"/> + </BoxPane> + <BoxPane orientation="vertical" styles="{spacing:6, horizontalAlignment:'center'}"> + <Gauge origin="SOUTH" type="Integer" minValue="0" maxValue="100" value="75" warningLevel="70" criticalLevel="90" text="75%" + styles="{backgroundColor:10, criticalColor:23, font:{size:20}, thickness:10.0, padding:4}"/> + <Label text="South origin: no ticks, warning at 70%"/> + </BoxPane> + <BoxPane orientation="vertical" styles="{spacing:6, horizontalAlignment:'center'}"> + <Gauge origin="WEST" type="Integer" minValue="0" maxValue="100" value="95" warningLevel="70" criticalLevel="90" text="95%" + styles="{backgroundColor:10, criticalColor:23, font:{size:20}, thickness:10.0, padding:4}"/> + <Label text="West origin: no ticks, critical at 90%"/> + </BoxPane> + </BoxPane> + <BoxPane orientation="vertical" styles="{padding:6, spacing:8}"> <Label text="Activity Indicators" styles="{font:{bold:true}}"/> <BoxPane> Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java?rev=1825402&r1=1825401&r2=1825402&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java Mon Feb 26 18:54:35 2018 @@ -76,7 +76,6 @@ public class TerraGaugeSkin<T extends Nu }; public TerraGaugeSkin() { - // TODO: set the rest of the default stuff (colors, etc.) font = currentTheme().getFont().deriveFont(Font.BOLD, 24.0f); setBackgroundColor(defaultBackgroundColor()); setGaugeColor(8);