com.alee.laf
Class WebLayoutStyle

java.lang.Object
  extended by javax.swing.LayoutStyle
      extended by com.alee.laf.DefaultLayoutStyle
          extended by 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 Class Summary
 
Nested classes/interfaces inherited from class javax.swing.LayoutStyle
javax.swing.LayoutStyle.ComponentPlacement
 
Constructor Summary
WebLayoutStyle()
           
 
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 com.alee.laf.DefaultLayoutStyle
flipDirection, getButtonGap, getButtonGap, getIndent, isLabelAndNonlabel
 
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
 

Constructor Detail

WebLayoutStyle

public WebLayoutStyle()
Method Detail

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 component
target - second component
position - position doing layout along
offset - Ideal offset, not including border/margin
Returns:
offset - border/margin around the component