summaryrefslogtreecommitdiff
path: root/src/fjbg/ch/epfl/lamp/fjbg/JLabel.java
blob: a8ba479c7ba601e12cc9712a650e4e442d024c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// $Id$

package ch.epfl.lamp.fjbg;

/**
 * Labels which can be attached to instructions.
 *
 * @version 1.0
 * @author Michel Schinz
 */

public class JLabel {
    public final static int UNDEFINED_ANCHOR = -1;
    protected int anchor = UNDEFINED_ANCHOR;

    public boolean isAnchored() { return anchor != UNDEFINED_ANCHOR; }

    public int getAnchor() {
	assert isAnchored();
        return anchor;
    }

    public void setAnchor(int anchor) {
	assert !isAnchored();
        this.anchor = anchor;
    }
}