Examples of ResourceModel


Examples of org.apache.wicket.model.ResourceModel

                    getDocument().getDocumentOrder());
            final HiddenField pageOrder = new HiddenField("pageOrder",
                    new PropertyModel(this, "orderedList"));
            documentOrdering.add(documnetOrder);
            documentOrdering.add(pageOrder);
            documentOrdering.add(new AjaxButton("save",new ResourceModel("common.save"), documentOrdering)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form form)
                {
View Full Code Here

Examples of org.apache.wicket.model.ResourceModel

            menuTree.setRootLess(true);
            add(new ContextImage("menusRootIcon", "images/tree/folder.gif"));
            add(menuTree);
            Form menuForm = new Form("menuForm");
            add(menuForm);
            add(new AjaxButton("newsave",new ResourceModel("add.menu"),menuForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    MenuDefinition def = null;
                    if (getNodeType().equals(FOLDER_NODE_TYPE))
                    {
                        def = getServiceLocator().getPageManager().newFolderMenuDefinition();
                    }
                    else
                    {
                        def = getServiceLocator().getPageManager().newPageMenuDefinition();
                    }
                    metaDataModalWindow.setContent(new MenuWindow(metaDataModalWindow.getContentId(), def, menusTab));
                    metaDataModalWindow.show(target);
                }
            });
            add(new AjaxButton("remove",new ResourceModel("common.remove"),menuForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    menuActions(REMOVE_ACTION, getMenuDefinition().getName(), new JetspeedMenuDefinition());
                    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) menuTreeRoot
                            .getRoot();
                    DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(
                            new MenuTreeNode(getMenuDefinition().getName(),getServiceLocator()));
                    rootNode.remove(childNode);
                    menuTree.getTreeState().expandNode(rootNode);
                    menuTree.updateTree(target);
                    target.addComponent(menuTree);
                    target.addComponent(tabPanel);
                }
            }.add(new JavascriptEventConfirmation("onclick",new ResourceModel("action.delete.confirm"))));
            add(menusTab);
        }
View Full Code Here

Examples of org.apache.wicket.model.ResourceModel

            Label visibleLabel = new Label("visible", "Hidden");
            CheckBox visibleCheckbox = new CheckBox("visibleCheck",
                    new PropertyModel(this, "document.hidden"));
            infoForm.add(visibleLabel);
            infoForm.add(visibleCheckbox);
            infoForm.add(new AjaxButton("new",new ResourceModel("add.page"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
View Full Code Here

Examples of org.glassfish.jersey.server.model.ResourceModel

     * @param serviceLocator Service locator.
     * @param monitoringEventListener Monitoring event listener.
     */
    MonitoringStatisticsProcessor(final ServiceLocator serviceLocator, final MonitoringEventListener monitoringEventListener) {
        this.monitoringEventListener = monitoringEventListener;
        final ResourceModel resourceModel = serviceLocator.getService(ExtendedResourceContext.class).getResourceModel();
        this.statisticsBuilder = new MonitoringStatisticsImpl.Builder(resourceModel);
        this.statisticsCallbackList = serviceLocator.getAllServices(MonitoringStatisticsListener.class);
        this.scheduler = serviceLocator.getService(ScheduledExecutorService.class,
                new RuntimeExecutorsBinder.BackgroundSchedulerLiteral());
        this.interval = PropertiesHelper.getValue(serviceLocator.getService(Configuration.class).getProperties(),
View Full Code Here

Examples of org.sonar.api.database.model.ResourceModel

      .setAnalysisType(loadAnalysisType());
    return this;
  }

  private void checkCurrentAnalysisIsTheLatestOne(String projectKey, Date analysisDate) {
    ResourceModel persistedProject = databaseSession.getSingleResult(ResourceModel.class, "key", projectKey, "enabled", true);
    if (persistedProject != null) {
      Snapshot lastSnapshot = databaseSession.getSingleResult(Snapshot.class, "resourceId", persistedProject.getId(), "last", true);
      if (lastSnapshot != null && !lastSnapshot.getCreatedAt().before(analysisDate)) {
        throw new IllegalArgumentException(
          "'sonar.projectDate' property cannot be older than the date of the last known quality snapshot on this project. Value: '" +
            settings.getString(CoreProperties.PROJECT_DATE_PROPERTY) + "'. " +
            "Latest quality snapshot: '" + DateUtils.formatDateTime(lastSnapshot.getCreatedAt())
View Full Code Here

Examples of org.switchyard.config.model.resource.ResourceModel

            Assert.assertTrue(container.isScan());
            Assert.assertEquals(Long.valueOf(1000), container.getScanInterval());
            Assert.assertNull(resources);
        } else if (RESOURCES_XML.equals(xml)) {
            Assert.assertNull(container);
            ResourceModel drlResource = resources.getResources().get(0);
            Assert.assertEquals("foo.drl", drlResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DRL"), drlResource.getType());
            ResourceModel dslResource = resources.getResources().get(1);
            Assert.assertEquals("bar.dsl", dslResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DSL"), dslResource.getType());
            ResourceModel dtableResource = resources.getResources().get(2);
            Assert.assertEquals("foobar.xls", dtableResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DTABLE"), dtableResource.getType());
            ResourceDetail dtableDetail = dtableResource.getDetail();
            Assert.assertEquals("XLS", dtableDetail.getInputType());
            Assert.assertEquals("MySheet", dtableDetail.getWorksheetName());
            /* SWITCHYARD-1662
            Assert.assertEquals(true, dtableDetail.isUsingExternalTypes());
            */
 
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.visualization.model.extensions.ResourceModel

                .createDisplay(contentType);

        ViewContentDisplay contentDisplay = new DropEnabledViewContentDisplay(
                viewContentDisplay, contentDropTargetManager);

        ResourceModel resourceModel = new DefaultResourceModel(
                resourceSetFactory);

        if (viewContentDisplay instanceof RequiresAutomaticResourceSet) {
            ((RequiresAutomaticResourceSet) viewContentDisplay)
                    .setAutomaticResources(resourceModel
                            .getAutomaticResourceSet());
        }

        DefaultResourceModelPresenter resourceModelPresenter = new DefaultResourceModelPresenter(
                new ResourceSetAvatarResourceSetsPresenter(
                        allResourcesDragAvatarFactory),
                new ResourceSetAvatarResourceSetsPresenter(
                        userSetsDragAvatarFactory), resourceModel);

        DefaultSelectionModel selectionModel = new DefaultSelectionModel(
                selectionModelLabelFactory, resourceSetFactory);

        DefaultSelectionModelPresenter selectionModelPresenter = new DefaultSelectionModelPresenter(
                new ResourceSetAvatarResourceSetsPresenter(dropTargetFactory),
                new ResourceSetAvatarResourceSetsPresenter(
                        selectionDragAvatarFactory), selectionModel);

        Map<Slot, VisualItemValueResolver> fixedSlotResolvers = viewContentDisplayConfiguration
                .getFixedSlotResolvers(contentType);

        CompositeVisualItemBehavior visualItemBehaviors = new CompositeVisualItemBehavior();

        // visualItemBehaviors.add(new ViewInteractionLogger(logger));
        visualItemBehaviors.add(new HighlightingVisualItemBehavior(hoverModel));
        visualItemBehaviors.add(new DragVisualItemBehavior(dragEnablerFactory));
        visualItemBehaviors.add(new PopupWithHighlightingVisualItemBehavior(
                detailsWidgetHelper, popupManagerFactory, hoverModel));
        visualItemBehaviors.add(new SwitchSelectionOnClickVisualItemBehavior(
                selectionModel, commandManager));

        SlotMappingInitializer slotMappingInitializer = createSlotMappingInitializer(contentType);

        ResourceMultiCategorizer categorizer = createDefaultCategorizer(contentType);

        VisualizationModel visualizationModel = new FixedSlotResolversVisualizationModelDecorator(
                new DefaultVisualizationModel(contentDisplay,
                        selectionModel.getSelectionProxy(),
                        hoverModel.getResources(), visualItemBehaviors,
                        errorHandler, new DefaultResourceSetFactory(),
                        categorizer), fixedSlotResolvers);

        visualizationModel.setContentResourceSet(resourceModel.getResources());

        DefaultManagedSlotMappingConfiguration managedConfiguration = new DefaultManagedSlotMappingConfiguration(
                resolverFactoryProvider, slotMappingInitializer,
                visualizationModel, visualizationModel);
View Full Code Here

Examples of org.woped.core.model.petrinet.ResourceModel

          for (int i = 0; i < getPetrinet().getResources().size(); i++){
            objectsUnassignedListModel.addElement((ResourceModel) getPetrinet().getResources().get(i));
            }
          int a = objectsUnassignedListModel.getSize()-1;
          for (int i = 0; i< (a+1) ;i++){
            ResourceModel currentObject = (ResourceModel) objectsUnassignedListModel.getElementAt(a-i);
            Vector<?> assignedClasses = getPetrinet().getResourceClassesResourceIsAssignedTo(currentObject.toString());
            if (!assignedClasses.isEmpty() ){
              objectsUnassignedListModel.removeElement(currentObject);
              objectsAssignedListModel.addElement(currentObject);
             
             
            }

             
            Object ass;
            for (Iterator<?> iter = assignedClasses.iterator(); iter.hasNext();){
              ass = iter.next();
              String currentResource = ass.toString();
              for(int j =0; j <  RolesTreeModel.getChildCount(RolesTopNode);j++){
                String currentRole = RolesTreeModel.getChild(RolesTopNode, j).toString();
                if(currentResource.equals(currentRole)){
                  RolesTreeNode currentNode = (RolesTreeNode) RolesTreeModel.getChild(RolesTopNode, j);
                  RolesTreeModel.insertNodeInto(new ObjectsTreeNode(currentObject.toString()), currentNode, currentNode.getChildCount());
                }
              }
              for(int j =0; j <  GroupsTreeModel.getChildCount(GroupsTopNode);j++){
                String currentGroup = GroupsTreeModel.getChild(GroupsTopNode, j).toString();
                if(currentResource.equals(currentGroup)){
                  GroupsTreeNode currentNode = (GroupsTreeNode) GroupsTreeModel.getChild(GroupsTopNode, j);
                  DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) GroupsTree.getCellRenderer();
                  renderer.setLeafIcon(Messages.getImageIcon("PetriNet.Resources.Delete"));
                  GroupsTreeModel.insertNodeInto(new ObjectsTreeNode(currentObject.toString()), currentNode, currentNode.getChildCount());
               
                }
              }
                  
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.