Package org.xwiki.contrib.figure
Class FigureType
- java.lang.Object
-
- org.xwiki.contrib.figure.FigureType
-
@Unstable public class FigureType extends Object
Stores information about a figure type: its id and whether it is the automatic type. Only theAUTOMATIC
hasisAutomatic()
which returnstrue
.- Since:
- 15.4
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description static FigureType
AUTOMATIC
A constant figure type when the type must be computed automatically based on the figure content.static List<String>
DEFAULT_FIGURE_TYPES
List of default figure types.static FigureType
FIGURE
The figure type, which is always available and the selected type when automatic is activated and no table is detected in the content.static FigureType
TABLE
The table type, which is always available and the selected type when automatic is activated and a table is detected in the content.
-
Constructor Summary
Constructors Constructor Description FigureType(String id, FigureStyle figureStyle)
Default constructor, initializes the figure type as not automatic.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
FigureStyle
getFigureStyle()
String
getId()
int
hashCode()
boolean
isAutomatic()
boolean
isInline()
String
toString()
-
-
-
Field Detail
-
AUTOMATIC
public static final FigureType AUTOMATIC
A constant figure type when the type must be computed automatically based on the figure content.
-
FIGURE
public static final FigureType FIGURE
The figure type, which is always available and the selected type when automatic is activated and no table is detected in the content.
-
TABLE
public static final FigureType TABLE
The table type, which is always available and the selected type when automatic is activated and a table is detected in the content.
-
-
Constructor Detail
-
FigureType
public FigureType(String id, FigureStyle figureStyle)
Default constructor, initializes the figure type as not automatic.- Parameters:
id
- the figure type idfigureStyle
- the style of the figure (i.e., "block", or "inline")
-
-
Method Detail
-
getId
public String getId()
- Returns:
- the figure id (e.g.,
"figure"
)
-
isAutomatic
public boolean isAutomatic()
- Returns:
true
when the figure type should be computed automatically.
-
getFigureStyle
public FigureStyle getFigureStyle()
- Returns:
- the style of the figure (i.e., "block" or "inline")
-
isInline
public boolean isInline()
- Returns:
true
when the figure is configured to be displayed inline,false
when the figure is configured to be displayed as block (i.e., the default mode)
-
-