當前位置: 首頁>>代碼示例>>Java>>正文


Java AncestorEvent類代碼示例

本文整理匯總了Java中javax.swing.event.AncestorEvent的典型用法代碼示例。如果您正苦於以下問題:Java AncestorEvent類的具體用法?Java AncestorEvent怎麽用?Java AncestorEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AncestorEvent類屬於javax.swing.event包,在下文中一共展示了AncestorEvent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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);
            }
        });
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,代碼來源:DiffResultsView.java

示例2: initListeners

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
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);
      }
    }
  });
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:19,代碼來源:StudyNewProjectPanel.java

示例3: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:20,代碼來源:HibernateMappingWizardPanel.java

示例4: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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();
    }
}
 
開發者ID:takun2s,項目名稱:smile_1.5.0_java7,代碼行數:18,代碼來源:ClusteringDemo.java

示例5: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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();
    }
}
 
開發者ID:takun2s,項目名稱:smile_1.5.0_java7,代碼行數:18,代碼來源:VQDemo.java

示例6: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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();
    }
}
 
開發者ID:takun2s,項目名稱:smile_1.5.0_java7,代碼行數:20,代碼來源:ClassificationDemo.java

示例7: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@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();
                }
            });
        }
    });
}
 
開發者ID:pascalgn,項目名稱:jiracli,代碼行數:19,代碼來源:CredentialsPanel.java

示例8: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent event) {
    Item item = item(event.getComponent());
    if (item.runningTimer != null) {
        item.runningTimer.stop();
        item.runningTimer = null;
    }
    itemMadeDisplayable(item);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:EditorRegistry.java

示例9: ancestorRemoved

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorRemoved(AncestorEvent event) {
    if (dividerSet) {
        lastDividerLoc = diffView.getDividerLocation();
    }
    ExplorerManager em = ExplorerManager.find(treeView);
    em.removePropertyChangeListener(this);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:DiffResultsView.java

示例10: ancestorRemoved

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorRemoved(AncestorEvent event) {
    if (dividerSet) {
        lastDividerLoc = diffView.getDividerLocation();
    }
    ExplorerManager em = ExplorerManager.find(treeView);
    em.removePropertyChangeListener(this);
    cancelBackgroundTasks();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:DiffResultsView.java

示例11: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent event) {
    if (!displayed) {
        displayed = true;
        setDefaultColumnSizes();
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:FileTreeView.java

示例12: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent e) {
	JComponent component = e.getComponent();
	component.requestFocusInWindow();

	if (removeListener)
		component.removeAncestorListener(this);
}
 
開發者ID:EnFlexIT,項目名稱:AgentWorkbench,代碼行數:9,代碼來源:HttpsConfigWindow.java

示例13: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent e)
{
    JComponent component = e.getComponent();
    component.requestFocusInWindow();

    if (removeListener)
        component.removeAncestorListener(this);
}
 
開發者ID:CrypDist,項目名稱:CrypDist,代碼行數:10,代碼來源:RequestFocusListener.java

示例14: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent event) {
    initSubComponents();
    removeAncestorListener(this);     
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:DatabaseTablesPanel.java

示例15: ancestorAdded

import javax.swing.event.AncestorEvent; //導入依賴的package包/類
@Override
public void ancestorAdded(AncestorEvent event) {
    initLater();
    removeAncestorListener(this);     
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:PersistenceUnitWizardPanelDS.java


注:本文中的javax.swing.event.AncestorEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。