com.levigo.util.swing
Class ButtonRowLayout

java.lang.Object
  extended by com.levigo.util.swing.ButtonRowLayout
All Implemented Interfaces:
LayoutManager

public class ButtonRowLayout
extends Object
implements LayoutManager

This Layout Manager could be used to comfotably layout button rows or similar containers.

It behaves in a similar manner to FlowLayout. All components will be layed out from left to right, but flushed right. All components will have the same size, the largest preferred width.

Author:
Carolin Köhler

Constructor Summary
ButtonRowLayout()
          Constructor for ButtonRowLayout.
ButtonRowLayout(int hGap)
          Constructor for ButtonRowLayout.
ButtonRowLayout(int hGap, int top, int left, int bottom, int right)
          Constructor for ButtonRowLayout.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
           
 void layoutContainer(Container parent)
           
 Dimension minimumLayoutSize(Container parent)
           
 Dimension preferredLayoutSize(Container parent)
           
 void removeLayoutComponent(Component comp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonRowLayout

@CallOnEDT
public ButtonRowLayout()
Constructor for ButtonRowLayout.


ButtonRowLayout

@CallOnEDT
public ButtonRowLayout(int hGap)
Constructor for ButtonRowLayout.

Parameters:
hGap - horizontal gap between the child components

ButtonRowLayout

@CallOnEDT
public ButtonRowLayout(int hGap,
                                 int top,
                                 int left,
                                 int bottom,
                                 int right)
Constructor for ButtonRowLayout.

Parameters:
hGap - horizontal gap between the child components
top - extra top margin
left - extra left margin
bottom - extra bottom margin
right - extra right margin
Method Detail

addLayoutComponent

@CallOnEDT
public void addLayoutComponent(String name,
                                         Component comp)
Specified by:
addLayoutComponent in interface LayoutManager
See Also:
LayoutManager.addLayoutComponent(String, Component)

removeLayoutComponent

@CallOnEDT
public void removeLayoutComponent(Component comp)
Specified by:
removeLayoutComponent in interface LayoutManager
See Also:
LayoutManager.removeLayoutComponent(Component)

preferredLayoutSize

@CallOnEDT
public Dimension preferredLayoutSize(Container parent)
Specified by:
preferredLayoutSize in interface LayoutManager
See Also:
LayoutManager.preferredLayoutSize(Container)

minimumLayoutSize

@CallOnEDT
public Dimension minimumLayoutSize(Container parent)
Specified by:
minimumLayoutSize in interface LayoutManager
See Also:
LayoutManager.minimumLayoutSize(Container)

layoutContainer

@CallOnEDT
public void layoutContainer(Container parent)
Specified by:
layoutContainer in interface LayoutManager
See Also:
LayoutManager.layoutContainer(Container)


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.