public class PresetTexture
extends java.lang.Object
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");
| Modifier and Type | Field and Description |
|---|---|
static int |
BLUE_TISSUE_PAPER
Blue tissue paper texture.
|
static int |
BOUQUET
Bouquet texture.
|
static int |
BROWN_MARBLE
Brown marble texture.
|
static int |
CANVAS
Canvas texture.
|
static int |
CORK
Cork texture.
|
static int |
DENIM
Denim texture.
|
static int |
FISH_FOSSIL
Fish fossil texture.
|
static int |
GRANITE
Granite texture.
|
static int |
GREEN_MARBLE
Green marble texture.
|
static int |
length |
static int |
MEDIUM_WOOD
Medium wood texture.
|
static int |
NEWSPRINT
Newsprint texture.
|
static int |
NONE
No Texture.
|
static int |
OAK
Oak texture.
|
static int |
PAPER_BAG
Paper bag texture.
|
static int |
PAPYRUS
Papyrus texture.
|
static int |
PARCHMENT
Parchment texture.
|
static int |
PINK_TISSUE_PAPER
Pink tissue paper texture.
|
static int |
PURPLE_MESH
Purple mesh texture.
|
static int |
RECYCLED_PAPER
Recycled paper texture.
|
static int |
SAND
Sand texture.
|
static int |
STATIONERY
Stationery texture.
|
static int |
WALNUT
Walnut texture.
|
static int |
WATER_DROPLETS
Water droplets texture.
|
static int |
WHITE_MARBLE
White marble texture.
|
static int |
WOVEN_MAT
Woven mat texture.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String presetTextureName) |
static java.lang.String |
getName(int presetTexture) |
static int[] |
getValues() |
static java.lang.String |
toString(int presetTexture) |
public static int NONE
public static int BLUE_TISSUE_PAPER
public static int BOUQUET
public static int BROWN_MARBLE
public static int CANVAS
public static int CORK
public static int DENIM
public static int FISH_FOSSIL
public static int GRANITE
public static int GREEN_MARBLE
public static int MEDIUM_WOOD
public static int NEWSPRINT
public static int OAK
public static int PAPER_BAG
public static int PAPYRUS
public static int PARCHMENT
public static int PINK_TISSUE_PAPER
public static int PURPLE_MESH
public static int RECYCLED_PAPER
public static int SAND
public static int STATIONERY
public static int WALNUT
public static int WATER_DROPLETS
public static int WHITE_MARBLE
public static int WOVEN_MAT
public static int length