1 package net.miginfocom.layout;
6 * Copyright (c) 2004, Mikael Grev, MiG InfoCom AB. (miglayout (at) miginfocom (dot) com)
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 * Redistributions of source code must retain the above copyright notice, this list
12 * of conditions and the following disclaimer.
13 * Redistributions in binary form must reproduce the above copyright notice, this
14 * list of conditions and the following disclaimer in the documentation and/or other
15 * materials provided with the distribution.
16 * Neither the name of the MiG InfoCom AB nor the names of its contributors may be
17 * used to endorse or promote products derived from this software without specific
18 * prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
26 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32 * @author Mikael Grev, MiG InfoCom AB
36 /** A class that wraps a container that contains components.
38 public interface ContainerWrapper extends ComponentWrapper
40 /** Returns the components of the container that wrapper is wrapping.
41 * @return The components of the container that wrapper is wrapping. Never <code>null</code>.
43 public abstract ComponentWrapper[] getComponents();
45 /** Returns the number of components that this parent has.
46 * @return The number of components that this parent has.
48 public abstract int getComponentCount();
50 /** Returns the <code>LayoutHandler</code> (in Swing terms) that is handling the layout of this container.
51 * If there exist no such class the method should return the same as {@link #getComponent()}, which is the
53 * @return The layout handler instance. Never <code>null</code>.
55 public abstract Object getLayout();
57 /** Returns if this container is using left-to-right component ordering.
58 * @return If this container is using left-to-right component ordering.
60 public abstract boolean isLeftToRight();
62 /** Paints a cell to indicate where it is.
63 * @param x The x coordinate to start the drawing.
64 * @param y The x coordinate to start the drawing.
65 * @param width The width to draw/fill
66 * @param height The height to draw/fill
68 public abstract void paintDebugCell(int x, int y, int width, int height);