< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java

Print this page




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   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 package sun.awt.X11;
  26 

  27 import java.awt.*;
  28 import java.awt.event.InputEvent;
  29 import java.awt.event.MouseEvent;
  30 import java.awt.event.KeyEvent;
  31 import java.awt.datatransfer.Clipboard;
  32 import java.awt.dnd.DragSource;
  33 import java.awt.dnd.DragGestureListener;
  34 import java.awt.dnd.DragGestureEvent;
  35 import java.awt.dnd.DragGestureRecognizer;
  36 import java.awt.dnd.MouseDragGestureRecognizer;
  37 import java.awt.dnd.InvalidDnDOperationException;
  38 import java.awt.dnd.peer.DragSourceContextPeer;
  39 import java.awt.font.TextAttribute;
  40 import java.awt.im.InputMethodHighlight;
  41 import java.awt.im.spi.InputMethodDescriptor;
  42 import java.awt.image.ColorModel;
  43 import java.awt.peer.*;
  44 import java.beans.PropertyChangeListener;
  45 import java.security.AccessController;
  46 import java.security.PrivilegedAction;


2532         final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
2533         if (peer != null) {
2534             ((XWindowPeer) peer).setGrab(false);
2535         }
2536     }
2537     /**
2538      * Returns if the java.awt.Desktop class is supported on the current
2539      * desktop.
2540      * <p>
2541      * The methods of java.awt.Desktop class are supported on the Gnome desktop.
2542      * Check if the running desktop is Gnome by checking the window manager.
2543      */
2544     @Override
2545     public boolean isDesktopSupported(){
2546         return XDesktopPeer.isDesktopSupported();
2547     }
2548 
2549     @Override
2550     public DesktopPeer createDesktopPeer(Desktop target){
2551         return new XDesktopPeer();










2552     }
2553 
2554     @Override
2555     public boolean areExtraMouseButtonsEnabled() throws HeadlessException {
2556         return areExtraMouseButtonsEnabled;
2557     }
2558 
2559     @Override
2560     public boolean isWindowOpacitySupported() {
2561         XNETProtocol net_protocol = XWM.getWM().getNETProtocol();
2562 
2563         if (net_protocol == null) {
2564             return false;
2565         }
2566 
2567         return net_protocol.doOpacityProtocol();
2568     }
2569 
2570     @Override
2571     public boolean isWindowShapingSupported() {




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   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 package sun.awt.X11;
  26 
  27 import java.awt.peer.TaskbarPeer;
  28 import java.awt.*;
  29 import java.awt.event.InputEvent;
  30 import java.awt.event.MouseEvent;
  31 import java.awt.event.KeyEvent;
  32 import java.awt.datatransfer.Clipboard;
  33 import java.awt.dnd.DragSource;
  34 import java.awt.dnd.DragGestureListener;
  35 import java.awt.dnd.DragGestureEvent;
  36 import java.awt.dnd.DragGestureRecognizer;
  37 import java.awt.dnd.MouseDragGestureRecognizer;
  38 import java.awt.dnd.InvalidDnDOperationException;
  39 import java.awt.dnd.peer.DragSourceContextPeer;
  40 import java.awt.font.TextAttribute;
  41 import java.awt.im.InputMethodHighlight;
  42 import java.awt.im.spi.InputMethodDescriptor;
  43 import java.awt.image.ColorModel;
  44 import java.awt.peer.*;
  45 import java.beans.PropertyChangeListener;
  46 import java.security.AccessController;
  47 import java.security.PrivilegedAction;


2533         final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
2534         if (peer != null) {
2535             ((XWindowPeer) peer).setGrab(false);
2536         }
2537     }
2538     /**
2539      * Returns if the java.awt.Desktop class is supported on the current
2540      * desktop.
2541      * <p>
2542      * The methods of java.awt.Desktop class are supported on the Gnome desktop.
2543      * Check if the running desktop is Gnome by checking the window manager.
2544      */
2545     @Override
2546     public boolean isDesktopSupported(){
2547         return XDesktopPeer.isDesktopSupported();
2548     }
2549 
2550     @Override
2551     public DesktopPeer createDesktopPeer(Desktop target){
2552         return new XDesktopPeer();
2553     }
2554 
2555     @Override
2556     public boolean isTaskbarSupported(){
2557         return XTaskbarPeer.isTaskbarSupported();
2558     }
2559     
2560     @Override
2561     public TaskbarPeer createTaskbarPeer(Taskbar target){
2562         return new XTaskbarPeer();
2563     }
2564 
2565     @Override
2566     public boolean areExtraMouseButtonsEnabled() throws HeadlessException {
2567         return areExtraMouseButtonsEnabled;
2568     }
2569 
2570     @Override
2571     public boolean isWindowOpacitySupported() {
2572         XNETProtocol net_protocol = XWM.getWM().getNETProtocol();
2573 
2574         if (net_protocol == null) {
2575             return false;
2576         }
2577 
2578         return net_protocol.doOpacityProtocol();
2579     }
2580 
2581     @Override
2582     public boolean isWindowShapingSupported() {


< prev index next >