Module wicket.bootstrap.extensions
Class FontAwesome5IconTypeBuilder
java.lang.Object
de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome5IconTypeBuilder
Important: To use font-awesome 5.x you need to declare the Maven/Gradle dependency
in your application pom.xml/build.gradle, for example:
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.15.4</version>
</dependency>
A builder to build
Examples :
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.15.4</version>
</dependency>
A builder to build
FontAwesome5IconType Examples :
-
To rotate an icon 90° :
FontAwesomeIconTypeBuilder.on(FontAwesomeGraphic.key).rotate(Rotation.rotate_90).build() -
To spin an icon :
FontAwesomeIconTypeBuilder.on(FontAwesomeGraphic.key).spin().build() - To resize an icon 4 times :
FontAwesomeIconTypeBuilder.on(FontAwesomeGraphic.key).size(Size.four).build() -
All together :
FontAwesomeIconTypeBuilder.on(FontAwesomeGraphic.key).size(Size.four).spin().rotate(Rotation.rotate_90).build()
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAll icons of style 'brand' available for free in Font Awesome.static interfacestatic enumAll icons of style 'regular' available for free in Font Awesome.static enumAll icons of style 'solid' available for free in Font Awesome.static enumRotation that can be done on an icon.static enumSizes on an icon. -
Method Summary
Modifier and TypeMethodDescriptionbuild()make the icon fixed widthfw()An alias forfixedWidth()static FontAwesome5IconTypeBuilderon(FontAwesome5IconTypeBuilder.FontAwesome5Graphic fontAwesomeGraphic) rotate(FontAwesome5IconTypeBuilder.Rotation rotation) spin()make the icon spin
-
Method Details
-
on
public static FontAwesome5IconTypeBuilder on(FontAwesome5IconTypeBuilder.FontAwesome5Graphic fontAwesomeGraphic) - Parameters:
fontAwesomeGraphic- icon to use in the builder- Returns:
- a builder for this icon
-
build
- Returns:
- build the icon
-
rotate
- Parameters:
rotation- rotation to apply to the icon- Returns:
- the builder
-
size
- Parameters:
size- size to apply to the icon- Returns:
- the builder
-
spin
make the icon spin- Returns:
- the builder
-
fixedWidth
make the icon fixed width- Returns:
- the builder
-
fw
An alias forfixedWidth()- Returns:
- the builder
-