@Override public void ancestorAdded(AncestorEvent event) { ExplorerManager em = ExplorerManager.find(treeView); em.addPropertyChangeListener(this); if (dividerSet) { if (lastDividerLoc != 0) { EventQueue.invokeLater(new Runnable() { @Override public void run () { diffView.setDividerLocation(lastDividerLoc); } }); } } else { EventQueue.invokeLater(new Runnable() { @Override public void run() { dividerSet = true; diffView.setDividerLocation(0.33); } }); } }
private void initListeners() { myRefreshButton.addActionListener(new RefreshActionListener()); myCoursesComboBox.addActionListener(new CourseSelectedListener()); setupBrowseButton(); addAncestorListener(new AncestorListenerAdapter() { @Override public void ancestorMoved(AncestorEvent event) { if (!isComboboxInitialized && isVisible()) { isComboboxInitialized = true; initCoursesCombobox(); } Course selectedCourse = (Course)myCoursesComboBox.getSelectedItem(); if (selectedCourse == null || selectedCourse.equals(Course.INVALID_COURSE)) { setError(CONNECTION_ERROR); } } }); }
@Override public void ancestorAdded(AncestorEvent event) { //need to move fill into EDT but also direct call cause lock //this way code is called after panel is initialized and is added //see also 204327 RequestProcessor.getDefault().post(new Runnable() { @Override public void run() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { fillDatabaseTable(); } }); } }); removeAncestorListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { clusterNumberField.setText(Integer.toString(clusterNumber)); if (datasetBox.getSelectedIndex() != datasetIndex) { datasetBox.setSelectedIndex(datasetIndex); remove(canvas); if (dataset[datasetIndex].length < 500) { pointLegend = 'o'; } else { pointLegend = '.'; } canvas = ScatterPlot.plot(dataset[datasetIndex], pointLegend); add(canvas, BorderLayout.CENTER); validate(); } }
@Override public void ancestorAdded(AncestorEvent event) { if (datasetBox.getSelectedIndex() != datasetIndex) { datasetBox.setSelectedIndex(datasetIndex); double[][] data = dataset[datasetIndex].toArray(new double[dataset[datasetIndex].size()][]); int[] label = dataset[datasetIndex].toArray(new int[dataset[datasetIndex].size()]); PlotCanvas canvas = ScatterPlot.plot(data, 'o'); for (int i = 0; i < data.length; i++) { canvas.point('o', Palette.COLORS[label[i]], data[i]); } BorderLayout layout = (BorderLayout) getLayout(); remove(layout.getLayoutComponent(BorderLayout.CENTER)); add(canvas, BorderLayout.CENTER); validate(); } }
@Override public void ancestorAdded(AncestorEvent evt) { final JComponent component = evt.getComponent(); component.requestFocusInWindow(); // for macOS: SwingUtilities.invokeLater(new Runnable() { @Override public void run() { component.requestFocusInWindow(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { component.requestFocusInWindow(); } }); } }); }
@Override public void ancestorAdded(AncestorEvent event) { Item item = item(event.getComponent()); if (item.runningTimer != null) { item.runningTimer.stop(); item.runningTimer = null; } itemMadeDisplayable(item); }
@Override public void ancestorRemoved(AncestorEvent event) { if (dividerSet) { lastDividerLoc = diffView.getDividerLocation(); } ExplorerManager em = ExplorerManager.find(treeView); em.removePropertyChangeListener(this); }
@Override public void ancestorRemoved(AncestorEvent event) { if (dividerSet) { lastDividerLoc = diffView.getDividerLocation(); } ExplorerManager em = ExplorerManager.find(treeView); em.removePropertyChangeListener(this); cancelBackgroundTasks(); }
@Override public void ancestorAdded(AncestorEvent event) { if (!displayed) { displayed = true; setDefaultColumnSizes(); } }
@Override public void ancestorAdded(AncestorEvent e) { JComponent component = e.getComponent(); component.requestFocusInWindow(); if (removeListener) component.removeAncestorListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { initSubComponents(); removeAncestorListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { initLater(); removeAncestorListener(this); }
public void ancestorAdded (AncestorEvent event) { }
public void ancestorRemoved (AncestorEvent event) { invokeHide (); }
public void ancestorMoved (AncestorEvent event) { }
public @Override void ancestorAdded(AncestorEvent event) { // no-op }
public @Override void ancestorRemoved(AncestorEvent event) { LOG.log(Level.FINE, "ancestorRemoved: source={0}", s2s(event.getSource())); setToolTipVisible(false); }
public @Override void ancestorMoved(AncestorEvent event) { // no-op }
public void ancestorAdded(AncestorEvent event) { if (pane.getParent() != null) doUpdateCurrentVisibleSpan(); }
@Override public void ancestorMoved(AncestorEvent event) { }
@Override public void ancestorAdded(AncestorEvent event) { setCheckBoxValue(getValue(), getDefaultValue(), component); component.addItemListener(this); }
@Override public void ancestorRemoved(AncestorEvent event) { component.removeItemListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { setComboValue(getValue(), getDefaultValue(), component); component.addActionListener(this); }
@Override public void ancestorRemoved(AncestorEvent event) { component.removeActionListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { setTextFieldValue(getValue(), getDefaultValue(), component); component.getDocument().addDocumentListener(this); }
@Override public void ancestorRemoved(AncestorEvent event) { component.getDocument().removeDocumentListener(this); }
@Override public void ancestorAdded(AncestorEvent event) { loadArtifacts(); }
@Override public void ancestorRemoved(AncestorEvent event) { }
@Override public void ancestorAdded(AncestorEvent event) { setDefaultColumnSizes(); }