PresetTexture
Contents
[
Hide
]Inheritance: java.lang.Object
public class PresetTexture
Specifies texture to be used to fill a shape.
Examples:
Show how to set marker formatting.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.SCATTER, 432.0, 252.0);
Chart chart = shape.getChart();
// Delete default generated series.
chart.getSeries().clear();
ChartSeries series = chart.getSeries().add("AW Series 1", new double[] { 0.7, 1.8, 2.6, 3.9 },
new double[] { 2.7, 3.2, 0.8, 1.7 });
// Set marker formatting.
series.getMarker().setSize(40);
series.getMarker().setSymbol(MarkerSymbol.SQUARE);
ChartDataPointCollection dataPoints = series.getDataPoints();
dataPoints.get(0).getMarker().getFormat().getFill().presetTextured(PresetTexture.DENIM);
dataPoints.get(0).getMarker().getFormat().getStroke().setForeColor(Color.YELLOW);
dataPoints.get(0).getMarker().getFormat().getStroke().setBackColor(Color.RED);
dataPoints.get(1).getMarker().getFormat().getFill().presetTextured(PresetTexture.WATER_DROPLETS);
dataPoints.get(1).getMarker().getFormat().getStroke().setForeColor(Color.YELLOW);
dataPoints.get(1).getMarker().getFormat().getStroke().setVisible(false);
dataPoints.get(2).getMarker().getFormat().getFill().presetTextured(PresetTexture.GREEN_MARBLE);
dataPoints.get(2).getMarker().getFormat().getStroke().setForeColor(Color.YELLOW);
dataPoints.get(3).getMarker().getFormat().getFill().presetTextured(PresetTexture.OAK);
dataPoints.get(3).getMarker().getFormat().getStroke().setForeColor(Color.YELLOW);
dataPoints.get(3).getMarker().getFormat().getStroke().setTransparency(0.5);
doc.save(getArtifactsDir() + "Charts.MarkerFormatting.docx");
Fields
Field | Description |
---|---|
BLUE_TISSUE_PAPER | Blue tissue paper texture. |
BOUQUET | Bouquet texture. |
BROWN_MARBLE | Brown marble texture. |
CANVAS | Canvas texture. |
CORK | Cork texture. |
DENIM | Denim texture. |
FISH_FOSSIL | Fish fossil texture. |
GRANITE | Granite texture. |
GREEN_MARBLE | Green marble texture. |
MEDIUM_WOOD | Medium wood texture. |
NEWSPRINT | Newsprint texture. |
NONE | No Texture. |
OAK | Oak texture. |
PAPER_BAG | Paper bag texture. |
PAPYRUS | Papyrus texture. |
PARCHMENT | Parchment texture. |
PINK_TISSUE_PAPER | Pink tissue paper texture. |
PURPLE_MESH | Purple mesh texture. |
RECYCLED_PAPER | Recycled paper texture. |
SAND | Sand texture. |
STATIONERY | Stationery texture. |
WALNUT | Walnut texture. |
WATER_DROPLETS | Water droplets texture. |
WHITE_MARBLE | White marble texture. |
WOVEN_MAT | Woven mat texture. |
length |
Methods
Method | Description |
---|---|
fromName(String presetTextureName) | |
getName(int presetTexture) | |
getValues() | |
toString(int presetTexture) |
BLUE_TISSUE_PAPER
public static int BLUE_TISSUE_PAPER
Blue tissue paper texture.
BOUQUET
public static int BOUQUET
Bouquet texture.
BROWN_MARBLE
public static int BROWN_MARBLE
Brown marble texture.
CANVAS
public static int CANVAS
Canvas texture.
CORK
public static int CORK
Cork texture.
DENIM
public static int DENIM
Denim texture.
FISH_FOSSIL
public static int FISH_FOSSIL
Fish fossil texture.
GRANITE
public static int GRANITE
Granite texture.
GREEN_MARBLE
public static int GREEN_MARBLE
Green marble texture.
MEDIUM_WOOD
public static int MEDIUM_WOOD
Medium wood texture.
NEWSPRINT
public static int NEWSPRINT
Newsprint texture.
NONE
public static int NONE
No Texture.
OAK
public static int OAK
Oak texture.
PAPER_BAG
public static int PAPER_BAG
Paper bag texture.
PAPYRUS
public static int PAPYRUS
Papyrus texture.
PARCHMENT
public static int PARCHMENT
Parchment texture.
PINK_TISSUE_PAPER
public static int PINK_TISSUE_PAPER
Pink tissue paper texture.
PURPLE_MESH
public static int PURPLE_MESH
Purple mesh texture.
RECYCLED_PAPER
public static int RECYCLED_PAPER
Recycled paper texture.
SAND
public static int SAND
Sand texture.
STATIONERY
public static int STATIONERY
Stationery texture.
WALNUT
public static int WALNUT
Walnut texture.
WATER_DROPLETS
public static int WATER_DROPLETS
Water droplets texture.
WHITE_MARBLE
public static int WHITE_MARBLE
White marble texture.
WOVEN_MAT
public static int WOVEN_MAT
Woven mat texture.
length
public static int length
fromName(String presetTextureName)
public static int fromName(String presetTextureName)
Parameters:
Parameter | Type | Description |
---|---|---|
presetTextureName | java.lang.String |
Returns: int
getName(int presetTexture)
public static String getName(int presetTexture)
Parameters:
Parameter | Type | Description |
---|---|---|
presetTexture | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int presetTexture)
public static String toString(int presetTexture)
Parameters:
Parameter | Type | Description |
---|---|---|
presetTexture | int |
Returns: java.lang.String