private void subscribeWatcher(ConstraintController constraintController) { ConstraintPanel view = constraintController.getView(); if (!watcher.isWatched(view)) { watcher.register(view); } subscribeWatcherToConstraintTypeController(constraintController); constraintController.addConstraintListener(this); }
private void subscribeWatcherToConstraintTypeController( ConstraintController constraintController) { ConstraintTypeController constraintTypeController = constraintController.getConstraintTypeController(); if (constraintTypeController != null) { JPanel view = constraintTypeController.getView(); if (!watcher.isWatched(view)) { watcher.register(view); } } }
public LivePreview(PatternController patternController, Editor editor, Project project) { this.project = project; this.editor = editor; this.patternController = patternController; livePreviewAlarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD); watcher.addUserActivityListener(this); injectActivityWatcher(); stateChanged(); }