public class MenuLayout extends Object implements LayoutManager
Constructor and Description |
---|
MenuLayout() |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component to the layout.
|
protected GraphicsConfiguration |
findGraphicsConfiguration(Component target)
Find the graphics configuration for the target popup (useful in case of
multiple screens).
|
int |
getColumnForComponentIndex(int index) |
protected Dimension |
getCompositeSize(Container target,
Dimension[] componentSizes)
Calculates the size of the target container given the sizes of the
components.
|
int |
getPreferredWidthForColumn(int index) |
void |
layoutContainer(Container target) |
Dimension |
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components
contained in the specified target container.
|
Dimension |
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components
in the specified target container.
|
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout.
|
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- the name of the componentcomp
- the the component to be addedpublic void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to removepublic Dimension preferredLayoutSize(Container target)
preferredLayoutSize
in interface LayoutManager
target
- the component which needs to be laid outContainer
,
minimumLayoutSize(java.awt.Container)
protected Dimension getCompositeSize(Container target, Dimension[] componentSizes)
minimumLayoutSize(java.awt.Container)
and preferredLayoutSize(java.awt.Container)
.target
- the component which needs to be laid outcomponentSizes
- array of dimensions for each menu componentDimension
value.protected GraphicsConfiguration findGraphicsConfiguration(Component target)
target
- the component for which the configuration needs to be found.public Dimension minimumLayoutSize(Container target)
minimumLayoutSize
in interface LayoutManager
target
- the component which needs to be laid outpreferredLayoutSize(java.awt.Container)
public void layoutContainer(Container target)
layoutContainer
in interface LayoutManager
public int getColumnForComponentIndex(int index)
public int getPreferredWidthForColumn(int index)
Copyright © 2024 GATE. All rights reserved.