PresetTexture

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

FieldDescription
BLUE_TISSUE_PAPERBlue tissue paper texture.
BOUQUETBouquet texture.
BROWN_MARBLEBrown marble texture.
CANVASCanvas texture.
CORKCork texture.
DENIMDenim texture.
FISH_FOSSILFish fossil texture.
GRANITEGranite texture.
GREEN_MARBLEGreen marble texture.
MEDIUM_WOODMedium wood texture.
NEWSPRINTNewsprint texture.
NONENo Texture.
OAKOak texture.
PAPER_BAGPaper bag texture.
PAPYRUSPapyrus texture.
PARCHMENTParchment texture.
PINK_TISSUE_PAPERPink tissue paper texture.
PURPLE_MESHPurple mesh texture.
RECYCLED_PAPERRecycled paper texture.
SANDSand texture.
STATIONERYStationery texture.
WALNUTWalnut texture.
WATER_DROPLETSWater droplets texture.
WHITE_MARBLEWhite marble texture.
WOVEN_MATWoven mat texture.
length

Methods

MethodDescription
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:

ParameterTypeDescription
presetTextureNamejava.lang.String

Returns: int

getName(int presetTexture)

public static String getName(int presetTexture)

Parameters:

ParameterTypeDescription
presetTextureint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int presetTexture)

public static String toString(int presetTexture)

Parameters:

ParameterTypeDescription
presetTextureint

Returns: java.lang.String