< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java

Print this page




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt;
  27 
  28 import java.awt.*;

  29 
  30 import sun.awt.CausedFocusEvent;
  31 import sun.java2d.SurfaceData;
  32 
  33 // TODO Is it worth to generify this interface, like that:
  34 //
  35 // public interface PlatformWindow<WindowType extends Window>
  36 //
  37 // ?
  38 
  39 public interface PlatformWindow {
  40 
  41     /*
  42      * Delegate initialization (create native window and all the
  43      * related resources).
  44      */
  45     public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner);
  46 
  47     /*
  48      * Delegate shutdown (dispose native window and all the
  49      * related resources).
  50      */


  97     public SurfaceData getScreenSurface();
  98 
  99     /*
 100      * Revalidates the window's current SurfaceData and returns
 101      * the newly created one.
 102      */
 103     public SurfaceData replaceSurfaceData();
 104 
 105     public void setModalBlocked(boolean blocked);
 106 
 107     public void toFront();
 108 
 109     public void toBack();
 110 
 111     public void setMenuBar(MenuBar mb);
 112 
 113     public void setAlwaysOnTop(boolean value);
 114 
 115     public void updateFocusableWindowState();
 116 
 117     public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
 118 
 119     public boolean requestWindowFocus();
 120 
 121     /*
 122      * Returns true only when called on a frame/dialog when it's natively focused.
 123      */
 124     public boolean isActive();
 125 
 126     public void setResizable(boolean resizable);
 127 
 128     /**
 129      * Applies the minimum and maximum size to the platform window.
 130      */
 131     public void setSizeConstraints(int minW, int minH, int maxW, int maxH);
 132 
 133     /**
 134      * Transforms the given Graphics object according to the native
 135      * implementation traits (insets, etc.).
 136      */
 137     public Graphics transformGraphics(Graphics g);




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt;
  27 
  28 import java.awt.*;
  29 import java.awt.event.FocusEvent;
  30 

  31 import sun.java2d.SurfaceData;
  32 
  33 // TODO Is it worth to generify this interface, like that:
  34 //
  35 // public interface PlatformWindow<WindowType extends Window>
  36 //
  37 // ?
  38 
  39 public interface PlatformWindow {
  40 
  41     /*
  42      * Delegate initialization (create native window and all the
  43      * related resources).
  44      */
  45     public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner);
  46 
  47     /*
  48      * Delegate shutdown (dispose native window and all the
  49      * related resources).
  50      */


  97     public SurfaceData getScreenSurface();
  98 
  99     /*
 100      * Revalidates the window's current SurfaceData and returns
 101      * the newly created one.
 102      */
 103     public SurfaceData replaceSurfaceData();
 104 
 105     public void setModalBlocked(boolean blocked);
 106 
 107     public void toFront();
 108 
 109     public void toBack();
 110 
 111     public void setMenuBar(MenuBar mb);
 112 
 113     public void setAlwaysOnTop(boolean value);
 114 
 115     public void updateFocusableWindowState();
 116 
 117     public boolean rejectFocusRequest(FocusEvent.Cause cause);
 118 
 119     public boolean requestWindowFocus();
 120 
 121     /*
 122      * Returns true only when called on a frame/dialog when it's natively focused.
 123      */
 124     public boolean isActive();
 125 
 126     public void setResizable(boolean resizable);
 127 
 128     /**
 129      * Applies the minimum and maximum size to the platform window.
 130      */
 131     public void setSizeConstraints(int minW, int minH, int maxW, int maxH);
 132 
 133     /**
 134      * Transforms the given Graphics object according to the native
 135      * implementation traits (insets, etc.).
 136      */
 137     public Graphics transformGraphics(Graphics g);


< prev index next >