congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Window.isVisible
Code IndexAdd Tabnine to your IDE (free)

How to use
isVisible
method
in
java.awt.Window

Best Java code snippets using java.awt.Window.isVisible (Showing top 20 results out of 387)

origin: stackoverflow.com

 for(Window window : Window.getWindows()){
  if(window != null && window.isVisible() && window instanceof JFrame){
    JFrame jFrame = (JFrame)window;
  }
}
origin: uk.co.caprica/vlcj

/**
 * Check whether or not there is an overlay component currently enabled.
 *
 * @return true if there is an overlay enabled, otherwise false
 */
public boolean enabled() {
  return overlay != null && overlay.isVisible();
}
origin: net.java.dev.appframework/appframework

private boolean isVisibleWindow(Window w) {
return w.isVisible() && 
  ((w instanceof JFrame) || (w instanceof JDialog) || (w instanceof JWindow));
}
origin: org.jdesktop.bsaf/bsaf

private boolean isVisibleWindow(Window w) {
  return w.isVisible() &&
      ((w instanceof JFrame) || (w instanceof JDialog) || (w instanceof JWindow));
}
origin: hneemann/Digital

  /**
   * Returns true if the window with the given id is visible
   *
   * @param id the id of the window
   * @return true if window is visible
   */
  public boolean isVisible(String id) {
    Window w = windows.get(id);
    if (w == null) return false;
    return w.isVisible();
  }
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  @Override
  public void run() {
    synchronized (lock) {
      while (window.isVisible()) {
        try {
          lock.wait(500);
        } catch (InterruptedException e) {
        }
      }
    }
  }
};
origin: mucommander/mucommander

/**
 * Updates the divider component's location to keep the current proportional divider location. 
 */
public void updateDividerLocation() {
  if(!window.isVisible())
    return;
  // Reset the last divider location to make sure that the next call to moveComponent doesn't
  // needlessly recalculate the split ratio.
  lastDividerLocation = -1;
  //setDividerLocation((int)(splitRatio*(getOrientation()==HORIZONTAL_SPLIT?getWidth():getHeight())));
  setDividerLocation(splitRatio);
}
origin: stackoverflow.com

 for (Window window: Window.getWindows())
{
  if (window.isVisible())
  {
    injectResources(window);
    window.repaint();
    if (window instanceof RootPaneContainer)
    {
      ((RootPaneContainer) window).getRootPane().revalidate();
    }
  }
}
origin: org.riedelcastro/whatswrong

  public void actionPerformed(ActionEvent e) {
    //window.pack();
    window.setVisible(!window.isVisible());
  }
});
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

private void showPalettes() {
  for (Window palette : palettes) {
    if (! palette.isVisible()) {
      palette.setVisible(true);
    }
  }
}

origin: com.jalalkiswani/jk-desktop

/**
 * Checks if is visible on screen.
 *
 * @param component
 *            the component
 * @return true, if is visible on screen
 */
public static boolean isVisibleOnScreen(final JComponent component) {
  final Window window = getWindow(component);
  if (window != null) {
    return window.isVisible();
  }
  return false;
}
origin: freeplane/freeplane

private Collection<Window> collectVisibleFrames(Window window) {
  if (!window.isVisible())
    return Collections.emptyList();
  Window[] ownedWindows = window.getOwnedWindows();
  ArrayList<Window> visibleWindows = new ArrayList(ownedWindows.length + 1);
  visibleWindows.add(window);
  for (Window child : ownedWindows) {
    visibleWindows.addAll(collectVisibleFrames(child));
  }
  return visibleWindows;
}
origin: com.synaptix/SynaptixSwing

  public static Window[] getWindows() {
    Window[] ws = Window.getWindows();
    List<Window> res = new ArrayList<Window>();

    for (Window w : ws) {
      if (w instanceof JSyDialog) {
        JSyDialog dialog = (JSyDialog) w;
        if (!dialog.isSeparatedWindow() && w.isVisible()) {
          res.add(w);
        }
      } else {
        if (w.isVisible()) {
          res.add(w);
        }
      }
    }

    return res.toArray(new Window[res.size()]);

  }
}
origin: stackoverflow.com

@Command
 public void openWindow(@BindingParam("window") Window win){
   if(!win.isVisible()){
    win.setVisible(true);
    win.doHighlighted();
   }
 }
origin: JetBrains/jediterm

@NotNull
public static Window getActiveWindow() {
  Window[] windows = Window.getWindows();
  for (Window each : windows) {
    if (each.isVisible() && each.isActive()) return each;
  }
  return JOptionPane.getRootFrame();
}
origin: org.jspresso.framework/jspresso-swing-components

/**
 * Gets the visible parent window.
 *
 * @param component
 *          the component to start from
 * @return the visible parent window or null.
 */
public static Window getVisibleWindow(Component component) {
 if (component instanceof JWindow) {
  return (JWindow) component;
 }
 Window w = SwingUtilities.getWindowAncestor(component);
 if (w != null && !w.isVisible() && w.getParent() != null) {
  return getVisibleWindow(w.getParent());
 }
 return w;
}
origin: freeplane/freeplane

public static void backOtherWindows() {
  Component owner = getMenuComponent();
  if(owner instanceof Window){
    final Window[] ownedWindows = ((Window) owner).getOwnedWindows();
    for(Window w : ownedWindows){
      if(w.isVisible()){
        w.toBack();
      }
    }
  }
}
origin: org.netbeans.modules/org-netbeans-core

private static boolean hasModalDialog(Window w) {
  if (w == null) { // #63830
    return false;
  }
  Window[] ws = w.getOwnedWindows();
  for(int i = 0; i < ws.length; i++) {
    if(ws[i] instanceof Dialog && ((Dialog)ws[i]).isModal() && ws[i].isVisible()) {
      return true;
    } else if(hasModalDialog(ws[i])) {
      return true;
    }
  }
  
  return false;
}

origin: com.jidesoft/jide-oss

/**
 * Gets the top modal dialog of current window.
 *
 * @param w
 * @return the top modal dialog of current window.
 */
public static Window getTopModalDialog(Window w) {
  Window[] ws = w.getOwnedWindows();
  for (Window w1 : ws) {
    if (w1.isVisible() && w1 instanceof Dialog && ((Dialog) w1).isModal()) {
      return (getTopModalDialog(w1));
    }
  }
  return w;
}
origin: freeplane/freeplane

private void toFront() {
  final Component menuComponent = UITools.getMenuComponent();
  if(menuComponent instanceof Frame) {
    final Frame frame = (Frame) menuComponent;
    final int state = frame.getExtendedState();
    if ((state & Frame.ICONIFIED) != 0)
      frame.setExtendedState(state & ~Frame.ICONIFIED);
  }
  if(menuComponent instanceof Window) {
    Window window = (Window) menuComponent;
    if (!window.isVisible())
      window.setVisible(true);
    window.toFront();
    window.requestFocus();
  }
}
java.awtWindowisVisible

Popular methods of Window

  • dispose
    Releases all of the native screen resources used by thisWindow, its subcomponents, and all of its ow
  • setVisible
  • setLocation
  • pack
    Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the wi
  • addWindowListener
    Adds the specified window listener to receive window events from this window. If l is null, no excep
  • getSize
  • getWidth
  • getHeight
  • setSize
  • setBounds
  • getBounds
  • removeWindowListener
    Removes the specified window listener so that it no longer receives window events from this window.
  • getBounds,
  • removeWindowListener,
  • getGraphicsConfiguration,
  • addComponentListener,
  • getX,
  • getY,
  • toFront,
  • getLocation,
  • removeComponentListener

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now