com.sibvisions.rad.ui.swing.impl.layout
Class AwtFormLayout.AwtAnchor

java.lang.Object
  extended by com.sibvisions.rad.ui.awt.impl.AwtResource<JVxFormLayout.Anchor>
      extended by com.sibvisions.rad.ui.swing.impl.layout.AwtFormLayout.AwtAnchor
All Implemented Interfaces:
IResource, IFormLayout.IAnchor
Enclosing class:
AwtFormLayout

public static class AwtFormLayout.AwtAnchor
extends AwtResource<JVxFormLayout.Anchor>
implements IFormLayout.IAnchor

The Anchor gives the possible horizontal and vertical positions.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
resource
 
Fields inherited from interface javax.rad.ui.layout.IFormLayout.IAnchor
HORIZONTAL, VERTICAL
 
Constructor Summary
protected AwtFormLayout.AwtAnchor(AwtFormLayout pLayout, JVxFormLayout.Anchor pAnchor)
          Constructs a new AwtAnchor.
 
Method Summary
 int getAbsolutePosition()
          Returns the absolute position of this Anchor in this FormLayout.
 IFormLayout.IAnchor getBorderAnchor()
          Gets the related border anchor to this anchor.
 IFormLayout getLayout()
          Returns the Layout to which this Anchor belongs.
 int getOrientation()
          Returns whether the orientation of this Anchor is HORIZONTAL or VERTICAL.
 int getPosition()
          Returns the position of this Anchor.
 IFormLayout.IAnchor getRelatedAnchor()
          Returns the related Anchor.
 IFormLayout.IAnchor getRelativeAnchor()
          Gets the related unused auto size anchor.
 float getRelativePosition()
          Returns the position of this Anchor.
 IFormLayout.IAnchor getSecondRelatedAnchor()
          Returns the second related Anchor.
 boolean isAutoSize()
          Returns true, if the position of this anchor is calculated automatically.
 boolean isBorderAnchor()
          Returns true, if this anchor is the border anchor.
 boolean isRelative()
          true, if the anchor is relative.
 void setAutoSize(boolean pAutoSize)
          Sets, if the position of this anchor is calculated automatically.
 void setPosition(int pPosition)
          Sets the position of this Anchor.
 void setRelatedAnchor(IFormLayout.IAnchor pRelatedAnchor)
          Sets the related Anchor.
 void setRelativePosition(float pRelativePosition)
          Sets the position of this Anchor.
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
equals, getResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

AwtFormLayout.AwtAnchor

protected AwtFormLayout.AwtAnchor(AwtFormLayout pLayout,
                                  JVxFormLayout.Anchor pAnchor)
Constructs a new AwtAnchor.

Parameters:
pLayout - the layout.
pAnchor - the anchor.
Method Detail

getLayout

public IFormLayout getLayout()
Returns the Layout to which this Anchor belongs.

Specified by:
getLayout in interface IFormLayout.IAnchor
Returns:
the layout.

getOrientation

public int getOrientation()
Returns whether the orientation of this Anchor is HORIZONTAL or VERTICAL.

Specified by:
getOrientation in interface IFormLayout.IAnchor
Returns:
the orientation.

isBorderAnchor

public boolean isBorderAnchor()
Returns true, if this anchor is the border anchor.

Returns:
the fixed.

getRelatedAnchor

public IFormLayout.IAnchor getRelatedAnchor()
Returns the related Anchor.

Specified by:
getRelatedAnchor in interface IFormLayout.IAnchor
Returns:
the relatedAnchor.

setRelatedAnchor

public void setRelatedAnchor(IFormLayout.IAnchor pRelatedAnchor)
Sets the related Anchor. It is only allowed to choose an anchor with same orientation from the same layout.

Parameters:
pRelatedAnchor - the relatedAnchor to set.

isAutoSize

public boolean isAutoSize()
Returns true, if the position of this anchor is calculated automatically.

Specified by:
isAutoSize in interface IFormLayout.IAnchor
Returns:
the fixed.

setAutoSize

public void setAutoSize(boolean pAutoSize)
Sets, if the position of this anchor is calculated automatically.

Specified by:
setAutoSize in interface IFormLayout.IAnchor
Parameters:
pAutoSize - the fixed to set.

getPosition

public int getPosition()
Returns the position of this Anchor. The position is only correct if the layout is valid.

Specified by:
getPosition in interface IFormLayout.IAnchor
Returns:
the position.

setPosition

public void setPosition(int pPosition)
Sets the position of this Anchor. It is not allowed to set the position of a border anchor.

Specified by:
setPosition in interface IFormLayout.IAnchor
Parameters:
pPosition - the position to set

getAbsolutePosition

public int getAbsolutePosition()
Returns the absolute position of this Anchor in this FormLayout. The position is only correct if the layout is valid.

Specified by:
getAbsolutePosition in interface IFormLayout.IAnchor
Returns:
the absolute position.

getBorderAnchor

public IFormLayout.IAnchor getBorderAnchor()
Gets the related border anchor to this anchor.

Specified by:
getBorderAnchor in interface IFormLayout.IAnchor
Returns:
the related border anchor.

isRelative

public boolean isRelative()
true, if the anchor is relative.

Returns:
true, if the anchor is relative.

getRelativeAnchor

public IFormLayout.IAnchor getRelativeAnchor()
Gets the related unused auto size anchor.

Returns:
the related unused auto size anchor.

getSecondRelatedAnchor

public IFormLayout.IAnchor getSecondRelatedAnchor()
Returns the second related Anchor. If the second Anchor is not null the autosize and position has no effect. The position of the anchor is only calculated relative to the two related anchors.

Specified by:
getSecondRelatedAnchor in interface IFormLayout.IAnchor
Returns:
the secondRelatedAnchor.

getRelativePosition

public float getRelativePosition()
Returns the position of this Anchor. The position is only correct if the layout is valid.

Specified by:
getRelativePosition in interface IFormLayout.IAnchor
Returns:
the position.

setRelativePosition

public void setRelativePosition(float pRelativePosition)
Sets the position of this Anchor. It is not allowed to set the position of a border anchor.

Specified by:
setRelativePosition in interface IFormLayout.IAnchor
Parameters:
pRelativePosition - the relative position


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.