Package com.basiscomponents.ui.layout
Class BBContainerWrapper
- java.lang.Object
-
- com.basiscomponents.ui.layout.BBComponentWrapper
-
- com.basiscomponents.ui.layout.BBContainerWrapper
-
- All Implemented Interfaces:
ComponentWrapper,ContainerWrapper
public class BBContainerWrapper extends BBComponentWrapper implements ContainerWrapper
- Author:
- rlance
-
-
Field Summary
-
Fields inherited from interface net.miginfocom.layout.ComponentWrapper
TYPE_BUTTON, TYPE_CHECK_BOX, TYPE_COMBO_BOX, TYPE_CONTAINER, TYPE_IMAGE, TYPE_LABEL, TYPE_LIST, TYPE_PANEL, TYPE_PROGRESS_BAR, TYPE_SCROLL_BAR, TYPE_SCROLL_PANE, TYPE_SEPARATOR, TYPE_SLIDER, TYPE_SPINNER, TYPE_TABBED_PANE, TYPE_TABLE, TYPE_TEXT_AREA, TYPE_TEXT_FIELD, TYPE_TREE, TYPE_UNKNOWN, TYPE_UNSET
-
-
Constructor Summary
Constructors Constructor Description BBContainerWrapper(BBContainer container)ConstructorBBContainerWrapper(BBContainer container, Object layout)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(BBComponent component, CC cc)intgetComponentCount()Returns the number of components that this parent has.ComponentWrapper[]getComponents()Returns the components of the container that wrapper is wrapping.Map<BBComponent,BBComponentWrapper>getComponentToComponentWrapperMap()Map<BBComponent,Integer>getComponentToHashcodeMap()intgetComponentType(boolean disregardScrollPane)Returns the type of component that this wrapper is wrapping.List<BBComponentWrapper>getComponentWrapperList()Map<ComponentWrapper,CC>getComponentWrapperToCCMap()BBContainergetContainer()Map<com.basis.bbj.proxies.sysgui.BBjControl,BBComponentWrapper>getControlToComponentWrapperMap()ObjectgetLayout()Returns theLayoutHandler(in Swing terms) that is handling the layout of this container.booleanisLeftToRight()Returns if this container is using left-to-right component ordering.voidpaintDebugCell(int x, int y, int width, int height)Paints a cell to indicate where it is.voidsetComponentToComponentWrapperMap(Map<BBComponent,BBComponentWrapper> componentToComponentWrapperMap)voidsetComponentToHashcodeMap(Map<BBComponent,Integer> componentToHashcodeMap)voidsetComponentWrapperList(List<BBComponentWrapper> componentWrapperList)voidsetComponentWrapperToCCMap(Map<ComponentWrapper,CC> componentWrapperToCCMap)voidsetControlToComponentWrapperMap(Map<com.basis.bbj.proxies.sysgui.BBjControl,BBComponentWrapper> controlToComponentWrapperMap)voidsetLayout(Object layout)voidsetLeftToRight(boolean l2r)-
Methods inherited from class com.basiscomponents.ui.layout.BBComponentWrapper
equals, getBaseline, getComponent, getContainerWrapper, getContentBias, getHeight, getHorizontalScreenDPI, getLayoutHashCode, getLinkId, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getParent, getPixelUnitFactor, getPreferredHeight, getPreferredWidth, getScreenHeight, getScreenLocationX, getScreenLocationY, getScreenWidth, getVerticalScreenDPI, getVisualPadding, getWidth, getX, getY, hasBaseline, hashCode, isVisible, paintDebugOutline, setBounds, setContainerWrapper
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.miginfocom.layout.ComponentWrapper
getBaseline, getComponent, getContentBias, getHeight, getHorizontalScreenDPI, getLayoutHashCode, getLinkId, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getParent, getPixelUnitFactor, getPreferredHeight, getPreferredWidth, getScreenHeight, getScreenLocationX, getScreenLocationY, getScreenWidth, getVerticalScreenDPI, getVisualPadding, getWidth, getX, getY, hasBaseline, isVisible, paintDebugOutline, setBounds
-
-
-
-
Constructor Detail
-
BBContainerWrapper
public BBContainerWrapper(BBContainer container)
Constructor
-
BBContainerWrapper
public BBContainerWrapper(BBContainer container, Object layout)
Constructor
-
-
Method Detail
-
getContainer
public BBContainer getContainer()
- Returns:
- the container
-
getComponents
public ComponentWrapper[] getComponents()
Description copied from interface:ContainerWrapperReturns the components of the container that wrapper is wrapping.- Specified by:
getComponentsin interfaceContainerWrapper- Returns:
- The components of the container that wrapper is wrapping. Never
null.
-
getComponentCount
public int getComponentCount()
Description copied from interface:ContainerWrapperReturns the number of components that this parent has.- Specified by:
getComponentCountin interfaceContainerWrapper- Returns:
- The number of components that this parent has.
-
getLayout
public Object getLayout()
Description copied from interface:ContainerWrapperReturns theLayoutHandler(in Swing terms) that is handling the layout of this container. If there exist no such class the method should return the same asComponentWrapper.getComponent(), which is the container itself.- Specified by:
getLayoutin interfaceContainerWrapper- Returns:
- The layout handler instance. Never
null.
-
setLayout
public void setLayout(Object layout)
- Parameters:
layout- the layout to set
-
isLeftToRight
public boolean isLeftToRight()
Description copied from interface:ContainerWrapperReturns if this container is using left-to-right component ordering.- Specified by:
isLeftToRightin interfaceContainerWrapper- Returns:
- If this container is using left-to-right component ordering.
-
setLeftToRight
public void setLeftToRight(boolean l2r)
-
paintDebugCell
public void paintDebugCell(int x, int y, int width, int height)Description copied from interface:ContainerWrapperPaints a cell to indicate where it is.- Specified by:
paintDebugCellin interfaceContainerWrapper- Parameters:
x- The x coordinate to start the drawing.y- The x coordinate to start the drawing.width- The width to draw/fillheight- The height to draw/fill
-
getComponentType
public int getComponentType(boolean disregardScrollPane)
Description copied from interface:ComponentWrapperReturns the type of component that this wrapper is wrapping.This method can be invoked often so the result should be cached.
- Specified by:
getComponentTypein interfaceComponentWrapper- Overrides:
getComponentTypein classBBComponentWrapper- Parameters:
disregardScrollPane- Istrueany wrapping scroll pane should be disregarded and the type of the scrolled component should be returned.- Returns:
- The type of component that this wrapper is wrapping. E.g.
ComponentWrapper.TYPE_LABEL.
-
getComponentWrapperList
public List<BBComponentWrapper> getComponentWrapperList()
- Returns:
- the componentWrapperList
-
setComponentWrapperList
public void setComponentWrapperList(List<BBComponentWrapper> componentWrapperList)
- Parameters:
componentWrapperList- the componentWrapperList to set
-
getComponentToComponentWrapperMap
public Map<BBComponent,BBComponentWrapper> getComponentToComponentWrapperMap()
- Returns:
- the componentToComponentWrapperMap
-
setComponentToComponentWrapperMap
public void setComponentToComponentWrapperMap(Map<BBComponent,BBComponentWrapper> componentToComponentWrapperMap)
- Parameters:
componentToComponentWrapperMap- the componentToComponentWrapperMap to set
-
getControlToComponentWrapperMap
public Map<com.basis.bbj.proxies.sysgui.BBjControl,BBComponentWrapper> getControlToComponentWrapperMap()
- Returns:
- the controlToComponentWrapperMap
-
setControlToComponentWrapperMap
public void setControlToComponentWrapperMap(Map<com.basis.bbj.proxies.sysgui.BBjControl,BBComponentWrapper> controlToComponentWrapperMap)
- Parameters:
controlToComponentWrapperMap- the controlToComponentWrapperMap to set
-
getComponentWrapperToCCMap
public Map<ComponentWrapper,CC> getComponentWrapperToCCMap()
- Returns:
- the componentWrapperToCCMap
-
setComponentWrapperToCCMap
public void setComponentWrapperToCCMap(Map<ComponentWrapper,CC> componentWrapperToCCMap)
- Parameters:
componentWrapperToCCMap- the componentWrapperToCCMap to set
-
getComponentToHashcodeMap
public Map<BBComponent,Integer> getComponentToHashcodeMap()
- Returns:
- the componentToHashcodeMap
-
setComponentToHashcodeMap
public void setComponentToHashcodeMap(Map<BBComponent,Integer> componentToHashcodeMap)
- Parameters:
componentToHashcodeMap- the componentToHashcodeMap to set
-
add
public void add(BBComponent component, CC cc)
-
-