Codota Logo
EnhancedPanel.getAncestorWindow
Code IndexAdd Codota to your IDE (free)

How to use
getAncestorWindow
method
in
de.schlichtherle.truezip.swing.EnhancedPanel

Best Java code snippets using de.schlichtherle.truezip.swing.EnhancedPanel.getAncestorWindow (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: de.schlichtherle.truezip/truezip-swing

/**
 * Returns the ancestor {@link Window} of this {@code Panel} or
 * {@code null} if the component is not (yet) placed in a
 * {@code Window}.
 */
public @Nullable Window getAncestorWindow() {
  return getAncestorWindow(this);
}
origin: de.schlichtherle.truezip/truezip-driver-zip

final Window window = evt.getSource().getAncestorWindow();
window.addWindowFocusListener(new WindowFocusListener() {
  @Override
origin: de.schlichtherle.truezip/truezip-driver-zip

final Window window = evt.getSource().getAncestorWindow();
window.addWindowFocusListener(new WindowFocusListener() {
  @Override
origin: de.schlichtherle.truezip/truezip-driver-zip

final Window window = evt.getSource().getAncestorWindow();
window.addWindowFocusListener(new WindowFocusListener() {
  @Override
origin: de.schlichtherle.truezip/truezip-swing

  @Override
  public void hierarchyChanged(final HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)
        != HierarchyEvent.SHOWING_CHANGED)
      return;
    final Window window = getAncestorWindow();
    assert null != window : "A showing panel must have a containing window!";
    final boolean windowShown = window.isShowing();
    if (windowShown != isShowing())
      return;
    processPanelEvent(new PanelEvent(EnhancedPanel.this,
        windowShown
          ? PanelEvent.ANCESTOR_WINDOW_SHOWN
          : PanelEvent.ANCESTOR_WINDOW_HIDDEN));
  }
} // class EnhancedPanelHierarchyListener
origin: de.schlichtherle.truezip/truezip-swing

@Test
public void testGetAncestorWindow() throws InterruptedException {
  assertNull(instance.getAncestorWindow());
  JFrameOperator frame = showFrameWith(instance);
  Window window1 = instance.getAncestorWindow();
  assertSame(frame.getSource(), window1);
  frame.dispose();
  frame = showFrameWith(instance); // change enclosing frame
  Window window2 = instance.getAncestorWindow();
  assertSame(frame.getSource(), window2);
  frame.dispose();
  assertNotSame(window1, window2);
}
de.schlichtherle.truezip.swingEnhancedPanelgetAncestorWindow

Javadoc

Returns the ancestor Window of this Panel or null if the component is not (yet) placed in a Window.

Popular methods of EnhancedPanel

  • <init>
    Creates a new EnhancedPanel with FlowLayoutand the specified buffering strategy. If isDoubleBuffered
  • add
  • addPanelListener
    Adds the listener to the list of receivers for PanelEvents. Note that the listener doesn't get seria
  • fireAncestorWindowHidden
    Notifies all registered listeners about the event. This is a synchronous operation.
  • fireAncestorWindowShown
    Notifies all registered listeners about the event. This is a synchronous operation.
  • getListeners
  • getPanelListeners
    Returns an array of all the panel listeners registered on this component.
  • isShowing
  • processPanelEvent
    Calls #fireAncestorWindowShown or #fireAncestorWindowHidden, depending on the ID of the given event.
  • removePanelListener
    Removes the listener from the list of receivers for PanelEvents.
  • setBorder
  • setLayout
  • setBorder,
  • setLayout

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now