Пример #1
0
 /**
  * Gets all the icons which are available in the desktop
  *
  * @return list of icons if available, null otherwise
  * @throws Exception
  * @see ListItems
  */
 public ListItems getIcons() throws Exception {
   try {
     int id = RemoteServer.instance().executeAndGetId("geticons", getRefId());
     return new ListItems(id);
   } catch (RefIdNotAvailableException e) {
     return null;
   }
 }
Пример #2
0
 /**
  * Gets all the windows which are open in the desktop
  *
  * @return list of windows if available, null otherwise
  * @throws Exception
  */
 public Windows getAllWindows() throws Exception {
   try {
     int id = RemoteServer.instance().executeAndGetId("getwindows", getRefId());
     return new Windows(id);
   } catch (RefIdNotAvailableException e) {
     return null;
   }
 }
Пример #3
0
  /**
   * Gets the current desktop.
   *
   * @return current desktop
   * @throws Exception
   */
  public static Desktop getCurrent() throws Exception {

    try {
      int id = RemoteServer.instance().executeAndGetId("getdesktop", 0);
      return new Desktop(id);
    } catch (RefIdNotAvailableException e) {
      return null;
    }
  }