Package snap.swing

Class SWWindowHpr


public class SWWindowHpr extends WindowView.WindowHpr<Window>
A WindowHpr map snap Window functionality to Swing.
  • Constructor Details

    • SWWindowHpr

      public SWWindowHpr()
  • Method Details

    • getWindow

      public WindowView getWindow()
      Returns the snap Window.
      Specified by:
      getWindow in class WindowView.WindowHpr<Window>
    • setWindow

      public void setWindow(WindowView aWin)
      Sets the snap Window Swing.
      Specified by:
      setWindow in class WindowView.WindowHpr<Window>
    • getNative

      public Window getNative()
      Returns the native being helped.
      Specified by:
      getNative in class WindowView.WindowHpr<Window>
    • getContentNative

      public JComponent getContentNative()
      Returns the native for the window content.
      Overrides:
      getContentNative in class WindowView.WindowHpr<Window>
    • initWindow

      public void initWindow()
      Initialize native window.
      Specified by:
      initWindow in class WindowView.WindowHpr<Window>
    • show

      public void show()
      Show window at given screen x and y.
      Specified by:
      show in class WindowView.WindowHpr<Window>
    • hide

      public void hide()
      Hides the window.
      Specified by:
      hide in class WindowView.WindowHpr<Window>
    • toFront

      public void toFront()
      Order window to front.
      Specified by:
      toFront in class WindowView.WindowHpr<Window>
    • viewToScreen

      public Point viewToScreen(View aView, double aX, double aY)
      Override to correct for case of RootView not in Swing Window.
      Overrides:
      viewToScreen in class WindowView.WindowHpr<Window>
    • setTitle

      public void setTitle(String aTitle)
      Sets the title of the window.
    • setResizable

      public void setResizable(boolean aValue)
      Sets the title of the window.
    • setDocURL

      public void setDocURL(WebURL aURL)
      Sets the document file for the window title bar proxy icon.
      Overrides:
      setDocURL in class WindowView.WindowHpr<Window>
    • setImage

      public void setImage(Image anImage)
      Sets the image property of given object to given string.
    • swingWindowShowingChanged

      protected void swingWindowShowingChanged()
      Called when window is shown/hidden.
    • getNativeWindowBoundsListener

      protected ComponentAdapter getNativeWindowBoundsListener()
      Returns the listener that listens to Swing window move/resize/show/hide.
    • swingWindowBoundsChanged

      protected void swingWindowBoundsChanged()
      Handles when Swing window bounds changed.
    • requestPaint

      public void requestPaint(Rect aRect)
      Registers a view for repaint.
      Specified by:
      requestPaint in class WindowView.WindowHpr<Window>
    • swingWindowActiveChanged

      protected void swingWindowActiveChanged()
      Handles active changed.
    • snapWindowPropertyChanged

      protected void snapWindowPropertyChanged(PropChange aPC)
      Called when WindowView changes to update native.
    • sendWinEvent

      protected void sendWinEvent(WindowEvent anEvent, ViewEvent.Type aType)
      Sends the given event.