|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.LayoutStyle com.alee.laf.DefaultLayoutStyle
public class DefaultLayoutStyle
An implementation of LayoutStyle that returns 6 for related components, otherwise 12. This class also provides helper methods for subclasses.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.LayoutStyle |
---|
javax.swing.LayoutStyle.ComponentPlacement |
Constructor Summary | |
---|---|
DefaultLayoutStyle()
|
Method Summary | |
---|---|
protected int |
flipDirection(int position)
Returns flipped direction. |
int |
getButtonGap(javax.swing.JComponent c,
int position)
If c is a check box or radio button, and the border is not painted this returns the inset along the specified axis. |
protected int |
getButtonGap(javax.swing.JComponent source,
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. |
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)
|
protected int |
getIndent(javax.swing.JComponent c,
int position)
Returns the amount to indent the specified component if it's a JCheckBox or JRadioButton. |
static javax.swing.LayoutStyle |
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)
|
protected boolean |
isLabelAndNonlabel(javax.swing.JComponent c1,
javax.swing.JComponent c2,
int position)
Returns true if the classes identify a JLabel and a non-JLabel along the horizontal axis, false otherwise. |
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 |
---|
public DefaultLayoutStyle()
Method Detail |
---|
public static javax.swing.LayoutStyle getInstance()
public int getPreferredGap(javax.swing.JComponent component1, javax.swing.JComponent component2, javax.swing.LayoutStyle.ComponentPlacement type, int position, java.awt.Container parent)
getPreferredGap
in class javax.swing.LayoutStyle
public int getContainerGap(javax.swing.JComponent component, int position, java.awt.Container parent)
getContainerGap
in class javax.swing.LayoutStyle
protected boolean isLabelAndNonlabel(javax.swing.JComponent c1, javax.swing.JComponent c2, int position)
c1
- first componentc2
- second componentposition
- position doing layout along
protected int getButtonGap(javax.swing.JComponent source, javax.swing.JComponent target, int position, int offset)
source
- first componenttarget
- second componentposition
- position doing layout alongoffset
- Ideal offset, not including border/margin
protected int getButtonGap(javax.swing.JComponent source, int position, int offset)
source
- componentposition
- position doing layout alongoffset
- ideal offset, not including border/margin
public int getButtonGap(javax.swing.JComponent c, int position)
c
is a check box or radio button, and the border is not painted this returns the inset along the specified axis.
c
- componentposition
- position doing layout along
protected int flipDirection(int position)
position
- position doing layout along
protected int getIndent(javax.swing.JComponent c, int position)
c
- componentposition
- position doing layout along
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |