本文整理了Java中javax.swing.JPanel.removeComponentListener()
方法的一些代码示例,展示了JPanel.removeComponentListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.removeComponentListener()
方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:removeComponentListener
暂无
代码示例来源:origin: bcdev/beam
private void addToMapPanel(Component component) {
if (resizeAdapter == null && component instanceof LayerCanvas) {
final LayerCanvas layerCanvas = (LayerCanvas) component;
resizeAdapter = new ResizeAdapter(layerCanvas);
mapPanel.addComponentListener(resizeAdapter);
} else {
mapPanel.removeComponentListener(resizeAdapter);
resizeAdapter = null;
}
mapPanel.removeAll();
mapPanel.add(component, BorderLayout.CENTER);
}
代码示例来源:origin: senbox-org/snap-desktop
private void addToMapPanel(Component component) {
if (resizeAdapter == null && component instanceof LayerCanvas) {
final LayerCanvas layerCanvas = (LayerCanvas) component;
resizeAdapter = new ResizeAdapter(layerCanvas);
mapPanel.addComponentListener(resizeAdapter);
} else {
mapPanel.removeComponentListener(resizeAdapter);
resizeAdapter = null;
}
mapPanel.removeAll();
mapPanel.add(component, BorderLayout.CENTER);
}
代码示例来源:origin: edu.toronto.cs.savant/savant-plugin-ucscexplorer
@Override
public void actionPerformed(ActionEvent ae) {
if (expansion.isVisible()) {
revealButton.setText("+");
expansion.removeComponentListener(widthListener);
expansion.setVisible(false);
} else {
revealButton.setText("-");
((GridLayout)expansion.getLayout()).setColumns(getWidth() / widestCheck);
expansion.addComponentListener(widthListener);
expansion.setVisible(true);
}
validate();
}
});
内容来源于网络,如有侵权,请联系作者删除!