summaryrefslogtreecommitdiff
path: root/src/main/java/org/cristalise/gui/tabs/outcome/form/DimensionInstance.java
blob: da817c26d57e467d31fe7d78d9394539704347d3 (plain)
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
28
29
30
31
32
33
package org.cristalise.gui.tabs.outcome.form;
import org.cristalise.gui.tabs.outcome.OutcomeException;
import org.exolab.castor.xml.schema.ElementDecl;


public class DimensionInstance extends DataRecord {

    //probably will be needed to synch edits later
    Dimension parentDimension;
    int tabNumber;
    String tabName = null;

    public DimensionInstance(ElementDecl model, boolean readOnly , HelpPane help, boolean deferred) throws OutcomeException {
        super(model, readOnly, help, deferred);
    }

    public void setTabNumber(int tabNumber) {
        this.tabNumber=tabNumber;
    }

    public void setParent(Dimension parent) {
        this.parentDimension = parent;
    }

    @Override
	public String getName() {
        //TODO appinfo for picking out attributes or child elements for tab name
        if (tabName == null)
            return Integer.toString(tabNumber);
        else
            return tabName;
    }
}