public class IncrementNumericEffect extends AttributeEffect
Provides access to the IncrementNumericEffect object.
Using this class, the developer can give the end-user the ability to increment a numeric method without modifying the original settings.
Constructor and Description |
---|
IncrementNumericEffect()
Constructs a newly allocated IncrementNumericEffect object
|
IncrementNumericEffect(java.lang.String property,
int increment)
Constructs a newly allocated IncrementNumericEffect object
|
Modifier and Type | Method and Description |
---|---|
int |
getIncrement()
Gets or sets the increment size of a numeric property.
|
java.lang.String |
getProperty()
Gets or sets the property which will be incremented.
|
void |
resetIncrement()
Set the property Increment to its default value.
|
void |
resetProperty()
Set the property Property to its default value.
|
void |
setIncrement(int value)
Gets or sets the increment size of a numeric property.
|
void |
setProperty(java.lang.String value)
Gets or sets the property which will be incremented.
|
public IncrementNumericEffect()
public IncrementNumericEffect(java.lang.String property, int increment)
property
- increment
- public int getIncrement()
Gets or sets the increment size of a numeric property.
This effect can be applied to the IncrementNumericEffect
class, IncrementNumericEffect
class and IncrementNumericEffect
class.
The value configured using this method will be added to the current value of the method, not replaced.
Positive and negative values can be assigned.
For example, the code below will add an AxisSection from March to October:
PopulateProductSales(chart1); chart1.getTitles().add(new TitleDockable("Wine Sales by Type")); chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY); AxisSection sect; sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255))); chart1.getAxisX().getSections().add(sect); ConditionalAttributes condition; condition = new ConditionalAttributes(); SectionCondition sectionCond; sectionCond = new SectionCondition(sect); sectionCond.setDataElement(DataElement.XValue); condition.setCondition(sectionCond); chart1.getConditionalAttributes().add((condition));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
If you apply the code below, the MarkerSize of the points inside the AxisSection will be increased by 3:
PopulateProductSales(chart1);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
AxisSection sect;
sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255)));
chart1.getAxisX().getSections().add(sect);
ConditionalAttributes condition;
condition = new ConditionalAttributes();
SectionCondition sectionCond;
sectionCond = new SectionCondition(sect);
sectionCond.setDataElement(DataElement.XValue);
condition.setCondition(sectionCond);
chart1.getConditionalAttributes().add((condition));
IncrementNumericEffect increment;
increment = new IncrementNumericEffect();
increment.setIncrement(3);
increment.setProperty("MarkerSize");
condition.getEffects().add(((AttributeEffect)increment));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
resetIncrement
public void setIncrement(int value)
Gets or sets the increment size of a numeric property.
This effect can be applied to the IncrementNumericEffect
class, IncrementNumericEffect
class and IncrementNumericEffect
class.
The value configured using this method will be added to the current value of the method, not replaced.
Positive and negative values can be assigned.
For example, the code below will add an AxisSection from March to October:
PopulateProductSales(chart1); chart1.getTitles().add(new TitleDockable("Wine Sales by Type")); chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY); AxisSection sect; sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255))); chart1.getAxisX().getSections().add(sect); ConditionalAttributes condition; condition = new ConditionalAttributes(); SectionCondition sectionCond; sectionCond = new SectionCondition(sect); sectionCond.setDataElement(DataElement.XValue); condition.setCondition(sectionCond); chart1.getConditionalAttributes().add((condition));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
If you apply the code below, the MarkerSize of the points inside the AxisSection will be increased by 3:
PopulateProductSales(chart1);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
AxisSection sect;
sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255)));
chart1.getAxisX().getSections().add(sect);
ConditionalAttributes condition;
condition = new ConditionalAttributes();
SectionCondition sectionCond;
sectionCond = new SectionCondition(sect);
sectionCond.setDataElement(DataElement.XValue);
condition.setCondition(sectionCond);
chart1.getConditionalAttributes().add((condition));
IncrementNumericEffect increment;
increment = new IncrementNumericEffect();
increment.setIncrement(3);
increment.setProperty("MarkerSize");
condition.getEffects().add(((AttributeEffect)increment));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
value
- resetIncrement
public java.lang.String getProperty()
Gets or sets the property which will be incremented.
This effect can be applied to the IncrementNumericEffect
class, IncrementNumericEffect
class and IncrementNumericEffect
class.
The value configured using this method will be the method that will be affected by the increment.
For example, the code below will add an AxisSection from March to October:
PopulateProductSales(chart1); chart1.getTitles().add(new TitleDockable("Wine Sales by Type")); chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY); AxisSection sect; sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255))); chart1.getAxisX().getSections().add(sect); ConditionalAttributes condition; condition = new ConditionalAttributes(); SectionCondition sectionCond; sectionCond = new SectionCondition(sect); sectionCond.setDataElement(DataElement.XValue); condition.setCondition(sectionCond); chart1.getConditionalAttributes().add((condition));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
If you apply the code below, the MarkerSize of the points inside the AxisSection will be increased by 3:
PopulateProductSales(chart1);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
AxisSection sect;
sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255)));
chart1.getAxisX().getSections().add(sect);
ConditionalAttributes condition;
condition = new ConditionalAttributes();
SectionCondition sectionCond;
sectionCond = new SectionCondition(sect);
sectionCond.setDataElement(DataElement.XValue);
condition.setCondition(sectionCond);
chart1.getConditionalAttributes().add((condition));
IncrementNumericEffect increment;
increment = new IncrementNumericEffect();
increment.setIncrement(3);
increment.setProperty("MarkerSize");
condition.getEffects().add(((AttributeEffect)increment));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
resetProperty
public void setProperty(java.lang.String value)
Gets or sets the property which will be incremented.
This effect can be applied to the IncrementNumericEffect
class, IncrementNumericEffect
class and IncrementNumericEffect
class.
The value configured using this method will be the method that will be affected by the increment.
For example, the code below will add an AxisSection from March to October:
PopulateProductSales(chart1); chart1.getTitles().add(new TitleDockable("Wine Sales by Type")); chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY); AxisSection sect; sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255))); chart1.getAxisX().getSections().add(sect); ConditionalAttributes condition; condition = new ConditionalAttributes(); SectionCondition sectionCond; sectionCond = new SectionCondition(sect); sectionCond.setDataElement(DataElement.XValue); condition.setCondition(sectionCond); chart1.getConditionalAttributes().add((condition));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
If you apply the code below, the MarkerSize of the points inside the AxisSection will be increased by 3:
PopulateProductSales(chart1);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
AxisSection sect;
sect = new AxisSection(((AxisSectionValue)3.0), ((AxisSectionValue)10.0), new java.awt.Color(100, new java.awt.Color(211,211,211,255)));
chart1.getAxisX().getSections().add(sect);
ConditionalAttributes condition;
condition = new ConditionalAttributes();
SectionCondition sectionCond;
sectionCond = new SectionCondition(sect);
sectionCond.setDataElement(DataElement.XValue);
condition.setCondition(sectionCond);
chart1.getConditionalAttributes().add((condition));
IncrementNumericEffect increment;
increment = new IncrementNumericEffect();
increment.setIncrement(3);
increment.setProperty("MarkerSize");
condition.getEffects().add(((AttributeEffect)increment));
public static void PopulateProductSales(Chart chart1) { ProductSales[] data = new ProductSales[]{ new ProductSales("Jan", 12560, 23400, 34500), new ProductSales("Feb", 13400, 21000, 38900), new ProductSales("Mar", 16700, 17000, 42100), new ProductSales("Apr", 12000, 19020, 43800), new ProductSales("May", 15800, 26500, 37540), new ProductSales("Jun", 9800, 27800, 32580), new ProductSales("Jul", 17800, 29820, 34000), new ProductSales("Aug", 19800, 17800, 38000), new ProductSales("Sep", 23200, 32000, 41300), new ProductSales("Oct", 16700, 26500, 46590), new ProductSales("Nov", 11800, 23000, 48700), new ProductSales("Dec", 13400, 15400, 49100) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class ProductSales { public ProductSales(String month, double white, double red, double sparkling) { this.setMonth(month); this.setWhite(white); this.setRed(red); this.setSparkling(sparkling); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private double privateWhite; public final double getWhite() { return privateWhite; } public final void setWhite(double value) { privateWhite = value; } private double privateRed; public final double getRed() { return privateRed; } public final void setRed(double value) { privateRed = value; } private double privateSparkling; public final double getSparkling() { return privateSparkling; } public final void setSparkling(double value) { privateSparkling = value; } }
value
- resetProperty
public void resetIncrement()
setIncrement
public void resetProperty()
setProperty
2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.