Search in sources :

Example 1 with InstanceContent

use of org.openide.util.lookup.InstanceContent in project blue by kunstmusik.

the class ScoreControllerTest method setUp.

@Before
public void setUp() {
    System.out.println("@Before setUp");
    this.scoreController = ScoreController.getInstance();
    scoreController.setScrollPane(new JScrollPane());
    InstanceContent content = new InstanceContent();
    Score score = new Score();
    scoreController.setScore(score);
    PolyObject pObj = (PolyObject) score.get(0);
    SoundLayer layer1 = new SoundLayer();
    SoundLayer layer2 = new SoundLayer();
    pObj.add(layer1);
    pObj.add(layer2);
    GenericScore score1 = new GenericScore();
    score1.setStartTime(2.0f);
    GenericScore score2 = new GenericScore();
    score2.setStartTime(4.0f);
    layer2.add(score1);
    layer2.add(score2);
    content.add(score);
    content.add(score1);
    content.add(score2);
    scoreController.setLookupAndContent(new AbstractLookup(content), content);
    this.buffer = scoreController.getScoreObjectBuffer();
}
Also used : JScrollPane(javax.swing.JScrollPane) Score(blue.score.Score) GenericScore(blue.soundObject.GenericScore) SoundLayer(blue.SoundLayer) InstanceContent(org.openide.util.lookup.InstanceContent) GenericScore(blue.soundObject.GenericScore) AbstractLookup(org.openide.util.lookup.AbstractLookup) PolyObject(blue.soundObject.PolyObject) Before(org.junit.Before)

Aggregations

SoundLayer (blue.SoundLayer)1 Score (blue.score.Score)1 GenericScore (blue.soundObject.GenericScore)1 PolyObject (blue.soundObject.PolyObject)1 JScrollPane (javax.swing.JScrollPane)1 Before (org.junit.Before)1 AbstractLookup (org.openide.util.lookup.AbstractLookup)1 InstanceContent (org.openide.util.lookup.InstanceContent)1