Package games.stendhal.client.gui

Examples of games.stendhal.client.gui.SlotWindow


   * Release any view resources. This view should not be used after this is
   * called.
   */
  @Override
  public void release() {
    final SlotWindow window = slotWindow;
    if (window != null) {
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          window.close();
        }
      });
    }

    super.release();
View Full Code Here


    switch (at) {
    case INSPECT:
      boolean addListener = slotWindow == null;
      RPSlot content = ((Corpse) entity).getContent();
      slotWindow = inspector.inspectMe(entity, content, slotWindow, 2, 2);
      SlotWindow window = slotWindow;
      if (window != null) {
        window.setTitle(entity.getTitle());
        window.setMinimizable(false);
        prepareInspectAutoClose(window, entity, content);
      }
      /*
       * Register a listener for window closing so that we can
       * drop the reference to the closed window and let the
       * garbage collector claim it.
       */
      if (addListener && (window != null)) {
        window.addCloseListener(new CloseListener() {
          public void windowClosed(InternalWindow window) {
            slotWindow = null;
          }
        });
      }
      /*
       * In case the view got released while the window was created and
       * added, and before the main thread was aware that there's a window
       * to be closed, close it now. (onAction is called from the event
       * dispatch thread).
       */
      if (isReleased()) {
        if (window != null) {
          window.close();
        }
      }
      break;

    default:
View Full Code Here

   * Release any view resources. This view should not be used after this is
   * called.
   */
  @Override
  public void release() {
    final SlotWindow window = slotWindow;
    if (window != null) {
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          window.close();
        }
      });
    }

    super.release();
View Full Code Here

    }
   
    boolean addListener = slotWindow == null;
    slotWindow = inspector.inspectMe(entity, slot,
        slotWindow, slotWindowWidth, slotWindowHeight);
    SlotWindow window = slotWindow;
    /*
     * Register a listener for window closing so that we can
     * drop the reference to the closed window and let the
     * garbage collector claim it.
     */
    if (addListener && (window != null)) {
      window.addCloseListener(new CloseListener() {
        public void windowClosed(InternalWindow window) {
          slotWindow = null;
        }
      });
    }
    /*
     * In case the view got released while the window was created and
     * added, and before the main thread was aware that there's a window
     * to be closed, close it now. (onAction is called from the event
     * dispatch thread).
     */
    if (isReleased()) {
      if (window != null) {
        window.close();
      }
    }
  }
View Full Code Here

    slotWindowHeight = slots / width;
  }
 
  @Override
  public void release() {
    final SlotWindow window = slotWindow;
    if (window != null) {
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          window.close();
        }
      });
    }

    super.release();
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.SlotWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.