public class AnchorLink extends Object
| Constructor and Description |
|---|
AnchorLink(Anchor masterAnchor,
Anchor slaveAnchor)
Constructor specifying the master and slave anchors.
|
AnchorLink(AnchorLink anchorLink)
Constructor specifying the anchor link to get the master and slave anchors from.
|
| Modifier and Type | Method and Description |
|---|---|
Anchor |
getMasterAnchor()
Gets the master anchor.
|
Point |
getRelativeSlaveLocation(Component masterComponent,
Component slaveComponent)
Computes the location of the specified component that is slaved to the specified master component using this
anchor link.
|
Point |
getRelativeSlaveLocation(Dimension masterSize,
Dimension slaveSize)
Computes the location of the slave component (whose size is specified) that is slaved to the master component
(whose size is specified) using this anchor link.
|
Point |
getRelativeSlaveLocation(int masterWidth,
int masterHeight,
int slaveWidth,
int slaveHeight)
Computes the location of the slave component (whose size is specified) that is slaved to the master component
(whose size is specified) using this anchor link.
|
Anchor |
getSlaveAnchor()
Gets the slave anchor.
|
void |
setMasterAnchor(Anchor masterAnchor)
Sets the master anchor.
|
void |
setSlaveAnchor(Anchor slaveAnchor)
Sets the slave anchor.
|
public AnchorLink(AnchorLink anchorLink)
anchorLink - Anchor link to get the master and slave anchors from.public Anchor getMasterAnchor()
public void setMasterAnchor(Anchor masterAnchor)
masterAnchor - Master anchor.public Anchor getSlaveAnchor()
public void setSlaveAnchor(Anchor slaveAnchor)
slaveAnchor - Slave anchor.public Point getRelativeSlaveLocation(Component masterComponent, Component slaveComponent)
masterComponent - Master component to which the other component is slaved.slaveComponent - Slave component that is slaved to the master component.public Point getRelativeSlaveLocation(Dimension masterSize, Dimension slaveSize)
masterSize - Size of the master component to which the other component is slaved.slaveSize - Size of the slave component that is slaved to the master component.public Point getRelativeSlaveLocation(int masterWidth, int masterHeight, int slaveWidth, int slaveHeight)
masterWidth - Width of the master component to which the other component is slaved.masterHeight - Height of the master component to which the other component is slaved.slaveWidth - Width of the slave component that is slaved to the master component.slaveHeight - Height of the slave component that is slaved to the master component.Copyright © 2015. All Rights Reserved.