本文整理了Java中javax.swing.JDesktopPane.remove()
方法的一些代码示例,展示了JDesktopPane.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.remove()
方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:remove
暂无
代码示例来源:origin: magefree/mage
public void removeDialog() {
// avoid memory leak of javax.swing.plaf.nimbus.NimbusStyle$CacheKey
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
//this.setVisible(false);
// important to set close before removing the JInternalFrame to avoid memory leaks (http://bugs.java.com/view_bug.do?bug_id=7163808)
try {
this.setClosed(true);
} catch (PropertyVetoException ex) {
java.util.logging.Logger.getLogger(MageDialog.class.getName()).log(Level.SEVERE, "setClosed(false) failed", ex);
}
MageFrame.getDesktop().remove(this);
}
代码示例来源:origin: magefree/mage
public void removeFrame() {
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
MageFrame.deactivate(this);
MageFrame.getDesktop().remove(this);
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
public void destroy(){
dialog.setVisible( false );
desktop.remove( dialog );
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public void destroy(){
dialog.setVisible( false );
desktop.remove( dialog );
}
代码示例来源:origin: com.numdata/numdata-swing
/**
* Removes a window.
*
* @param window Window to remove.
*/
private void removeWindow( final JInternalFrame window )
{
_desktop.remove( window );
window.removeInternalFrameListener( _internalFrameListener );
}
代码示例来源:origin: org.jclarion/clarion-runtime
@Override
public void remove(int index) {
super.remove(index);
invalidate();
}
代码示例来源:origin: fcrepo3/fcrepo
@Override
public void remove(Component c) {
super.remove(c);
checkDesktopSize();
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public void destroy(){
setVisible( false );
desktop.remove( this );
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
public void destroy(){
setVisible( false );
desktop.remove( this );
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void remove(Component comp)
{
if (comp != null)
{
comp.removeComponentListener(_listener);
super.remove(comp);
}
revalidate();
repaint();
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
public void cmdToBar(JScrollPane scrollPane, JInternalFrame cmdFrame) {
desktop.remove(cmdFrame);
cmdFrame.dispose();
scrollPane.getViewport().setMaximumSize(new Dimension(frame.getSize().width, 35));
scrollPane.getViewport().setPreferredSize(new Dimension(frame.getSize().width, 35));
frame.add(scrollPane, BorderLayout.PAGE_END);
desktop.updateUI();
}
代码示例来源:origin: realXuJiang/bigtable-sql
public void remove(Component comp)
{
if (comp != null)
{
comp.removeComponentListener(_listener);
super.remove(comp);
}
revalidate();
repaint();
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2-experimental
@Override
public void componentRemoved(ContainerEvent e) {
OVTK2Desktop.getInstance().getDesktopPane().remove(e.getChild());
}
代码示例来源:origin: bcdev/beam
public void closeFrame(JInternalFrame internalFrame) {
internalFrame.removeInternalFrameListener(frameListener);
try {
internalFrame.setClosed(true);
} catch (PropertyVetoException e) {
internalFrame.dispose();
}
removeTabFor(internalFrame);
desktopPane.remove(internalFrame);
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
protected void removeUIForContent(Content content) {
// Remove component
MyDoggyDesktopContentUI desktopContentUI = (MyDoggyDesktopContentUI) content.getContentUI();
JInternalFrame internalFrame = desktopContentUI.getInternalFrame();
valueAdjusting = true;
try {
internalFrame.removePropertyChangeListener(contentUIListener);
desktopPane.remove(internalFrame);
desktopContentUI.cleanup();
} finally {
valueAdjusting = false;
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void remove(int _index) {
Component c = getComponent(_index);
Rectangle r = c.getBounds();
boolean b = isBlocked() && (c instanceof JInternalFrame.JDesktopIcon);
super.remove(_index);
repaint(r);
if (b) arrangeIcons0();
}
代码示例来源:origin: stackoverflow.com
pane1.remove(if1); // You don't even need this line.
pane1.repaint();
代码示例来源:origin: senbox-org/snap-desktop
private TopComponent closeInternalFrame(JInternalFrame internalFrame, boolean removeTab) {
internalFrame.removeInternalFrameListener(internalFrameListener);
TopComponent topComponent = getTopComponent(internalFrame);
topComponent.removePropertyChangeListener(propertyChangeListener);
Object internalFrameID = getInternalFrameID(topComponent);
idToBoundsMap.put(internalFrameID, new Rectangle(internalFrame.getBounds()));
TabData tab = frameToTabMap.get(internalFrame);
if (tab != null) {
if (removeTab) {
int tabIndex = tabbedContainer.getModel().indexOf(tab);
if (tabIndex >= 0) {
tabbedContainer.getModel().removeTab(tabIndex);
}
}
tabToFrameMap.remove(tab);
}
frameToTabMap.remove(internalFrame);
internalFrame.dispose();
desktopPane.remove(internalFrame);
if (desktopPane.getComponentCount() == 0) {
tabbedContainer.setVisible(false);
}
// make sure the topComponent's parent is not the internalFrame which we just closed
internalFrame.setContentPane(new TopComponent());
return topComponent;
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void propertyChange(PropertyChangeEvent evt) {
Content content = (Content) evt.getSource();
if ((Boolean) evt.getNewValue()) {
content.setSelected(false);
content.setMaximized(false);
DockableDescriptor descriptor = toolWindowManager.getDockableDescriptor(content.getId());
if (descriptor == null)
descriptor = toolWindowManager.createDescriptor(content);
// Remove content
JInternalFrame internalFrame = getInternalFrame(content);
if (internalFrame != null) {
desktopPane.remove(internalFrame);
} else
throw new IllegalStateException("Invalid Content : " + content);
// Put on bar
descriptor.setAvailable(true);
SwingUtil.repaint(desktopPane);
} else {
DockableDescriptor descriptor = toolWindowManager.getDockableDescriptor(content.getId());
// Remove from bar
descriptor.setAvailable(false);
addUIForContent(content);
content.setSelected(true);
}
}
代码示例来源:origin: khuxtable/seaglass
protected void uninstallDefaults() {
SeaGlassContext context = getContext(desktop, ENABLED);
style.uninstallDefaults(context);
context.dispose();
style = null;
if (taskBar != null) {
for (Component comp : taskBar.getComponents()) {
JInternalFrame.JDesktopIcon desktopIcon = (JInternalFrame.JDesktopIcon) comp;
taskBar.remove(desktopIcon);
desktopIcon.setPreferredSize(null);
JInternalFrame f = desktopIcon.getInternalFrame();
if (f.isIcon()) {
desktop.add(desktopIcon);
}
f.removeComponentListener(taskBar);
}
desktop.remove(taskBar);
taskBar = null;
}
}
内容来源于网络,如有侵权,请联系作者删除!