com.alee.laf
Class WebLayoutStyle
java.lang.Object
javax.swing.LayoutStyle
com.alee.laf.DefaultLayoutStyle
com.alee.laf.WebLayoutStyle
public class WebLayoutStyle
- extends DefaultLayoutStyle
Almost the same as the MetalLookAndFeel LayoutStyle class as it fits WebLaF perfectly.
- Author:
- Mikle Garin
Nested classes/interfaces inherited from class javax.swing.LayoutStyle |
javax.swing.LayoutStyle.ComponentPlacement |
Method Summary |
protected int |
getButtonGap(javax.swing.JComponent source,
javax.swing.JComponent target,
int position,
int offset)
For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border. |
int |
getContainerGap(javax.swing.JComponent component,
int position,
java.awt.Container parent)
|
static WebLayoutStyle |
getInstance()
Returns instance of this layout style. |
int |
getPreferredGap(javax.swing.JComponent component1,
javax.swing.JComponent component2,
javax.swing.LayoutStyle.ComponentPlacement type,
int position,
java.awt.Container parent)
|
Methods inherited from class javax.swing.LayoutStyle |
setInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebLayoutStyle
public WebLayoutStyle()
getInstance
public static WebLayoutStyle getInstance()
- Returns instance of this layout style.
- Returns:
- instance of this layout style
getPreferredGap
public int getPreferredGap(javax.swing.JComponent component1,
javax.swing.JComponent component2,
javax.swing.LayoutStyle.ComponentPlacement type,
int position,
java.awt.Container parent)
-
- Overrides:
getPreferredGap
in class DefaultLayoutStyle
getContainerGap
public int getContainerGap(javax.swing.JComponent component,
int position,
java.awt.Container parent)
-
- Overrides:
getContainerGap
in class DefaultLayoutStyle
getButtonGap
protected int getButtonGap(javax.swing.JComponent source,
javax.swing.JComponent target,
int position,
int offset)
- For some look and feels check boxs and radio buttons typically don't paint the border, yet they have padding for a border. Look and
feel guidelines generally don't include this space. Use this method to subtract this space from the specified components.
- Overrides:
getButtonGap
in class DefaultLayoutStyle
- Parameters:
source
- first componenttarget
- second componentposition
- position doing layout alongoffset
- Ideal offset, not including border/margin
- Returns:
- offset - border/margin around the component