本文整理了Java中javax.swing.JWindow.addComponentListener()
方法的一些代码示例,展示了JWindow.addComponentListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JWindow.addComponentListener()
方法的具体详情如下:
包路径:javax.swing.JWindow
类名称:JWindow
方法名:addComponentListener
暂无
代码示例来源:origin: otros-systems/otroslogviewer
private void lazyInit() {
Window windowAncestor = SwingUtilities.getWindowAncestor(textComponent);
suggestionWindow = new JWindow(windowAncestor);
windowAncestor.addComponentListener(windowsSizeListener);
textComponent.addComponentListener(windowsSizeListener);
suggestionScrollPane = new JScrollPane(suggestionPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
suggestionWindow.getContentPane().add(suggestionScrollPane);
suggestionWindow.addFocusListener(hideSuggestionFocusAdapter);
fullyInitialized = true;
InputMap inputMap = textComponent.getInputMap();
suggestionWindow.addComponentListener(new ComponentAdapter() {
@Override
public void componentHidden(ComponentEvent e) {
inputMap.remove(toSuggestionKeyStroke);
inputMap.remove(hideSuggestionKeyStroke);
}
@Override
public void componentShown(ComponentEvent e) {
inputMap.put(toSuggestionKeyStroke, FOCUS_TO_SUGGESTION);
inputMap.put(hideSuggestionKeyStroke, HIDE_SUGGESTION);
}
});
}
代码示例来源:origin: com.synaptix/SynaptixSwing
@Override
public void showWindow() {
hideWindow();
if (enabled) {
field.addHierarchyBoundsListener(hierachyBoundsListener);
if (parent == null) {
Component c = field;
while (!(c instanceof Window) && c != null) {
c = c.getParent();
}
parent = (Window) c;
}
window = new JWindow(parent);
window.addComponentListener(componentListener);
AWTUtilitiesWrapper.setWindowOpaque(window, false);
window.getContentPane().add(toolTip);
window.pack();
computeLocation();
window.setVisible(true);
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
window.addComponentListener(componentListener);
AWTUtilitiesWrapper.setWindowOpaque(window, false);
window.getContentPane().add(this);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
lista.setBackground(ColorController.FUNDO_BOTOES_EXPANSIVEIS);
getPopupWindow().addComponentListener(new ComponentAdapter(){
@Override
public void componentShown(ComponentEvent ce) {
内容来源于网络,如有侵权,请联系作者删除!