javax.swing.JDesktopPane.isVisible()方法的使用及代码示例

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

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

JDesktopPane.isVisible介绍

暂无

代码示例

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

@ScriptFunction(jsDoc = VISIBLE_JSDOC)
@Override
public boolean getVisible() {
  return super.isVisible();
}

代码示例来源:origin: xyz.cofe/docking-frames-core

public void componentResized( ComponentEvent e ){
    if( desktop.isVisible() ){
      if( lastSize == null || lastSize.width == 0 || lastSize.height == 0 ){
        lastSize = desktop.getSize();
      }
      else{
        onResize = true;
        SwingUtilities.invokeLater( new Runnable(){
          public void run() {
            try{
              for( Map.Entry<ScreenDockStation, Dockable[]> entry : dockables.entrySet() ){
                ScreenDockStation station = entry.getKey();
                for( Dockable dockable : entry.getValue() ){
                  ScreenDockWindow window = station.getWindow( dockable );
                  window.setWindowBounds( new Rectangle( 0, 0, desktop.getWidth(), desktop.getHeight() ) );
                }
                entry.setValue( station.getFullscreenChildren() );
              }
            }
            finally{
              onResize = false;
            }        
          }
        });
      }
    }
  }
};

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

public void componentResized( ComponentEvent e ){
    if( desktop.isVisible() ){
      if( lastSize == null || lastSize.width == 0 || lastSize.height == 0 ){
        lastSize = desktop.getSize();
      }
      else{
        onResize = true;
        SwingUtilities.invokeLater( new Runnable(){
          public void run() {
            try{
              for( Map.Entry<ScreenDockStation, Dockable[]> entry : dockables.entrySet() ){
                ScreenDockStation station = entry.getKey();
                for( Dockable dockable : entry.getValue() ){
                  ScreenDockWindow window = station.getWindow( dockable );
                  window.setWindowBounds( new Rectangle( 0, 0, desktop.getWidth(), desktop.getHeight() ) );
                }
                entry.setValue( station.getFullscreenChildren() );
              }
            }
            finally{
              onResize = false;
            }        
          }
        });
      }
    }
  }
};

代码示例来源:origin: xyz.cofe/docking-frames-core

protected Rectangle validate( Rectangle destination, Point center ){
    if( desktop.isVisible() ){
      if( lastSize == null || lastSize.width == 0 || lastSize.height == 0 ){
        lastSize = desktop.getSize();
      }
      else{
        if( center == null ){
          center = new Point( destination.width/2, destination.height/2 );
        }
        
        Rectangle result = new Rectangle( destination );
        
        result.x = Math.max( -center.x, result.x );
        result.x = Math.min( result.x, desktop.getWidth() - center.x );
        
        result.y = Math.max( -center.y, result.y );
        result.y = Math.min( desktop.getHeight() - center.y, result.y );
        
        return result;
      }
    }
    return null;
  }
}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

protected Rectangle validate( Rectangle destination, Point center ){
    if( desktop.isVisible() ){
      if( lastSize == null || lastSize.width == 0 || lastSize.height == 0 ){
        lastSize = desktop.getSize();
      }
      else{
        if( center == null ){
          center = new Point( destination.width/2, destination.height/2 );
        }
        
        Rectangle result = new Rectangle( destination );
        
        result.x = Math.max( -center.x, result.x );
        result.x = Math.min( result.x, desktop.getWidth() - center.x );
        
        result.y = Math.max( -center.y, result.y );
        result.y = Math.min( desktop.getHeight() - center.y, result.y );
        
        return result;
      }
    }
    return null;
  }
}

相关文章