Class SwingContainerWrapper
java.lang.Object
net.miginfocom.swing.SwingComponentWrapper
net.miginfocom.swing.SwingContainerWrapper
- All Implemented Interfaces:
ComponentWrapper, ContainerWrapper
-
Field Summary
FieldsFields inherited from interface 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 -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of components that this parent has.Returns the components of the container that wrapper is wrapping.intgetComponentType(boolean disregardScrollPane) Returns the type of component that this wrapper is wrapping.Returns theLayoutHandler(in Swing terms) that is handling the layout of this container.intReturns a hash code that should be reasonably different for anything that might change the layout.final booleanReturns if this container is using left-to-right component ordering.final voidpaintDebugCell(int x, int y, int width, int height) Paints a cell to indicate where it is.Methods inherited from class SwingComponentWrapper
equals, getBaseline, getComponent, getContentBias, getHeight, getHorizontalScreenDPI, getLinkId, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getParent, getPixelUnitFactor, getPreferredHeight, getPreferredWidth, getScreenHeight, getScreenLocationX, getScreenLocationY, getScreenWidth, getVerticalScreenDPI, getVisualPadding, getWidth, getX, getY, hasBaseline, hashCode, isMaxSizeSetOn1_4, isVisible, isVisualPaddingEnabled, paintDebugOutline, setBounds, setMaxSizeSetOn1_4, setVisualPaddingEnabledMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComponentWrapper
getBaseline, getComponent, getContentBias, getHeight, getHorizontalScreenDPI, getLinkId, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getParent, getPixelUnitFactor, getPreferredHeight, getPreferredWidth, getScreenHeight, getScreenLocationX, getScreenLocationY, getScreenWidth, getVerticalScreenDPI, getVisualPadding, getWidth, getX, getY, hasBaseline, isVisible, paintDebugOutline, setBounds
-
Field Details
-
DB_CELL_OUTLINE
Debug color for cell outline.
-
-
Constructor Details
-
SwingContainerWrapper
-
-
Method Details
-
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
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.
-
isLeftToRight
public final 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.
-
paintDebugCell
public final 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 classSwingComponentWrapper- 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.
-
getLayoutHashCode
public int getLayoutHashCode()Description copied from interface:ComponentWrapperReturns a hash code that should be reasonably different for anything that might change the layout. This value is used to know if the component layout needs to clear any caches.- Specified by:
getLayoutHashCodein interfaceComponentWrapper- Overrides:
getLayoutHashCodein classSwingComponentWrapper- Returns:
- A hash code that should be reasonably different for anything that might change the layout. Returns -1 if the widget is disposed.
-