private void initGoButton() { goButton = new Button("Go"); goButton.setLayoutX( ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "go-x"))); goButton.setLayoutY( ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "go-y"))); root.getChildren().add(goButton); }
private void initXmlList() { xmlLoader = new ComboBox<String>(); xmlLoader.setPromptText("XML File to Load"); xmlLoader.setEditable(true); xmlLoader.setLayoutX( ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "xml-x"))); xmlLoader.setLayoutY( ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "xml-y"))); xmlLoader.setVisibleRowCount(3); root.getChildren().add(xmlLoader); }
@Override protected void init() { WIDTH = ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "width"), 800); HEIGHT = ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "height"), 400); root = new Group(); scene = new Scene(root, WIDTH, HEIGHT); initIconList(); initTitle(); initXmlList(); initGoButton(); click(iconList.get(0)); }
private Icon(String s, int xOffset, int numberOfIcons) { xmlList = ConfigManager.getStringList(ConfigManager.scope(s, "xmlList")); Image img = new Image( getClass() .getClassLoader() .getResourceAsStream(ConfigManager.getString(ConfigManager.scope(s, "image")))); image = new ImageView(img); image.setFitWidth(WIDTH / (numberOfIcons * 3 / 2)); image.setPreserveRatio(true); image.setSmooth(true); image.setCache(true); setGraphic(image); setLayoutY( ConfigManager.getInt(ConfigManager.scope(this.getClass().getName(), "yPos"), HEIGHT / 3)); setLayoutX(xOffset - (image.getBoundsInParent().getWidth() + 18) / 2); iconName = s; }