org.eclipse.swt.layout
Class FormAttachment

java.lang.Object
  |
  +--org.eclipse.swt.layout.FormAttachment

public final class FormAttachment
extends Object

Unsafe:


Field Summary
 int alignment
          Suppressed: alignment specifies the alignment of the control side that is attached to a control.
 Control control
          Suppressed: control specifies the control to which the control side is attached.
 int denominator
          Suppressed: denominator specifies the denominator of the "a" term in the equation, y = ax + b, which defines the attachment.
 int numerator
          Suppressed: numerator specifies the numerator of the "a" term in the equation, y = ax + b, which defines the attachment.
 int offset
          Suppressed: offset specifies the offset, in pixels, of the control side from the attachment position.
 
Constructor Summary
(package private) FormAttachment()
           
  FormAttachment(Control control)
          Suppressed: Constructs a new instance of this class given a control.
  FormAttachment(Control control, int offset)
          Suppressed: Constructs a new instance of this class given a control and an offset.
  FormAttachment(Control control, int offset, int alignment)
          Suppressed: Constructs a new instance of this class given a control, an offset and an alignment.
  FormAttachment(int numerator, int offset)
          Suppressed: Constructs a new instance of this class given a numerator and an offset.
  FormAttachment(int numerator, int denominator, int offset)
          Suppressed: Constructs a new instance of this class given a numerator and denominator and an offset.
 
Method Summary
(package private)  FormAttachment divide(int value)
           
(package private)  int gcd(int m, int n)
           
(package private)  FormAttachment minus(FormAttachment attachment)
           
(package private)  FormAttachment minus(int value)
           
(package private)  FormAttachment plus(FormAttachment attachment)
           
(package private)  FormAttachment plus(int value)
           
(package private)  int solveX(int value)
           
(package private)  int solveY(int value)
           
 String toString()
          Suppressed:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numerator

public int numerator
Suppressed: numerator specifies the numerator of the "a" term in the equation, y = ax + b, which defines the attachment.


denominator

public int denominator
Suppressed: denominator specifies the denominator of the "a" term in the equation, y = ax + b, which defines the attachment. The default value is 100.


offset

public int offset
Suppressed: offset specifies the offset, in pixels, of the control side from the attachment position. If the offset is positive, then the control side is offset to the right of or below the attachment position. If it is negative, then the control side is offset to the left of or above the attachment position. This is equivalent to the "b" term in the equation y = ax + b. The default value is 0.


control

public Control control
Suppressed: control specifies the control to which the control side is attached.


alignment

public int alignment
Suppressed: alignment specifies the alignment of the control side that is attached to a control. For top and bottom attachments, TOP, BOTTOM and CENTER are used. For left and right attachments, LEFT, RIGHT and CENTER are used. If any other case occurs, the default will be used instead. Possible values are: TOP: Attach the side to the top side of the specified control. BOTTOM : Attach the side to the bottom side of the specified control. LEFT: Attach the side to the left side of the specified control. RIGHT: Attach the side to the right side of the specified control. CENTER: Attach the side at a position which will center the control on the specified control. DEFAULT: Attach the side to the adjacent side of the specified control.

Constructor Detail

FormAttachment

FormAttachment()

FormAttachment

public FormAttachment(int numerator,
                      int denominator,
                      int offset)
Suppressed: Constructs a new instance of this class given a numerator and denominator and an offset. The position of the side is given by the fraction of the form defined by the numerator and denominator.

Parameters:
numerator - the numerator of the position
denominator - the denominator of the position
offset - the offset of the side from the position

FormAttachment

public FormAttachment(int numerator,
                      int offset)
Suppressed: Constructs a new instance of this class given a numerator and an offset. Since no denominator is specified, the default is to read the numerator as a percentage of the form, with a denominator of 100.

Parameters:
numerator - the percentage of the position
offset - the offset of the side from the position

FormAttachment

public FormAttachment(Control control,
                      int offset,
                      int alignment)
Suppressed: Constructs a new instance of this class given a control, an offset and an alignment.

Parameters:
control - the control the side is attached to
offset - the offset of the side from the control
alignment - the alignment of the side to the control it is attached to

FormAttachment

public FormAttachment(Control control,
                      int offset)
Suppressed: Constructs a new instance of this class given a control and an offset. Since no alignment is specified, the default alignment is to attach the side to the adjacent side of the specified control.

Parameters:
control - the control the side is attached to
offset - the offset of the side from the control

FormAttachment

public FormAttachment(Control control)
Suppressed: Constructs a new instance of this class given a control. Since no alignment is specified, the default alignment is to attach the side to the adjacent side of the specified control. Since no offset is specified, an offset of 0 is used.

Parameters:
control - the control the side is attached to
Method Detail

divide

FormAttachment divide(int value)

gcd

int gcd(int m,
        int n)

minus

FormAttachment minus(FormAttachment attachment)

minus

FormAttachment minus(int value)

plus

FormAttachment plus(FormAttachment attachment)

plus

FormAttachment plus(int value)

solveX

int solveX(int value)

solveY

int solveY(int value)

toString

public String toString()
Suppressed:

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?