Oracle Data-aware Controls Reference

oracle.dacf.layout
Class ControlConstraints

java.lang.Object
  extended byoracle.dacf.layout.ControlConstraints

public final class ControlConstraints
extends java.lang.Object

ControlConstraints is a class containing positioning and alignment information for components managed by layout manager classes which are derived from the LayoutManager3 interface. It allows you to specify:

This class is immutable. Once created it's state may not be modified.

Version:
PUBLIC
See Also:
LayoutManager3, ControlLayout, ColumnLayout, RowLayout

Field Summary
static int ALIGN_CENTER
          Constant used when the control is to be centred within its container.
static int ALIGN_LEFT
          Constant used when the control is to be left-aligned within its container.
static int ALIGN_RIGHT
          Constant used when the control is to be right-aligned within its container.
 
Constructor Summary
ControlConstraints()
          Parameterless class constructor.
ControlConstraints(int alignment)
          Class constructor where you can specify the alignment but accept the default gaps.
ControlConstraints(int alignment, int xgap, int ygap)
          Class constructor where you can specify the alignment and the gap values.
ControlConstraints(int alignment, int xgap, int ygap, int width, int height)
          Class constructor where you can specify all the constraint values.
 
Method Summary
static int convertAlignment(java.lang.String text)
          Convert a string representation of an alignment value to an integer.
 int getAlignment()
          Accessor method for the constraint object's alignment setting.
 java.lang.String getAlignmentString()
          Accessor method for the constraint object's alignment setting as a string.
 int getHeight()
          Accessor method for the constraint object's height setting.
 int getWidth()
          Accessor method for the constraint object's width setting.
 int getXGap()
          Accessor method for the contraint object's horizontal gap setting.
 int getYGap()
          Accessor method for the contraint object's vertical gap setting.
 java.lang.String toString()
          Generates a String which holds the settings of this constraint object in a human readable form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
Constant used when the control is to be left-aligned within its container.

See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
Constant used when the control is to be right-aligned within its container.

See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
Constant used when the control is to be centred within its container.

See Also:
Constant Field Values
Constructor Detail

ControlConstraints

public ControlConstraints()
Parameterless class constructor.


ControlConstraints

public ControlConstraints(int alignment)
Class constructor where you can specify the alignment but accept the default gaps.

Parameters:
alignment - the position of the controlinside the container

ControlConstraints

public ControlConstraints(int alignment,
                          int xgap,
                          int ygap)
Class constructor where you can specify the alignment and the gap values.

Parameters:
alignment - the position of the controlinside the container
xgap - the horizontal space to the previous control
ygap - the vertical space to the previous control

ControlConstraints

public ControlConstraints(int alignment,
                          int xgap,
                          int ygap,
                          int width,
                          int height)
Class constructor where you can specify all the constraint values.

Parameters:
alignment - the position of the controlinside the container
xgap - the horizontal space to the previous control
ygap - the vertical space to the previous control
width - the width of the control
height - the height of the control
Method Detail

convertAlignment

public static int convertAlignment(java.lang.String text)
                            throws java.lang.IllegalArgumentException
Convert a string representation of an alignment value to an integer. This method performs the inverse operation of getAlignmentString.

Parameters:
text - string representation of an alignment constant
Returns:
integer value corresponding to the text passed in
Throws:
java.lang.IllegalArgumentException - if the string passed in is not a valid alignment value
See Also:
getAlignmentString()

getAlignment

public int getAlignment()
Accessor method for the constraint object's alignment setting.

Returns:
alignment value

getAlignmentString

public java.lang.String getAlignmentString()
Accessor method for the constraint object's alignment setting as a string. This method performs the inverse operation to convertAlignment.

Returns:
alignment value as a string
See Also:
convertAlignment(java.lang.String)

getHeight

public int getHeight()
Accessor method for the constraint object's height setting.

Returns:
height value

getWidth

public int getWidth()
Accessor method for the constraint object's width setting.

Returns:
width value

getXGap

public int getXGap()
Accessor method for the contraint object's horizontal gap setting.

Returns:
horizontal gap value

getYGap

public int getYGap()
Accessor method for the contraint object's vertical gap setting.

Returns:
vertical gap value

toString

public java.lang.String toString()
Generates a String which holds the settings of this constraint object in a human readable form. The ControlConstraintsEditor relies on this method.

Returns:
a String representing this object's value.
See Also:
ControlConstraintsEditor

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.