javax.swing.JFrame.setGlassPane()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(277)

本文整理了Java中javax.swing.JFrame.setGlassPane()方法的一些代码示例,展示了JFrame.setGlassPane()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setGlassPane()方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setGlassPane

JFrame.setGlassPane介绍

暂无

代码示例

代码示例来源:origin: marytts/marytts

main.setGlassPane(glass);
glass.setVisible(true);
glass.addCursorSource(this);

代码示例来源:origin: marytts/marytts

main.setGlassPane(glass);
glass.setVisible(true);
glass.addCursorSource(this);

代码示例来源:origin: nodebox/nodebox

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();
  }
}

代码示例来源:origin: nodebox/nodebox

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();
  }
}

代码示例来源:origin: stackoverflow.com

((JFrame) w).setGlassPane(glassPane);

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing

public void uninstallPane(JFrame frame) {
  frame.setGlassPane(oldGlassPane);
  this.frame = null;
}

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing

@Override
public void run() {
  setVisible(false);
  frame.setGlassPane(oldGlassPane);
}

代码示例来源:origin: org.bidib.jbidib.com.vldocking/vldocking

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;
  }
}

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing

public void installPane(JFrame frame) {
  this.oldGlassPane = frame.getGlassPane();
  this.frame = frame;
  frame.setGlassPane(this);
}

代码示例来源:origin: com.synaptix/SynaptixSwing

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);
  }
}

代码示例来源:origin: apache/ctakes

/**
* 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 );
}

代码示例来源:origin: igniterealtime/Spark

public void mouseClicked(MouseEvent mouseEvent) {
    parent.setGlassPane(glassPane);
    parent.getGlassPane().setVisible(false);
    contactField.dispose();
  }
});

代码示例来源:origin: org.bidib.jbidib.com.vldocking/vldocking

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;
  }
}

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing

@Override
public void run() {
  frame.setGlassPane(FadingPane.this);
  setVisible(true);
  requestFocusInWindow();
}

代码示例来源:origin: igniterealtime/Spark

public void windowClosing(WindowEvent windowEvent) {
  parent.setGlassPane(glassPane);
  parent.getGlassPane().setVisible(false);
  contactField.dispose();
  parent.removeWindowListener(this);
}

代码示例来源:origin: eu.agrosense.spi/session

@Override
  public void run() {
    log.finest("activateLogin");
    worldsView.setVisible(false);
    final JFrame mainWin = (JFrame) WindowManager.getDefault().getMainWindow();
    mainWin.setGlassPane(loginView);
    loginView.setVisible(true);
  }
}

代码示例来源:origin: eu.agrosense.spi/session

@Override
  public void run() {
    log.finest("resume");
    loginView.setVisible(false);
    worldsView.setVisible(false);
    final JFrame mainWin = (JFrame) WindowManager.getDefault().getMainWindow();
    mainWin.setGlassPane(orgGlassPane);
  }
}

代码示例来源:origin: eu.agrosense.spi/session

@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);
  }
}

代码示例来源:origin: de.sciss/scisslib

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();
}

代码示例来源:origin: de.sciss/scisslib

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();
}

相关文章

JFrame类方法