Package com.google.code.apis.rest.client.Wadl

Examples of com.google.code.apis.rest.client.Wadl.ResourcesNode


  }
 
  public static void listResources(final ApplicationNode application, final TreeItem applicationTreeItem) {
    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(applicationTreeItem, WadlXml.resourcesNode);
   
    ResourcesNode resources = application.getResources();
    if (resources != null) {     
      TreeItem resourcesTreeItem = new TreeItem(new ResourcesItem(resources, applicationTreeItem));
      resourcesTreeItem.setUserObject(WadlXml.resourcesNode);
      applicationTreeItem.addItem(resourcesTreeItem);     
         
      //  list all resource items   
      ResourceItem.listResources(resources, resourcesTreeItem);
      resourcesTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);
     
      // close resources item
      TreeItem resourcesCloseItem = new TreeItem(new GenericClosingItem(WadlXml.resourcesNode));
      resourcesCloseItem.setUserObject(WadlXml.resourcesNode);
      applicationTreeItem.addItem(resourcesCloseItem);
    }
    else {
      if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.resourcesNode)) {     
        // add resources button     
        HorizontalPanel addResourcesPanel = new HorizontalPanel();
             
        Button addResourcesButton = new Button(GuiFactory.strings.addResources());
        addResourcesButton.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {         
            application.addResources(new ResourcesNode(GuiFactory.strings.newResources(), application));
            listResources(application, applicationTreeItem);                   
          }
        });
        addResourcesPanel.add(addResourcesButton);
        TreeItem addResourcesTreeItem = new TreeItem(addResourcesPanel);
View Full Code Here

TOP

Related Classes of com.google.code.apis.rest.client.Wadl.ResourcesNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.