Package com.jbstrap.ui.bootstrap
Class FloatingType
java.lang.Object
com.jbstrap.ui.bootstrap.FloatingType
- All Implemented Interfaces:
StyleElement
These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the CSS float property.
!important is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware
float utilities have no effect on flex items.
- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
Modifier and TypeMethodDescriptionvoidstatic FloatingTypeAligns the component to the left for all screen sizes.static FloatingTypeFLOAT_LEFT(ScreenSize screenSize) Aligns the component to the left for the specified or bigger screen sizes.static FloatingTypeDisables component flolating for all screen sizes.static FloatingTypeFLOAT_NONE(ScreenSize screenSize) Disables component floating for the specified and bigger screen sizes.static FloatingTypeAligns the component to the right for all screen sizes.static FloatingTypeFLOAT_RIGHT(ScreenSize screenSize) Aligns the component to the right for the specified or bigger screen sizes.voidstatic voidremoveAllFLoatSettings(Component<?> component) Removes all alignment settings from the specified component.
-
Method Details
-
FLOAT_NONE
Disables component flolating for all screen sizes.- Returns:
- The new instance of the floating type
-
FLOAT_LEFT
Aligns the component to the left for all screen sizes.- Returns:
- The new instance of the floating type
-
FLOAT_RIGHT
Aligns the component to the right for all screen sizes.- Returns:
- The new instance of the floating type
-
FLOAT_NONE
Disables component floating for the specified and bigger screen sizes.- Parameters:
screenSize- Screen size Available screen sizes are listed in theScreenSizeenum.- Returns:
- The new instance of the floating type
-
FLOAT_LEFT
Aligns the component to the left for the specified or bigger screen sizes.- Parameters:
screenSize- Screen size Available screen sizes are listed in theScreenSizeenum.- Returns:
- The new instance of the floating type
-
FLOAT_RIGHT
Aligns the component to the right for the specified or bigger screen sizes.- Parameters:
screenSize- Screen size Available screen sizes are listed in theScreenSizeenum.- Returns:
- The new instance of the floating type
-
apply
- Specified by:
applyin interfaceStyleElement- Parameters:
component- The component
-
remove
- Specified by:
removein interfaceStyleElement- Parameters:
component- The component
-
getStyleClassName
- Specified by:
getStyleClassNamein interfaceStyleElement- Returns:
- The style class name or
nullif is not style class for the style settings
-
removeAllFLoatSettings
Removes all alignment settings from the specified component.- Parameters:
component- Component instance
-