|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.mariottini.layout.SimplePileLayout
public final class SimplePileLayout
A layout manager that piles components either vertically or horizontally.
Components are layed out with their preferred with and height.
This is a semplified version of PileLayout.
See the document "How to use PileLayout"
for more information.
Copyright © 2006, 2007 Roberto Mariottini. All rights reserved.
Permission is granted to anyone to use this software in source and binary forms
for any purpose, with or without modification, including commercial applications,
and to alter it and redistribute it freely, provided that the following conditions
are met:
o Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
o The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
o Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
| Field Summary | |
|---|---|
static int |
DIRECTION_HORIZONTAL
the placement direction is horizontal |
static int |
DIRECTION_VERTICAL
the placement direction is vertical |
| Constructor Summary | |
|---|---|
SimplePileLayout(int direction)
Builds a SimplePileLayout with the specified placement direction, with the default gap and with the default margins. |
|
SimplePileLayout(int direction,
Insets margins)
Builds a SimplePileLayout with the specified placement direction, with the default gap and with the specified margins. |
|
SimplePileLayout(int direction,
int gap)
Builds a SimplePileLayout with the specified placement direction and with the specified gap, used also for the margins. |
|
SimplePileLayout(int direction,
int gap,
Insets margins)
Builds a SimplePileLayout with the specified placement direction, with the specified gap and with the specified margins. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(String x,
Component comp)
|
void |
layoutContainer(Container cont)
|
Dimension |
minimumLayoutSize(Container cont)
|
Dimension |
preferredLayoutSize(Container cont)
|
void |
removeLayoutComponent(Component comp)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DIRECTION_HORIZONTAL
public static final int DIRECTION_VERTICAL
| Constructor Detail |
|---|
public SimplePileLayout(int direction)
direction - one of DIRECTION_HORIZONTAL or DIRECTION_VERTICAL
public SimplePileLayout(int direction,
int gap)
direction - one of DIRECTION_HORIZONTAL or DIRECTION_VERTICALgap - the gap used for component spacing and also for margins
public SimplePileLayout(int direction,
Insets margins)
direction - one of DIRECTION_HORIZONTAL or DIRECTION_VERTICALmargins - the margins to use
public SimplePileLayout(int direction,
int gap,
Insets margins)
direction - one of DIRECTION_HORIZONTAL or DIRECTION_VERTICALgap - the gap used for component spacingmargins - the margins to use| Method Detail |
|---|
public void addLayoutComponent(String x,
Component comp)
addLayoutComponent in interface LayoutManagerpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagerpublic Dimension preferredLayoutSize(Container cont)
preferredLayoutSize in interface LayoutManagerpublic Dimension minimumLayoutSize(Container cont)
minimumLayoutSize in interface LayoutManagerpublic void layoutContainer(Container cont)
layoutContainer in interface LayoutManager
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||