java.awt.Window.getName()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(168)

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

Window.getName介绍

暂无

代码示例

代码示例来源:origin: org.jdesktop.bsaf/bsaf

private String sessionFilename(Window window) {
  if (window == null) {
    return null;
  } else {
    String name = window.getName();
    return (name == null) ? null : name + ".session.xml";
  }
}

代码示例来源:origin: net.java.dev.appframework/appframework

private String sessionFilename(Window window) {
if (window == null) {
  return null; 
}
else {
  String name = window.getName();
  return (name == null) ? null : name + ".session.xml";
}
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public static Vector<Window> getTopContainers(String name) {
  Vector<Window> containers = new Vector<Window>();
  Frame frames[] = Frame.getFrames();
  for (Frame frame : frames) {
    Window[] windows = frame.getOwnedWindows();
    for (Window window : windows) {
      if (window.getName() != null && window.getName().equals(name))
        containers.add(window);
    }
    if (!containers.contains(frame)) {
      containers.add(frame);
    }
  }
  return containers;
}

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

public void run() {
    // If the window was shown again since we queued this action,
    // it will have removed the window from the transientFiltered
    // set, and we shouldn't filter.
    if (transientFiltered.containsKey(w)) {
      setFiltered(w, true);
      Log.debug("window " + w.getName() + " filtered");
    }
    else {
      Log.debug("cancel dispose of " + w.getName());
    }
  }
}

代码示例来源:origin: com.l2fprod.common/l2fprod-common-shared

private void store(Window w) {
  String bounds =
   (String)ConverterRegistry.instance().convert(
    String.class,
    w.getBounds());
  node().node("Windows").put(w.getName() + ".bounds", bounds);
 }
};

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

/**
 * Tries to determine the title of the given window.
 * 
 * @param aWindow
 *          the window to determine the title for, cannot be <code>null</code>
 *          .
 * @return a title, can be <code>null</code>.
 */
public static final String getTitle( final Window aWindow )
{
 if ( aWindow instanceof Frame )
 {
  return ( ( Frame )aWindow ).getTitle();
 }
 else if ( aWindow instanceof Dialog )
 {
  return ( ( Dialog )aWindow ).getTitle();
 }
 return aWindow.getName();
}

代码示例来源:origin: com.l2fprod.common/l2fprod-common-shared

/**
 * Restores the window size, position and state if possible. Tracks the
 * window size, position and state.
 * 
 * @param window
 */
public static void track(Window window) {
 Preferences prefs = node().node("Windows");
 String bounds = prefs.get(window.getName() + ".bounds", null);
 if (bounds != null) {
  Rectangle rect =
   (Rectangle)ConverterRegistry.instance().convert(
    Rectangle.class,
    bounds);
  window.setBounds(rect);
 }
 window.addComponentListener(windowDimension);
}

代码示例来源:origin: bcdev/beam

public void show() {
  dockableFrame.setKey(owner.getName() + "." + getTitle());
  dockManager.addFrame(dockableFrame);
  dockableFrame.setVisible(true);
}

代码示例来源:origin: robo-code/robocode

if (size.height > screenSize.height - 20 || size.width > screenSize.width - 20) {
  if (w.getName().equals("RobocodeFrame")) {
    int shrink = size.width - screenSize.width + 20;

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

&& e.getSource() instanceof Window)) {
Window w = (Window)e.getSource();
Log.debug("window " + w.getName() + " open/shown");
if (transientFiltered.containsKey(w)) {
  Log.debug("un-filter window " + w.getName());
  setFiltered(w, false);
  Log.debug("Parent is filtered, filter " + w.getName());
  setFiltered(w, true);
  Log.debug("queueing dispose of " + w.getName());
  SwingUtilities.invokeLater(new DisposeAction(w));

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

idAndPosition = ScreenUtil.getGraphicsDeviceAt(point) + ":" + position;
} else {
  idAndPosition = parent.getName() + ":" + position;

相关文章

Window类方法