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

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

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

JFrame.isUndecorated介绍

暂无

代码示例

代码示例来源:origin: jawi/ols

/**
 * Returns whether or not the given component is a managed window.
 * 
 * @param aComponent
 *          the component to test, can be <code>null</code>.
 * @return <code>false</code> if the given component is not a managed window
 *         (or <code>null</code>), <code>true</code> if it is.
 */
private boolean isManagedWindow( final Window aComponent )
{
 if ( aComponent == null )
 {
  return false;
 }
 return ( ( aComponent instanceof JFrame ) && !( ( JFrame )aComponent ).isUndecorated() )
   || ( ( aComponent instanceof JDialog ) && !( ( JDialog )aComponent ).isUndecorated() );
}

代码示例来源:origin: khuxtable/seaglass

/**
 * @see javax.swing.plaf.ComponentUI#update(java.awt.Graphics, javax.swing.JComponent)
 */
public void update(Graphics g, JComponent c) {
  SeaGlassContext context = getContext(c);
  SeaGlassLookAndFeel.update(context, g);
  if (((JRootPane) c).getWindowDecorationStyle() != JRootPane.NONE) {
    context.getPainter().paintRootPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
  } else if (PlatformUtils.isMac()) {
    // We may need to paint the rootpane on a Mac if the window is
    // decorated.
    boolean   shouldPaint       = false;
    Container toplevelContainer = c.getParent();
    if (toplevelContainer instanceof JFrame) {
      shouldPaint = !((JFrame) toplevelContainer).isUndecorated();
    }
    if (shouldPaint) {
      if (!paintTextured) {
        g.setColor(c.getBackground());
        g.fillRect(0, 0, c.getWidth(), c.getHeight());
      } else if (isWindowFocused.isInState(c)) {
        contentActive.paint((Graphics2D) g, c, c.getWidth(), c.getHeight());
      } else {
        contentInactive.paint((Graphics2D) g, c, c.getWidth(), c.getHeight());
      }
    }
  }
  paint(context, g);
  context.dispose();
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

frame.setResizable(resizable);
frame.setUndecorated(undecorated);
if (frame.isUndecorated()) {
  frame.setOpacity(opacity);

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

mainWindow.mediaPlayer.stop();
if (!mainWindow.isUndecorated()) {
 mainWindow.dispose();
 mainWindow.setAlwaysOnTop(true);

相关文章

JFrame类方法