Module wicket.bootstrap.extensions
Class FontAwesome7IconTypeBuilder
java.lang.Object
de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome7IconTypeBuilder
Important: To use font-awesome 6.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>6.2.0</version>
</dependency>
A builder to build
Examples :
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>6.2.0</version>
</dependency>
A builder to build
FontAwesome7IconType Examples :
-
To rotate an icon 90° :
FontAwesome7IconTypeBuilder.on(FontAwesome7Graphic.key).rotate(Rotation.rotate_90).build() -
To spin an icon :
FontAwesome7IconTypeBuilder.on(FontAwesome7Graphic.key).spin().build() - To resize an icon 4 times :
FontAwesome7IconTypeBuilder.on(FontAwesome7Graphic.key).size(Size.four).build() -
All together :
FontAwesome7IconTypeBuilder.on(FontAwesome7Graphic.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 FontAwesome7IconTypeBuilderon(FontAwesome7IconTypeBuilder.FontAwesome7Graphic fontAwesomeGraphic) rotate(FontAwesome7IconTypeBuilder.Rotation rotation) spin()make the icon spin
-
Method Details
-
on
public static FontAwesome7IconTypeBuilder on(FontAwesome7IconTypeBuilder.FontAwesome7Graphic 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
-