java.lang.Object
is.codion.swing.common.ui.Sizes
Utility class for setting component sizes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends JComponent>
TsetMaximumHeight
(T component, int maximumHeight) Sets the maximum size of the given component to its current width and the givenmaximumHeight
static <T extends JComponent>
TsetMaximumWidth
(T component, int maximumWidth) Sets the maximum size of the given component to its current height and the givenmaximumWidth
static <T extends JComponent>
TsetMinimumHeight
(T component, int minimumHeight) Sets the minimum size of the given component to its current width and the givenminimumHeight
static <T extends JComponent>
TsetMinimumWidth
(T component, int minimumWidth) Sets the minimum size of the given component to its current height and the givenminimumWidth
static <T extends JComponent>
TsetPreferredHeight
(T component, int preferredHeight) Sets the preferred size of the given component to its current width and the givenpreferredHeight
static <T extends JComponent>
TsetPreferredWidth
(T component, int preferredWidth) Sets the preferred size of the given component to its current height and the givenpreferredWidth
-
Method Details
-
setPreferredWidth
Sets the preferred size of the given component to its current height and the givenpreferredWidth
- Type Parameters:
T
- the component type- Parameters:
component
- the componentpreferredWidth
- the preferred width- Returns:
- the component
-
setPreferredHeight
Sets the preferred size of the given component to its current width and the givenpreferredHeight
- Type Parameters:
T
- the component type- Parameters:
component
- the componentpreferredHeight
- the preferred height- Returns:
- the component
-
setMinimumWidth
Sets the minimum size of the given component to its current height and the givenminimumWidth
- Type Parameters:
T
- the component type- Parameters:
component
- the componentminimumWidth
- the minimum width- Returns:
- the component
-
setMinimumHeight
Sets the minimum size of the given component to its current width and the givenminimumHeight
- Type Parameters:
T
- the component type- Parameters:
component
- the componentminimumHeight
- the minimum height- Returns:
- the component
-
setMaximumWidth
Sets the maximum size of the given component to its current height and the givenmaximumWidth
- Type Parameters:
T
- the component type- Parameters:
component
- the componentmaximumWidth
- the maximum width- Returns:
- the component
-
setMaximumHeight
Sets the maximum size of the given component to its current width and the givenmaximumHeight
- Type Parameters:
T
- the component type- Parameters:
component
- the componentmaximumHeight
- the maximum height- Returns:
- the component
-