public boolean resetDefaultHighlighter(boolean activeClusterChanged) { if (automatic && controler.getHighlighter() == Highlighter.CLUSTER_HIGHLIGHTER && activeClusterChanged && clustering.getNumClusters() > 1 && clustering.isClusterActive()) { controler.setHighlighter(Highlighter.DEFAULT_HIGHLIGHTER, false); automatic = true; return true; } return false; }
public HighlightAutomatic(ViewControler controler, ClusteringImpl clustering) { this.controler = controler; this.clustering = clustering; controler.addViewListener( new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(ViewControler.PROPERTY_HIGHLIGHT_CHANGED)) { update(); } } }); init(); }
private void update() { if (controler.getHighlighter() == Highlighter.CLUSTER_HIGHLIGHTER && !clustering.isClusterActive()) automatic = true; else automatic = false; }