Java 类javax.swing.event.AncestorEvent 实例源码
项目:incubator-netbeans
文件:DiffResultsView.java
@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);
}
});
}
}
项目:educational-plugin
文件:StudyNewProjectPanel.java
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);
}
}
});
}
项目:incubator-netbeans
文件:DiffResultsView.java
@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);
}
});
}
}
项目:incubator-netbeans
文件:HibernateMappingWizardPanel.java
@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);
}
项目:incubator-netbeans
文件:DiffResultsView.java
@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);
}
});
}
}
项目:smile_1.5.0_java7
文件:ClusteringDemo.java
@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();
}
}
项目:smile_1.5.0_java7
文件:VQDemo.java
@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();
}
}
项目:smile_1.5.0_java7
文件:ClassificationDemo.java
@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();
}
}
项目:jiracli
文件:CredentialsPanel.java
@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();
}
});
}
});
}
项目:incubator-netbeans
文件:EditorRegistry.java
@Override
public void ancestorAdded(AncestorEvent event) {
Item item = item(event.getComponent());
if (item.runningTimer != null) {
item.runningTimer.stop();
item.runningTimer = null;
}
itemMadeDisplayable(item);
}
项目:incubator-netbeans
文件:DiffResultsView.java
@Override
public void ancestorRemoved(AncestorEvent event) {
if (dividerSet) {
lastDividerLoc = diffView.getDividerLocation();
}
ExplorerManager em = ExplorerManager.find(treeView);
em.removePropertyChangeListener(this);
}
项目:incubator-netbeans
文件:DiffResultsView.java
@Override
public void ancestorRemoved(AncestorEvent event) {
if (dividerSet) {
lastDividerLoc = diffView.getDividerLocation();
}
ExplorerManager em = ExplorerManager.find(treeView);
em.removePropertyChangeListener(this);
cancelBackgroundTasks();
}
项目:incubator-netbeans
文件:FileTreeView.java
@Override
public void ancestorAdded(AncestorEvent event) {
if (!displayed) {
displayed = true;
setDefaultColumnSizes();
}
}
项目:incubator-netbeans
文件:DiffResultsView.java
@Override
public void ancestorRemoved(AncestorEvent event) {
if (dividerSet) {
lastDividerLoc = diffView.getDividerLocation();
}
ExplorerManager em = ExplorerManager.find(treeView);
em.removePropertyChangeListener(this);
cancelBackgroundTasks();
}
项目:AgentWorkbench
文件:HttpsConfigWindow.java
@Override
public void ancestorAdded(AncestorEvent e) {
JComponent component = e.getComponent();
component.requestFocusInWindow();
if (removeListener)
component.removeAncestorListener(this);
}
项目:CrypDist
文件:RequestFocusListener.java
@Override
public void ancestorAdded(AncestorEvent e)
{
JComponent component = e.getComponent();
component.requestFocusInWindow();
if (removeListener)
component.removeAncestorListener(this);
}
项目:incubator-netbeans
文件:DatabaseTablesPanel.java
@Override
public void ancestorAdded(AncestorEvent event) {
initSubComponents();
removeAncestorListener(this);
}
项目:incubator-netbeans
文件:PersistenceUnitWizardPanelDS.java
@Override
public void ancestorAdded(AncestorEvent event) {
initLater();
removeAncestorListener(this);
}
项目:incubator-netbeans
文件:BirdViewWindow.java
public void ancestorAdded (AncestorEvent event) {
}
项目:incubator-netbeans
文件:BirdViewWindow.java
public void ancestorRemoved (AncestorEvent event) {
invokeHide ();
}
项目:incubator-netbeans
文件:BirdViewWindow.java
public void ancestorMoved (AncestorEvent event) {
}
项目:incubator-netbeans
文件:ToolTipSupport.java
public @Override void ancestorAdded(AncestorEvent event) {
// no-op
}
项目:incubator-netbeans
文件:ToolTipSupport.java
public @Override void ancestorRemoved(AncestorEvent event) {
LOG.log(Level.FINE, "ancestorRemoved: source={0}", s2s(event.getSource()));
setToolTipVisible(false);
}
项目:incubator-netbeans
文件:ToolTipSupport.java
public @Override void ancestorMoved(AncestorEvent event) {
// no-op
}
项目:incubator-netbeans
文件:ComponentPeer.java
public void ancestorAdded(AncestorEvent event) {
if (pane.getParent() != null)
doUpdateCurrentVisibleSpan();
}
项目:incubator-netbeans
文件:EditorRegistry.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:DiffResultsView.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:CheckBoxUpdater.java
@Override
public void ancestorAdded(AncestorEvent event) {
setCheckBoxValue(getValue(), getDefaultValue(), component);
component.addItemListener(this);
}
项目:incubator-netbeans
文件:CheckBoxUpdater.java
@Override
public void ancestorRemoved(AncestorEvent event) {
component.removeItemListener(this);
}
项目:incubator-netbeans
文件:CheckBoxUpdater.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:ComboBoxUpdater.java
@Override
public void ancestorAdded(AncestorEvent event) {
setComboValue(getValue(), getDefaultValue(), component);
component.addActionListener(this);
}
项目:incubator-netbeans
文件:ComboBoxUpdater.java
@Override
public void ancestorRemoved(AncestorEvent event) {
component.removeActionListener(this);
}
项目:incubator-netbeans
文件:ComboBoxUpdater.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:TextComponentUpdater.java
@Override
public void ancestorAdded(AncestorEvent event) {
setTextFieldValue(getValue(), getDefaultValue(), component);
component.getDocument().addDocumentListener(this);
}
项目:incubator-netbeans
文件:TextComponentUpdater.java
@Override
public void ancestorRemoved(AncestorEvent event) {
component.getDocument().removeDocumentListener(this);
}
项目:incubator-netbeans
文件:TextComponentUpdater.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:AddDependencyPanel.java
@Override
public void ancestorAdded(AncestorEvent event) {
loadArtifacts();
}
项目:incubator-netbeans
文件:AddDependencyPanel.java
@Override
public void ancestorRemoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:AddDependencyPanel.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
项目:incubator-netbeans
文件:IssueTable.java
@Override
public void ancestorAdded(AncestorEvent event) {
setDefaultColumnSizes();
}