Package org.jdesktop.swingx
Class JXStatusBar.Constraint
- java.lang.Object
-
- org.jdesktop.swingx.JXStatusBar.Constraint
-
- Enclosing class:
- JXStatusBar
public static class JXStatusBar.Constraint extends java.lang.ObjectThe constraint object to be used with theJXStatusBar. It takes a ResizeBehaviour, Insets and a Width. Width is only applicable for ResizeBehavior.FIXED. @see JXStatusBar class documentation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJXStatusBar.Constraint.ResizeBehavior
-
Field Summary
Fields Modifier and Type Field Description private intfixedWidthprivate java.awt.Insetsinsetsprivate JXStatusBar.Constraint.ResizeBehaviorresizeBehavior
-
Constructor Summary
Constructors Constructor Description Constraint()Creates a new Constraint with default FIXED behaviour and no insets.Constraint(int fixedWidth)Creates a new Constraint with default FIXED behaviour and the given fixed width.Constraint(int fixedWidth, java.awt.Insets insets)Creates a new Constraint with default FIXED behaviour and the given fixed width, and using the given Insets.Constraint(java.awt.Insets insets)Creates a new Constraint with default FIXED behaviour and the given insetsConstraint(JXStatusBar.Constraint.ResizeBehavior resizeBehavior)Creates a new Constraint with the specified resize behaviour and no insetsConstraint(JXStatusBar.Constraint.ResizeBehavior resizeBehavior, java.awt.Insets insets)Creates a new Constraint with the specified resize behavior and insets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFixedWidth()Get fixed width.java.awt.InsetsgetInsets()Returns the insets.JXStatusBar.Constraint.ResizeBehaviorgetResizeBehavior()Returns the ResizeBehavior.voidsetFixedWidth(int width)Set the fixed width the component added with this constraint will occupy on theJXStatusBar.
-
-
-
Field Detail
-
insets
private java.awt.Insets insets
-
resizeBehavior
private JXStatusBar.Constraint.ResizeBehavior resizeBehavior
-
fixedWidth
private int fixedWidth
-
-
Constructor Detail
-
Constraint
public Constraint()
Creates a new Constraint with default FIXED behaviour and no insets.
-
Constraint
public Constraint(java.awt.Insets insets)
Creates a new Constraint with default FIXED behaviour and the given insets- Parameters:
insets- may be null. If null, an Insets with 0 values will be used.
-
Constraint
public Constraint(int fixedWidth)
Creates a new Constraint with default FIXED behaviour and the given fixed width.- Parameters:
fixedWidth- must be >= 0
-
Constraint
public Constraint(int fixedWidth, java.awt.Insets insets)Creates a new Constraint with default FIXED behaviour and the given fixed width, and using the given Insets.- Parameters:
fixedWidth- must be >= 0insets- may be null. If null, an Insets with 0 values will be used.
-
Constraint
public Constraint(JXStatusBar.Constraint.ResizeBehavior resizeBehavior)
Creates a new Constraint with the specified resize behaviour and no insets- Parameters:
resizeBehavior- - either JXStatusBar.Constraint.ResizeBehavior.FIXED or JXStatusBar.Constraint.ResizeBehavior.FILL.
-
Constraint
public Constraint(JXStatusBar.Constraint.ResizeBehavior resizeBehavior, java.awt.Insets insets)
Creates a new Constraint with the specified resize behavior and insets.- Parameters:
resizeBehavior- - either JXStatusBar.Constraint.ResizeBehavior.FIXED or JXStatusBar.Constraints.ResizeBehavior.FILL.insets- may be null. If null, an Insets with 0 values will be used.
-
-
Method Detail
-
setFixedWidth
public void setFixedWidth(int width)
Set the fixed width the component added with this constraint will occupy on theJXStatusBar. Only applies to ResizeBehavior.FIXED. Will be ignored for ResizeBehavior.FILL.- Parameters:
width- - minimum width component will occupy. If 0, the preferred width of the component will be used. The width specified must be >= 0
-
getResizeBehavior
public JXStatusBar.Constraint.ResizeBehavior getResizeBehavior()
Returns the ResizeBehavior.- Returns:
- ResizeBehavior
-
getInsets
public java.awt.Insets getInsets()
Returns the insets.- Returns:
- insets
-
getFixedWidth
public int getFixedWidth()
Get fixed width. Width is zero for resize behavior FILLED- Returns:
- the width of this constraint
-
-