<CONSTRAINT> : Positioning Constraint

Java class : leon.view.LyConstraint

ROLE

A constraint allows specifying for a given graphical component the way it will be placed inside its parent (i.e. the graphical component that contains it).

ATTRIBUTES

<!ATTLIST CONSTRAINT
	  colSpan NMTOKEN "-2"
	  rowSpan NMTOKEN "-2"
	  remainder ( true | false) "false"
	  fill ( HORIZONTAL | VERTICAL | BOTH | NONE | DEFAULT) "DEFAULT"
	  hAlign ( LEFT | CENTER | RIGHT | DEFAULT) "DEFAULT"
	  vAlign ( TOP | MIDDLE | BOTTOM | DEFAULT) "DEFAULT"
	  cellPadding NMTOKEN "-2"
	  leftPadding NMTOKEN "-2"
	  rightPadding NMTOKEN "-2"
	  topPadding NMTOKEN "-2"
	  bottomPadding NMTOKEN "-2"
	  cellSpacing NMTOKEN "-2"
	  colWeight NMTOKEN "-2"
	  rowWeight NMTOKEN "-2"
	  nCols NMTOKEN #IMPLIED
	  nRows NMTOKEN #IMPLIED>
Attribute Mand. Description Default
colSpan no Allows specifying the width occupied by the component inside its parent in comparison with the other components.
The expected value is an integer value.
There is a special value, remainder, which allows specifying that the component must occupy the whole space remaining available in width.
A negative or null value is equivalent to the remainder value.
The value -2 corresponds to using the default size.
-2
rowSpan no Allows specifying the height occupied by the component inside its parent in comparison with the other components.
The expected value is an integer value.
There is a special value, remainder, which allows specifying that the component must occupy the whole space remaining available in height.
A negative or null value is equivalent to the remainder value.
The value -2 corresponds to using the default size.
-2
remainder no Allows specifying that the component occupies the whole space remaining in width. false
fill no Allows specifying the horizontal position of the component.
The DEFAULT value lets the viewer decide the way the component will be placed.
DEFAULT
hAlign no Allows specifying the horizontal position of the component.
The DEFAULT value lets the viewer decide the way the component will be placed.
DEFAULT
vAlign no Allows specifying the vertical position of the component.
The DEFAULT value lets the viewer decide the way the component will be placed.
DEFAULT
cellPadding no Allows specifying the margin that should be inserted around the component in the space that is reserved to it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
leftPadding no Allows specifying the margin that should be inserted at the left of the component in the space that is reserved to it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
rightPadding no Allows specifying the margin that should be inserted at the right of the component in the space that is reserved to it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
topPadding no Allows specifying the margin that should be inserted at the top of the component in the space that is reserved to it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
bottomPadding no Allows specifying the margin that should be inserted at the bottom of the component in the space that is reserved to it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
cellSpacing no Allows specifying the margin that should be inserted between the component and the components that are around it.
The expected value is a positive integer value corresponding to a number of pixels.
A negative value is equivalent to the value 0.
-2
colWeight no Allows specifying the percentage of horizontal enlargement of the component if its parent has enough free space available.
The expected value is a positive integer value corresponding to a weight (the weights of the different components contained in the parent allow to perform a barycentric distribution of the space that is allocated to each component).
A negative value is equivalent to the value 0.
-2
rowWeight no Allows specifying the percentage of vertical enlargement of the component if its parent has enough free space available.
The expected value is a positive integer value corresponding to a weight (the weights of the different components contained in the parent allow performing a barycentric distribution of the space that is allocated to each component).
A negative value is equivalent to the value 0.
-2
nCols no Gives the height (number of columns) on which the component is shown (given in number of characters). -1
nRows no Gives the width (number of rows) on which the component is shown (given in number of characters). -1

SAMPLE

<CONSTRAINT colSpan="remainder" rowSpan="3" fill="NONE"/>

<CONSTRAINT cellSpacing="100" cellPadding="100"/>