use of limelight.java.JavaProp 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");
}
use of limelight.java.JavaProp 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());
}
use of limelight.java.JavaProp 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);
}
use of limelight.java.JavaProp in project limelight by slagyr.
the class Button method press.
public void press(PanelEvent event) {
JavaProp prop = (JavaProp) event.getProp();
JavaProp screen = prop.getScene().findProp("lcd");
String text = prop.getText();
if ("c".equals(text))
screen.setText("");
else if ("=".equals(text))
screen.setText("Screw this!");
else
screen.setText(screen.getText() + text);
}
use of limelight.java.JavaProp in project limelight by slagyr.
the class Button method createButtons.
public void createButtons(PanelEvent event) {
JavaProp buttons = (JavaProp) event.getProp();
String labels = "1 2 3 + 4 5 6 - 7 8 9 * c 0 = /";
for (String label : labels.split(" ")) buttons.add(new JavaProp(Util.toMap("name", "calcButton", "text", label)));
}
Aggregations