Added some new make[HV]Box variants.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@851 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2002-09-25 07:26:19 +00:00
parent db0d6a7407
commit 64355cce3c
@@ -1,5 +1,5 @@
//
// $Id: GroupLayout.java,v 1.5 2002/05/16 02:02:38 mdb Exp $
// $Id: GroupLayout.java,v 1.6 2002/09/25 07:26:19 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -324,6 +324,16 @@ public abstract class GroupLayout
return new JPanel(new HGroupLayout());
}
/**
* Creates a {@link JPanel} that is configured with an {@link
* HGroupLayout} with a configuration that stretches in both
* directions, with the specified gap.
*/
public static JPanel makeHStretchBox (int gap)
{
return new JPanel(new HGroupLayout(STRETCH, STRETCH, gap, CENTER));
}
/**
* Creates a {@link JPanel} that is configured with an {@link
* HGroupLayout} with the specified on-axis policy (default
@@ -397,6 +407,16 @@ public abstract class GroupLayout
DEFAULT_GAP, justification));
}
/**
* Creates a {@link JPanel} that is configured with an {@link
* VGroupLayout} with a configuration that stretches in both
* directions, with the specified gap.
*/
public static JPanel makeVStretchBox (int gap)
{
return new JPanel(new VGroupLayout(STRETCH, STRETCH, gap, CENTER));
}
protected int _policy = NONE;
protected int _offpolicy = CONSTRAIN;
protected int _gap = DEFAULT_GAP;