Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells for Java has exposed the TextOptions class along with FontSettings.TextOptions property in order to control the appearance of textual parts of a Shape.
Here is simple usage scenario of FontSettings.TextOptions property.
Java
//Initialize Workbook instance
Workbook book = new Workbook();
//Access first worksheet from collection
Worksheet sheet = book.getWorksheets().get(0);
//Add a Shape of type TextBox to the collection
Shape shape = sheet.getShapes().addShape(MsoDrawingType.TEXT_BOX, 0, 0, 0, 0, 100, 200);
//Add text to Shape
shape.setText("Aspose");
//Access TextOptions of Shape
TextOptions textOptions = ((FontSetting)shape.getCharacters().get(0)).getTextOptions();
Aspose.Cells for Java 8.9.2 has exposed the TextOptions.Fill, TextOptions.Outline & TextOptions.Shadow properties which allows to control the aspects of textual contents of the shape, such as fill, shadow & outline respectively.
Here is simple usage scenario of aforementioned properties.
Java
//Initialize Workbook instance
Workbook book = new Workbook();
//Access first worksheet from collection
Worksheet sheet = book.getWorksheets().get(0);
//Add a Shape of type TextBox to the collection
Shape shape = sheet.getShapes().addShape(MsoDrawingType.TEXT_BOX, 0, 0, 0, 0, 100, 200);
//Add text to Shape
shape.setText("Aspose");
//Access TextOptions of Shape
TextOptions textOptions = ((FontSetting)shape.getCharacters().get(0)).getTextOptions();
//Set shadow
textOptions.getShadow().setPresetType(PresetShadowType.BELOW);
//Set fill color
textOptions.getFill().setFillType(FillType.SOLID);
textOptions.getFill().getSolidFill().setColor(Color.getRed());
//Set outline color
textOptions.getOutline().setOneColorGradient(Color.getBlue(), 0.3, GradientStyleType.HORIZONTAL, 2);
Aspose.Cells for Java has exposed the Shape.Line property which returns an instance of LineFormat in order to control the appearance of outlines of a Shape.
Here is simple usage scenario of Shape.Line property.
Java
//Initialize Workbook instance
Workbook book = new Workbook();
//Access first worksheet from collection
Worksheet sheet = book.getWorksheets().get(0);
//Add a Shape of type TextBox to the collection
Shape shape = sheet.getShapes().addShape(MsoDrawingType.TEXT_BOX, 0, 0, 0, 0, 100, 200);
//Access LineFormat of Shape
LineFormat line = shape.getLine();
//Set weight of line
line.setWeight(4);
Aspose.Cells for Java 8.9.2 has exposed the Shape.Fill property which returns an instance of FillFormat in order to control the different aspects of shape area.
Following is the simple usage scenario of Shape.Fill property.
Java
//Initialize Workbook instance
Workbook book = new Workbook();
//Access first worksheet from collection
Worksheet sheet = book.getWorksheets().get(0);
//Add a Shape of type TextBox to the collection
Shape shape = sheet.getShapes().addShape(MsoDrawingType.TEXT_BOX, 0, 0, 0, 0, 100, 200);
//Access FillFormat of Shape
FillFormat fill = shape.getFill();
//Set color for fill
fill.setFillType(FillType.SOLID);
fill.getSolidFill().setColor(Color.getBlue());
Please use TextOptions class instead.
Please directly use Shape.Fill and Shape.Line properties.
Please directly use Shape.Fill and Shape.Line properties.
Please use Shape.Line property instead.
Please use Shape.Fill property instead.
Please use FontSetting.TextOptions property instead.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.