main.setGlassPane(glass); glass.setVisible(true); glass.addCursorSource(this);
main.setGlassPane(glass); glass.setVisible(true); glass.addCursorSource(this);
public void mousePressed(MouseEvent e) { isDragging = false; JComponent c = ColorWell.this; JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(c); if (frame == null) return; Point pt = c.getLocation(); pt = SwingUtilities.convertPoint(c, pt, frame.getContentPane()); Rectangle r = c.getBounds(); frame.setGlassPane(colorPicker); colorPicker.setVisible(true); colorPicker.setPoint(new Point(pt.x, pt.y + r.height)); frame.validate(); } }
public void mousePressed(MouseEvent e) { isDragging = false; JComponent c = ColorWell.this; JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(c); if (frame == null) return; Point pt = c.getLocation(); pt = SwingUtilities.convertPoint(c, pt, frame.getContentPane()); Rectangle r = c.getBounds(); frame.setGlassPane(colorPicker); colorPicker.setVisible(true); colorPicker.setPoint(new Point(pt.x, pt.y + r.height)); frame.validate(); } }
((JFrame) w).setGlassPane(glassPane);
public void uninstallPane(JFrame frame) { frame.setGlassPane(oldGlassPane); this.frame = null; }
@Override public void run() { setVisible(false); frame.setGlassPane(oldGlassPane); }
public void endDrag() { Window aboveWindow = this.window;//SwingUtilities.getWindowAncestor(desktop); if(aboveWindow instanceof JFrame) { ((JFrame) aboveWindow).setGlassPane(oldGlassPane); } else if(aboveWindow instanceof JDialog) { ((JDialog) aboveWindow).setGlassPane(oldGlassPane); } oldGlassPane.setVisible(oldGlassPaneVisible); isDragStarted = false; } }
public void installPane(JFrame frame) { this.oldGlassPane = frame.getGlassPane(); this.frame = frame; frame.setGlassPane(this); }
public static void setGlassPaneForWindow(Window window, Component glassPane) { if (window instanceof JDialog) { ((JDialog) window).setGlassPane(glassPane); } else if (window instanceof JFrame) { ((JFrame) window).setGlassPane(glassPane); } }
/** * The DisablerPane must be initialized before it can be used * * @param frame - */ public void initialize( final JFrame frame ) { _menuBar = frame.getJMenuBar(); _contentPane = frame.getContentPane(); frame.setGlassPane( this ); }
public void mouseClicked(MouseEvent mouseEvent) { parent.setGlassPane(glassPane); parent.getGlassPane().setVisible(false); contactField.dispose(); } });
public void endDrag() { heavyShape.setVisible(false); Window aboveWindow = this.window;//SwingUtilities.getWindowAncestor(desktop); if(aboveWindow instanceof JFrame) { ((JFrame) aboveWindow).setGlassPane(oldGlassPane); } else if(aboveWindow instanceof JDialog) { ((JDialog) aboveWindow).setGlassPane(oldGlassPane); } oldGlassPane.setVisible(oldGlassPaneVisible); isDragStarted = false; } }
@Override public void run() { frame.setGlassPane(FadingPane.this); setVisible(true); requestFocusInWindow(); }
public void windowClosing(WindowEvent windowEvent) { parent.setGlassPane(glassPane); parent.getGlassPane().setVisible(false); contactField.dispose(); parent.removeWindowListener(this); }
@Override public void run() { log.finest("activateLogin"); worldsView.setVisible(false); final JFrame mainWin = (JFrame) WindowManager.getDefault().getMainWindow(); mainWin.setGlassPane(loginView); loginView.setVisible(true); } }
@Override public void run() { log.finest("resume"); loginView.setVisible(false); worldsView.setVisible(false); final JFrame mainWin = (JFrame) WindowManager.getDefault().getMainWindow(); mainWin.setGlassPane(orgGlassPane); } }
@Override public void run() { log.finest("activateWorlds"); worldsView.loadWorlds(); loginView.setVisible(false); final JFrame mainWin = (JFrame) WindowManager.getDefault().getMainWindow(); mainWin.setGlassPane(worldsView); worldsView.setVisible(true); } }
protected void deactivateHelpMode() { if( f.getGlassPane() != this ) return; this.setVisible( false ); f.setGlassPane( normalGlassPane ); f.setFocusTraversalPolicy( normalFocus ); normalGlassPane = null; normalFocus = null; focussedHelpComponent = null; focussedArea.reset(); f.requestFocus(); }
protected void activateHelpMode() { Component recentGlassPane = f.getGlassPane(); if( recentGlassPane == this || recentGlassPane.isVisible() ) return; normalGlassPane = recentGlassPane; focussedHelpComponent = null; focussedArea.reset(); f.setGlassPane( this ); this.setVisible( true ); normalFocus = f.getFocusTraversalPolicy(); f.setFocusTraversalPolicy( new NoFocusTraversalPolicy() ); this.requestFocus(); }