public class VectorBorder extends java.lang.Object implements IBorderAdornment
Provides access to the VectorBorder object.
Use the SimpleBorder's methods to configure the Border of the Chart
, as well as the setBorder
of the DockableBar
such as the DataGrid
, the LegendBox
, or the setToolBar
.
The following image shows a VectorBorder with a "Round" effect around the chart.
chart1.setChartBorder(new VectorBorder(VectorBorderType.ROUND));
chart1.getLegendBox().setBorder(DockBorder.INTERNAL);
PopulateCarProduction(chart1);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
Please see the setTemplate
method for a complete list of the supported VectorBorder types.
If you are looking for the graphical image borders, please refer to the ImageBorder
class. For simple borders please review the SimpleBorder class.
Constructor and Description |
---|
VectorBorder()
Constructs a newly allocated VectorBorder object
|
VectorBorder(java.lang.String template)
Constructs a newly allocated VectorBorder object
|
VectorBorder(VectorBorderTemplate template)
Constructs a newly allocated VectorBorder object
|
VectorBorder(VectorBorderType borderType)
Constructs a newly allocated VectorBorder object
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Gets or sets the color for the VectorBorder.
|
VectorBorderTemplate |
getTemplate()
Gets or sets the border template of the chart.
|
java.lang.String |
getTemplateString()
Gets or sets the border template of the chart.
|
VectorBorderType |
getTemplateVectorBorderType()
Gets or sets the border template of the chart.
|
void |
resetColor()
Set the property Color to its default value.
|
void |
setColor(java.awt.Color value)
Gets or sets the color for the VectorBorder.
|
void |
setTemplate(java.lang.String value)
Gets or sets the border template of the chart.
|
void |
setTemplate(VectorBorderTemplate value)
Gets or sets the border template of the chart.
|
void |
setTemplate(VectorBorderType value)
Gets or sets the border template of the chart.
|
public VectorBorder()
public VectorBorder(VectorBorderTemplate template)
template
- public VectorBorder(VectorBorderType borderType)
borderType
- public VectorBorder(java.lang.String template)
template
- public java.awt.Color getColor()
Gets or sets the color for the VectorBorder.
Use this method to change the color of the VectorBorder you are using.
Below, the VectorBorder color is set to DarkGreen:
PopulateCarProduction(chart1);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
VectorBorder border;
border = new VectorBorder(VectorBorderType.BASIC);
border.setColor(new java.awt.Color(0,100,0,255));
chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
getColor
in interface IBorderAdornment
resetColor
public void setColor(java.awt.Color value)
Gets or sets the color for the VectorBorder.
Use this method to change the color of the VectorBorder you are using.
Below, the VectorBorder color is set to DarkGreen:
PopulateCarProduction(chart1);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
VectorBorder border;
border = new VectorBorder(VectorBorderType.BASIC);
border.setColor(new java.awt.Color(0,100,0,255));
chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
setColor
in interface IBorderAdornment
value
- resetColor
public VectorBorderTemplate getTemplate()
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
public void setTemplate(VectorBorderTemplate value)
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
value
- public VectorBorderType getTemplateVectorBorderType()
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
public void setTemplate(VectorBorderType value)
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
value
- public java.lang.String getTemplateString()
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
public void setTemplate(java.lang.String value)
Gets or sets the border template of the chart.
In order to set a template to the VectorBorder object, you have to create one first.
When you create a template, you have to choose the type of border you want to choose. The available options are:
Border Type | Description |
---|---|
Basic | The Basic border draws a rectangle around the chart. All its corners have a 90 degrees angle. |
Default | The Default border is the RoundShadow border. |
Round | The corners of the chart are rounded. |
RoundShadow | The corners of the chart are rounded and a white shadow is painted between the border and the area of the chart. |
Below, a Round border is used, along with a Blue color:
PopulateCarProduction(chart1); chart1.getTitles().add(new TitleDockable("Vehicles Production by Type")); VectorBorderTemplate borderTemplate; borderTemplate = new VectorBorderTemplate(); borderTemplate.setPreset(VectorBorderType.ROUND); VectorBorder border; border = new VectorBorder(); border.setTemplate(borderTemplate); border.setColor(new java.awt.Color(0,0,255,255)); chart1.setChartBorder(border);
public static void PopulateCarProduction(Chart chart1) { CarProduction[] production = new CarProduction[] { new CarProduction("Jan", 1760, 535, 695 ) , new CarProduction("Feb", 1849, 395, 688 ) , new CarProduction("Mar", 2831, 685, 1047 ) , new CarProduction("Apr", 2851, 984, 1652 ) , new CarProduction("May", 2961, 1579, 1889 ) , new CarProduction("Jun", 1519, 1539, 1766 ) , new CarProduction("Jul", 2633, 1489, 1361 ) , new CarProduction("Aug", 1140, 650, 874 ) , new CarProduction("Sep", 1626, 653, 693 ) , new CarProduction("Oct", 1478, 2236, 786 ) , new CarProduction("Nov", 1306, 1937, 599 ) , new CarProduction("Dec", 1607, 2138, 678 ) }; ObjectProvider objProvider = new ObjectProvider(production); chart1.getDataSourceSettings().setDataSource(objProvider); }
public static class CarProduction { private CarProduction(String month, int sedan, int coupe, int SUV) { this.setMonth(month); this.setSedan(sedan); this.setCoupe(coupe); this.setSUV(SUV); } private String privateMonth; public final String getMonth() { return privateMonth; } public final void setMonth(String value) { privateMonth = value; } private int privateSedan; public final int getSedan() { return privateSedan; } public final void setSedan(int value) { privateSedan = value; } private int privateCoupe; public final int getCoupe() { return privateCoupe; } public final void setCoupe(int value) { privateCoupe = value; } private int privateSUV; public final int getSUV() { return privateSUV; } public final void setSUV(int value) { privateSUV = value; } }
value
- public void resetColor()
setColor
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.