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 TypeMethodDescriptionvoid
static FloatingType
Aligns the component to the left for all screen sizes.static FloatingType
FLOAT_LEFT
(ScreenSize screenSize) Aligns the component to the left for the specified or bigger screen sizes.static FloatingType
Disables component flolating for all screen sizes.static FloatingType
FLOAT_NONE
(ScreenSize screenSize) Disables component floating for the specified and bigger screen sizes.static FloatingType
Aligns the component to the right for all screen sizes.static FloatingType
FLOAT_RIGHT
(ScreenSize screenSize) Aligns the component to the right for the specified or bigger screen sizes.void
static void
removeAllFLoatSettings
(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 theScreenSize
enum.- 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 theScreenSize
enum.- 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 theScreenSize
enum.- Returns:
- The new instance of the floating type
-
apply
- Specified by:
apply
in interfaceStyleElement
- Parameters:
component
- The component
-
remove
- Specified by:
remove
in interfaceStyleElement
- Parameters:
component
- The component
-
getStyleClassName
- Specified by:
getStyleClassName
in interfaceStyleElement
- Returns:
- The style class name or
null
if is not style class for the style settings
-
removeAllFLoatSettings
Removes all alignment settings from the specified component.- Parameters:
component
- Component instance
-