Search in sources :

Example 1 with JavaScene

use of limelight.java.JavaScene in project limelight by slagyr.

the class Alert method checkMessageHeight.

public void checkMessageHeight(PanelEvent event) {
    JavaScene scene = (JavaScene) event.getProp();
    JavaProp advice = scene.findProp("advice");
    final int lines = advice.getText().split("[\r|\r\n]").length;
    if (lines > 32)
        advice.getStyle().setVerticalScrollbar("on");
}
Also used : JavaScene(limelight.java.JavaScene) JavaProp(limelight.java.JavaProp)

Example 2 with JavaScene

use of limelight.java.JavaScene in project limelight by slagyr.

the class IncompatibleVersion method populateTextLabels.

public void populateTextLabels(PanelEvent event) {
    final JavaProp prop = (JavaProp) event.getProp();
    JavaScene scene = prop.getScene();
    Utilities utilities = getUtilities(prop);
    scene.findProp("productionNameLabel").setText(utilities.incompatibleVersionProductionName);
    scene.findProp("requiredVersionLabel").setText(utilities.incompatibleVersionRequiredVersion);
    scene.findProp("currentVersionLabel").setText(About.version.toString());
}
Also used : JavaScene(limelight.java.JavaScene) JavaProp(limelight.java.JavaProp)

Example 3 with JavaScene

use of limelight.java.JavaScene in project limelight by slagyr.

the class UtilitiesTest method alertSceneClosesWhenClickingOk.

@Test
public void alertSceneClosesWhenClickingOk() throws Exception {
    startAlert("A friendly message.");
    FramedStage alertStage = waitForStage("Alert");
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    final JavaProp okButton = scene.findProp("okButton");
    assertNotNull(okButton);
    Mouse.click(okButton);
    waitForDialogResponse();
    assertEquals(true, dialogResponse);
}
Also used : JavaScene(limelight.java.JavaScene) JavaProp(limelight.java.JavaProp) FramedStage(limelight.ui.model.FramedStage)

Example 4 with JavaScene

use of limelight.java.JavaScene in project limelight by slagyr.

the class UtilitiesTest method alertScene.

@Test
public void alertScene() throws Exception {
    startAlert("A friendly message.");
    FramedStage alertStage = waitForStage("Alert");
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    assertEquals("Limelight Alert", scene.findProp("title").getText());
    assertEquals("A friendly message.", scene.findProp("advice").getText());
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Example 5 with JavaScene

use of limelight.java.JavaScene in project limelight by slagyr.

the class UtilitiesTest method incompatibleVersionSceneComponents.

@Test
public void incompatibleVersionSceneComponents() throws Exception {
    startProceedWithIncompatibleVersion();
    FramedStage stage = waitForStage("Incompatible Version");
    JavaScene scene = (JavaScene) stage.getScene().getProxy();
    assertEquals("Some Production", scene.findProp("productionNameLabel").getText());
    assertEquals("1.2.3", scene.findProp("requiredVersionLabel").getText());
    assertEquals(About.version.toString(), scene.findProp("currentVersionLabel").getText());
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Aggregations

JavaScene (limelight.java.JavaScene)9 FramedStage (limelight.ui.model.FramedStage)7 JavaProp (limelight.java.JavaProp)5