jdk/src/share/classes/sun/swing/SwingUtilities2.java
changeset 20800 1f6b7d81410d
parent 15316 0dcb6f02678d
child 20818 da638a97c27a
equal deleted inserted replaced
20799:4820649a142d 20800:1f6b7d81410d
  1310             return true;
  1310             return true;
  1311         }
  1311         }
  1312     }
  1312     }
  1313 
  1313 
  1314     /**
  1314     /**
       
  1315      * Utility method that throws SecurityException if SecurityManager is set
       
  1316      * and modifiers are not public
       
  1317      *
       
  1318      * @param modifiers a set of modifiers
       
  1319      */
       
  1320     public static void checkAccess(int modifiers) {
       
  1321         if (System.getSecurityManager() != null
       
  1322                 && !Modifier.isPublic(modifiers)) {
       
  1323             throw new SecurityException("Resource is not accessible");
       
  1324         }
       
  1325     }
       
  1326 
       
  1327     /**
  1315      * Returns true if EventQueue.getCurrentEvent() has the permissions to
  1328      * Returns true if EventQueue.getCurrentEvent() has the permissions to
  1316      * access the system clipboard and if it is allowed gesture (if
  1329      * access the system clipboard and if it is allowed gesture (if
  1317      * checkGesture true)
  1330      * checkGesture true)
  1318      *
  1331      *
  1319      * @param checkGesture boolean
  1332      * @param checkGesture boolean