Figure Macro API

Last modified by Vincent Massol on 2024/07/05 14:33

cogAPI for manipulating Figure blocks
TypeJAR
CategoryAPI
Developed by

Manuel Leduc, Vincent Massol, XWiki Development Team

Active Installs1
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Provide some useful APIs for handling Figures.

Figure Type Recognizer

Allows recognizing if a FigureBlock contains a table.

@Role
public interface FigureTypeRecognizer
{
   /**
     * @param figureBlock the figure block for which to recognize if it contains a table
     * @return true if the figure block content contains only a single table or false otherwise
     */

   boolean isTable(FigureBlock figureBlock);
}

Example usage:

@Inject
private FigureTypeRecognizer recognizer;
...
FigureBlock block = ...
boolean isTable = this.recognizer.isTable(block);

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.contrib:figure-macro-api 15.4.4):

Get Connected