Oracle Data-aware Controls Reference

oracle.dacf.layout
Class ControlLayout

java.lang.Object
  extended byoracle.dacf.layout.LayoutManager3
      extended byoracle.dacf.layout.ControlLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

public final class ControlLayout
extends LayoutManager3

A control layout is one in which two components which act together as a single control can be drawn and manipulated together on screen. For example, a label could be associated with a text field, with the label acting as a data entry prompt for the text field. This layout manager will only deal with the last two components added to the container. Subsequent components will all be hidden.

Version:
PUBLIC
See Also:
LayoutManager, LayoutManager3

Field Summary
static int ARRANGE_HORIZONTAL
          Arrange the components in horizontally.
static int ARRANGE_PACK
          Arrange horizontally but pack as closely together as possible.
static int ARRANGE_VERTICAL
          Arrange the components in vertically.
 
Fields inherited from class oracle.dacf.layout.LayoutManager3
SIZE_MAXIMUM, SIZE_MINIMUM, SIZE_PREFERRED
 
Constructor Summary
ControlLayout()
          Parameterless class constructor.
ControlLayout(int arrangement)
          Class constructor which specifies the arrangement of controls.
ControlLayout(int arrangement, int weight)
          Class constructor which specifies the arrangement and weight of controls.
 
Method Summary
static int convertArrangement(java.lang.String text)
          Convert a string representation of an arrangement value to an integer.
 int getArrangement()
          Getter for the control arrangement parameter.
 int getWeight()
          Getter for the percentage of the container taken up by the first control.
 void layoutContainer(java.awt.Container parent)
          Lays out the container in the specified panel.
protected  java.awt.Dimension layoutSize(java.awt.Container parent, int type)
          Computes the indicated container size dimensions.
 void setArrangement(int arrangement)
          Setter for the control arrangement parameter.
 void setWeight(int weight)
          Setter for the percentage of the container taken up by the first control.
 java.lang.String toString()
          Generates a String which holds the settings of this layout manager in a human readable form.
 
Methods inherited from class oracle.dacf.layout.LayoutManager3
addLayoutComponent, addLayoutComponent, findConstraints, getComponentBounds, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ARRANGE_HORIZONTAL

public static final int ARRANGE_HORIZONTAL
Arrange the components in horizontally.

See Also:
Constant Field Values

ARRANGE_VERTICAL

public static final int ARRANGE_VERTICAL
Arrange the components in vertically.

See Also:
Constant Field Values

ARRANGE_PACK

public static final int ARRANGE_PACK
Arrange horizontally but pack as closely together as possible.

See Also:
Constant Field Values
Constructor Detail

ControlLayout

public ControlLayout()
Parameterless class constructor.


ControlLayout

public ControlLayout(int arrangement)
Class constructor which specifies the arrangement of controls.

Parameters:
arrangement - layout of controls within the container

ControlLayout

public ControlLayout(int arrangement,
                     int weight)
Class constructor which specifies the arrangement and weight of controls.

Parameters:
arrangement - layout of controls within the container
weight - percent of the panel used by the first control
Method Detail

convertArrangement

public static int convertArrangement(java.lang.String text)
                              throws java.lang.IllegalArgumentException
Convert a string representation of an arrangement value to an integer.

Parameters:
text - string representation of an arrangement constant
Returns:
integer value corresponding to the text passed in
Throws:
java.lang.IllegalArgumentException - if the string passed in is not a valid arrangement value

getArrangement

public int getArrangement()
Getter for the control arrangement parameter.

Returns:
the current control arrangement

getWeight

public int getWeight()
Getter for the percentage of the container taken up by the first control.

Returns:
the first control's weight

layoutContainer

public void layoutContainer(java.awt.Container parent)
Lays out the container in the specified panel.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Specified by:
layoutContainer in class LayoutManager3
Parameters:
parent - component which needs to be laid out
See Also:
LayoutManager.layoutContainer(java.awt.Container)

layoutSize

protected java.awt.Dimension layoutSize(java.awt.Container parent,
                                        int type)
Computes the indicated container size dimensions. Only the first two components are counted. Any others are ignored.

Specified by:
layoutSize in class LayoutManager3
Parameters:
parent - container to be laid out
type - _MINIMUM, _MAXIMUM or _PREFERRED
Returns:
Dimension object with the container's requested size

setArrangement

public void setArrangement(int arrangement)
Setter for the control arrangement parameter.

Parameters:
arrangement - the current control arrangement

setWeight

public void setWeight(int weight)
Setter for the percentage of the container taken up by the first control.

Parameters:
weight - the first control's weight

toString

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

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

Oracle Data-aware Controls Reference

 

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