com.alee.extended.menu
Class DynamicMenuLayout

java.lang.Object
  extended by com.alee.extended.layout.AbstractLayoutManager
      extended by com.alee.extended.menu.DynamicMenuLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

public class DynamicMenuLayout
extends AbstractLayoutManager

Custom dynamic menu layout. This layout takes care of each menu item position including positioning during animation.

Author:
Mikle Garin

Constructor Summary
DynamicMenuLayout()
           
 
Method Summary
 double getItemAngle(WebDynamicMenu menu, int index)
          Returns menu item angle relative to vertical axis.
 double getSingleComponentSpacing(WebDynamicMenu menu)
          Returns spacing angle between two menu components.
 double getStartingAngle(WebDynamicMenu menu)
          Returns menu items starting angle relative to vertical axis.
 void layoutContainer(java.awt.Container parent)
          
protected  void placeElement(WebDynamicMenu menu, int i, int x, int y)
          Places single menu item into its current position.
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          
 
Methods inherited from class com.alee.extended.layout.AbstractLayoutManager
addComponent, addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, removeComponent, removeLayoutComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMenuLayout

public DynamicMenuLayout()
Method Detail

layoutContainer

public void layoutContainer(java.awt.Container parent)


getSingleComponentSpacing

public double getSingleComponentSpacing(WebDynamicMenu menu)
Returns spacing angle between two menu components.

Parameters:
menu - processed menu
Returns:
spacing angle between two menu components

getStartingAngle

public double getStartingAngle(WebDynamicMenu menu)
Returns menu items starting angle relative to vertical axis.

Parameters:
menu - processed menu
Returns:
menu items starting angle relative to vertical axis

getItemAngle

public double getItemAngle(WebDynamicMenu menu,
                           int index)
Returns menu item angle relative to vertical axis.

Parameters:
menu - menu to process
index - menu item index
Returns:
menu item angle relative to vertical axis

placeElement

protected void placeElement(WebDynamicMenu menu,
                            int i,
                            int x,
                            int y)
Places single menu item into its current position.

Parameters:
menu - processed menu
i - menu item index
x - menu item center X coordinate
y - menu item center Y coordinate

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)