当前位置: 首页>>代码示例>>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;未经允许,请勿转载。