@Override public void layoutChildren() { if (!isDirty) return; if (!initialized) init(); if (control.getScene() != null) { drawLed(); getChildren().setAll(led); } isDirty = false; super.layoutChildren(); }
// ******************** Methods ******************************************* @Override protected void handleControlPropertyChanged(final String PROPERTY) { super.handleControlPropertyChanged(PROPERTY); if ("ON".equals(PROPERTY)) { ledOn.setVisible(control.isOn()); } else if ("BLINKING".equals(PROPERTY)) { if (control.isBlinking()) { timer.start(); } else { timer.stop(); ledOn.setVisible(false); } } else if ("COLOR".equals(PROPERTY)) { repaint(); } else if ("TYPE".equals(PROPERTY)) { repaint(); } else if ("PREF_WIDTH".equals(PROPERTY)) { repaint(); } else if ("PREF_HEIGHT".equals(PROPERTY)) { repaint(); } }