Ejemplo n.º 1
0
 private void onTitleClicked() {
   if (expanded) {
     CloseEvent.fire(this, this);
   } else {
     OpenEvent.fire(this, this);
   }
 }
 @Override
 public void onOpen(OpenEvent<TreeItem> event) {
   TreeItem item = event.getTarget();
   currentlySelected = item;
   if (item.getChild(0).getText().equals(DatasetWidget.LOADING)) {
     CategorySerializable cat = (CategorySerializable) item.getUserObject();
     Util.getRPCService().getCategories(cat.getID(), null, categoryCallback);
   }
 }
Ejemplo n.º 3
0
 /** Show message dilaog. The dialog is centered and the screen is blocked for edition */
 private void doShow() {
   try {
     dialogBox.center();
     dialogBox.show();
     okButton.setFocus(true);
     OpenEvent.fire(ConfirmDialog.this, ConfirmDialog.this);
   } catch (Exception e) {
     Crux.getErrorHandler().handleError(e);
     Screen.unblockToUser();
   }
 }
Ejemplo n.º 4
0
  public void onOpen(OpenEvent<TreeItem> event) {
    TreeItem node = event.getTarget();
    Object userObject = node.getUserObject();

    if (userObject != null
        && userObject instanceof String
        && "rootNode".equals((String) userObject)) {
      node.removeItems();
      setupPackageNode(node);
    }
  }
Ejemplo n.º 5
0
  /**
   * Sets the additional info visible if present.
   *
   * <p>
   *
   * @param visible <code>true</code> to show, <code>false</code> to hide
   */
  public void setAdditionalInfoVisible(boolean visible) {

    if (m_openClose == null) {
      return;
    }
    if (visible) {
      addStyleName(CmsListItemWidget.OPENCLASS);
      m_openClose.setDown(true);
      OpenEvent.fire(this, this);
    } else {
      removeStyleName(CmsListItemWidget.OPENCLASS);
      m_openClose.setDown(false);
      CloseEvent.fire(this, this);
    }
  }
Ejemplo n.º 6
0
 public void onOpen(OpenEvent<TreeItem> event) {
   final TreeItem node = event.getTarget();
   if (ExplorerNodeConfig.PACKAGE_SNAPSHOTS.equals(itemWidgets.get(node))) {
     return;
   }
   final PackageConfigData conf = (PackageConfigData) node.getUserObject();
   if (conf != null) {
     RepositoryServiceFactory.getPackageService()
         .listSnapshots(
             conf.name,
             new GenericCallback<SnapshotInfo[]>() {
               public void onSuccess(SnapshotInfo[] snaps) {
                 node.removeItems();
                 for (final SnapshotInfo snapInfo : snaps) {
                   TreeItem snap = new TreeItem(snapInfo.name);
                   // snap.setTooltip(snapInfo.comment);
                   snap.setUserObject(new Object[] {snapInfo, conf});
                   node.addItem(snap);
                 }
               }
             });
   }
 }
Ejemplo n.º 7
0
 public HandlerRegistration addOpenHandler(OpenHandler<Appointment> handler) {
   return addHandler(handler, OpenEvent.getType());
 }
Ejemplo n.º 8
0
 public void fireOpenEvent(Appointment appointment) {
   OpenEvent.fire(this, appointment);
 }
Ejemplo n.º 9
0
 @Override
 public HandlerRegistration addOpenHandler(OpenHandler<ConfirmDialog> handler) {
   return dialogBox.addHandler(handler, OpenEvent.getType());
 }
Ejemplo n.º 10
0
 public void onOpen(OpenEvent<RowWidget> event) {
   setSelectedKey(event.getTarget().getKey(), true);
 }
Ejemplo n.º 11
0
  /**
   * @see
   *     com.google.gwt.event.logical.shared.HasOpenHandlers#addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler)
   */
  public HandlerRegistration addOpenHandler(OpenHandler<CmsListItemWidget> handler) {

    return addHandler(handler, OpenEvent.getType());
  }