java.awt.Toolkit.setDynamicLayout()方法的使用及代码示例

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

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

Toolkit.setDynamicLayout介绍

暂无

代码示例

代码示例来源:origin: bobbylight/RSyntaxTextArea

public static void main(String[] args) {
    SwingUtilities.invokeLater(() -> {
      try {
        UIManager.setLookAndFeel(UIManager.
                    getSystemLookAndFeelClassName());
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
      } catch (Exception e) {
        e.printStackTrace(); // Never happens
      }
      Toolkit.getDefaultToolkit().setDynamicLayout(true);
      new RSyntaxTextAreaDemoApp().setVisible(true);
    });
  }

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

public void setDynamicLayout(boolean dynamic)
 throws HeadlessException {
 getUnderlyingToolkit().setDynamicLayout(dynamic);
}

代码示例来源:origin: com.fifesoft/languagesupport

public static void main(String[] args) {
  SwingUtilities.invokeLater(() -> {
    try {
      UIManager.setLookAndFeel(UIManager.
                  getSystemLookAndFeelClassName());
      //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
    } catch (Exception e) {
      e.printStackTrace(); // Never happens
    }
    Toolkit.getDefaultToolkit().setDynamicLayout(true);
    new DemoApp().setVisible(true);
  });
}

代码示例来源:origin: BaseXdb/basex

/**
 * Initializes the GUI.
 * @param opts gui options
 */
private static void init(final GUIOptions opts) {
 try {
  // refresh views when windows are resized
  Toolkit.getDefaultToolkit().setDynamicLayout(true);
  // set look and feel
  final String laf = opts.get(GUIOptions.LOOKANDFEEL);
  UIManager.setLookAndFeel(laf.isEmpty() ? UIManager.getSystemLookAndFeelClassName() : laf);
 } catch(final Exception ex) {
  Util.stack(ex);
 }
}

代码示例来源:origin: org.basex/basex

/**
 * Initializes the GUI.
 * @param opts gui options
 */
private static void init(final GUIOptions opts) {
 try {
  // refresh views when windows are resized
  Toolkit.getDefaultToolkit().setDynamicLayout(true);
  // set look and feel
  final String laf = opts.get(GUIOptions.LOOKANDFEEL);
  UIManager.setLookAndFeel(laf.isEmpty() ? UIManager.getSystemLookAndFeelClassName() : laf);
 } catch(final Exception ex) {
  Util.stack(ex);
 }
}

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

Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground", "true");
JFrame.setDefaultLookAndFeelDecorated(true);

代码示例来源:origin: org.processing/core

class AsyncImageLoader extends Thread {
 String filename;
 String extension;
 PImage vessel;
 public AsyncImageLoader(String filename, String extension, PImage vessel) {
  // Give these threads distinct name so we can check whether we are loading
  // on the main/background thread; for now they are all named the same
  super(ASYNC_IMAGE_LOADER_THREAD_PREFIX);
  this.filename = filename;
  this.extension = extension;
  this.vessel = vessel;
 }
 @Override
 public void run() {
  while (requestImageCount == requestImageMax) {
   try {
    Thread.sleep(10);
   } catch (InterruptedException e) { }
  }
  requestImageCount++;
  PImage actual = loadImage(filename, extension);
  // An error message should have already printed
  if (actual == null) {
   vessel.width = -1;
   vessel.height = -1;

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

UIUtils.setPreferredLookAndFeel();
NativeInterface.open();
Toolkit.getDefaultToolkit().setDynamicLayout(true);
SwingUtilities.invokeLater(new Runnable() {

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

Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground", "true");
SmoothResize srtest = new SmoothResize();

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

Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground", "true");
SmoothResize srtest = new SmoothResize();

代码示例来源:origin: org.jspresso.framework/jspresso-swing-application

/**
 * Creates the initial view from the root view descriptor, then a SFrame
 * containing this view and presents it to the user.
 * <p>
 * {@inheritDoc}
 */
@Override
public boolean start(final IBackendController backendController,
  Locale clientLocale, TimeZone clientTimeZone) {
 if (super.start(backendController, clientLocale, clientTimeZone)) {
  waitTimer = new WaitCursorTimer(500);
  waitTimer.setDaemon(true);
  waitTimer.start();
  Toolkit.getDefaultToolkit().getSystemEventQueue()
    .push(new WaitCursorEventQueue(500));
  Toolkit.getDefaultToolkit().setDynamicLayout(true);
  getApplicationSession().setClientType(EClientType.DESKTOP_SWING);
  SwingUtilities.invokeLater(new Runnable() {
   @Override
   public void run() {
    // To register the backend controller in the event dispatch thread
    BackendControllerHolder.setSessionBackendController(backendController);
    initLoginProcess();
   }
  });
  timerService = Executors.newSingleThreadScheduledExecutor();
  return true;
 }
 return false;
}

代码示例来源:origin: net.sf.tinylaf/tinylaf

private void createFrame() {
    Toolkit.getDefaultToolkit().setDynamicLayout(true);
    System.setProperty("sun.awt.noerasebackground", "true");
    JFrame.setDefaultLookAndFeelDecorated(true);
    Toolkit.getDefaultToolkit().setDynamicLayout(false);
    System.setProperty("sun.awt.noerasebackground", "false");
    JFrame.setDefaultLookAndFeelDecorated(false);

代码示例来源:origin: RPTools/maptool

tk.setDynamicLayout(true);

代码示例来源:origin: com.google.code.findbugs/findbugs

Toolkit.getDefaultToolkit().setDynamicLayout(true);
mainFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
mainFrame.setJMenuBar(mainFrame.mainFrameMenu.createMainMenuBar());

相关文章