Examples of ResourceManager


Examples of org.apache.batik.util.resources.ResourceManager

    /**
     * Implements {@link org.apache.batik.i18n.Localizable#setLocale(Locale)}.
     */
    public static void setLocale(Locale l) {
        localizableSupport.setLocale(l);
        resourceManager = new ResourceManager(localizableSupport.getResourceBundle());
    }
View Full Code Here

Examples of org.apache.cxf.resource.ResourceManager

        }
        Properties properties = null;
        if (o instanceof Properties) {
            properties = (Properties)o;
        } else if (o instanceof String) {
            ResourceManager rm = message.getExchange().get(Bus.class).getExtension(ResourceManager.class);
            URL url = rm.resolveResource((String)o, URL.class);
            try {
                if (url == null) {
                    url = ClassLoaderUtils.getResource((String)o, this.getClass());
                }
                if (url == null) {
View Full Code Here

Examples of org.apache.flex.forks.batik.util.gui.resource.ResourceManager

    /**
     * Implements {@link org.apache.flex.forks.batik.i18n.Localizable#setLocale(Locale)}.
     */
    public static void setLocale(Locale l) {
        localizableSupport.setLocale(l);
        resourceManager = new ResourceManager(localizableSupport.getResourceBundle());
    }
View Full Code Here

Examples of org.apache.flex.forks.batik.util.resources.ResourceManager

    /**
     * Implements {@link org.apache.flex.forks.batik.i18n.Localizable#setLocale(Locale)}.
     */
    public static void setLocale(Locale l) {
        localizableSupport.setLocale(l);
        resourceManager = new ResourceManager(localizableSupport.getResourceBundle());
    }
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.ResourceManager

            List copy;
            synchronized (resourceManagers) {
                copy = new ArrayList(resourceManagers);
                    ((ReferenceCollection)resourceManagers).addReferenceCollectionListener(new ReferenceCollectionListener() {
                    public void memberAdded(ReferenceCollectionEvent event) {
                        ResourceManager resourceManager = (ResourceManager) event.getMember();
                        recoverResourceManager(resourceManager);
                    }

                    public void memberRemoved(ReferenceCollectionEvent event) {
                    }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.ResourceManager

        ResourceScheduler.class);
    conf.set("yarn.scheduler.fair.event-log-enabled", "true");

    // All tests assume only one assignment per node update
    conf.set(FairSchedulerConfiguration.ASSIGN_MULTIPLE, "false");
    resourceManager = new ResourceManager();
    resourceManager.init(conf);
    ((AsyncDispatcher)resourceManager.getRMContext().getDispatcher()).start();
    scheduler.init(conf);
    scheduler.start();
    scheduler.reinitialize(conf, resourceManager.getRMContext());
View Full Code Here

Examples of org.apache.muse.core.ResourceManager

    protected WsResource createRelationship(String name,
                                            RelationshipType type,
                                            Participant[] participants)
        throws BaseFault
    {
        ResourceManager manager = getWsResource().getResourceManager();
        String endpoint = getRelationshipContextPath();
       
        //
        // first create an empty instance of the relationship type
        //
        WsResource resource = null;
       
        try
        {
            resource = (WsResource)manager.createResource(endpoint);
        }
       
        catch (SoapFault error)
        {
            throw new RelationshipCreationFailedFault(error);
        }
       
        //
        // use the relationship capability to set the fields before initializing
        //
        RelationshipResource relationship =
            (RelationshipResource)resource.getCapability(MuwsConstants.RELATIONSHIP_RESOURCE_URI);
       
        relationship.setName(name);
        relationship.setType(type);
        relationship.setParticipant(participants);
       
        try
        {
            resource.initialize();
            manager.addResource(resource.getEndpointReference(), resource);
        }
       
        catch (SoapFault error)
        {
            throw new RelationshipCreationFailedFault(error);
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ResourceManager

      writer.writeNameAttribute(sheetId + SELECTED_POSTFIX);
      writer.writeAttribute(HtmlAttributes.TYPE, "hidden", false);
      writer.writeAttribute(HtmlAttributes.VALUE, StringUtils.toString(selectedRows), false);
      writer.endElement(HtmlConstants.INPUT);
    }
    ResourceManager resourceManager = ResourceManagerFactory.getResourceManager(facesContext);
    UIViewRoot viewRoot = facesContext.getViewRoot();
    String contextPath = facesContext.getExternalContext().getRequestContextPath();

    //String checkedImage = contextPath + resourceManager.getImage(viewRoot, "image/sheetChecked.gif");
    //String uncheckeImage = contextPath + resourceManager.getImage(viewRoot, "image/sheetUnchecked.gif");
    String selectorDisabled = contextPath + resourceManager.getImage(viewRoot, "image/sheetUncheckedDisabled.gif");
    String unchecked = contextPath + resourceManager.getImage(viewRoot, "image/sheetUnchecked.gif");
    // Outer list div
    writer.startElement(HtmlConstants.DIV, null);
    writer.writeIdAttribute(sheetId + "_data_div");
    writer.writeClassAttribute("tobago-simpleSheet-list");
    writer.writeStyleAttribute(bodyStyle);

    int top = 20;


    boolean odd = false;
    final int last = data.getFirst() + data.getRows();
    for (int row = data.getFirst(); row < last; row++) {
      data.setRowIndex(row);
      if (!data.isRowAvailable()) {
        break;
      }

      odd = !odd;
      final String rowClass = odd ? "tobago-sheet-content-odd " : "tobago-sheet-content-even ";

      //TODO make markup toago compatible
      String[] rowMarkups = (String[]) data.getAttributes().get("rowMarkup");
      String rowMarkup = "";
      if (rowMarkup != null) {
        rowMarkup = " " + org.apache.commons.lang.StringUtils.join(rowMarkups, " ");
      }

      writer.startElement(HtmlConstants.DIV, null);
      writer.writeClassAttribute("tobago-simpleSheet-row " + rowClass + rowMarkup);
      writer.writeIdAttribute(sheetId + "_data_tr_" + row);
      writer.writeAttribute(HtmlAttributes.STYLE, "top: "+ top+ "px; left: 0px;", false);
      writer.flush();

      int columnIndex = -1;
      int currentLeft = 0;
      for (UIColumn column : renderedColumnList) {
        columnIndex++;
        writer.startElement(HtmlConstants.DIV, null);
        writer.writeClassAttribute("tobago-simpleSheet-cell");
        // todo cell markup
           // + (rowSelected ? " tobabo-simpleSheet-cell-selected" : ""));
        writer.writeIdAttribute(sheetId + "_" + row + "_" + columnIndex);
        final String align = (String) column.getAttributes().get(TobagoConstants.ATTR_ALIGN);
        writer.writeAttribute(HtmlAttributes.STYLE, "top: 0px; left: " + currentLeft + "px; width: "
            + columnWidths.get(columnIndex) + "px; "
            + (align!=null?HtmlRendererUtil.toStyleString("text-align", align):""), false);
        if (column instanceof UIColumnSelector) {
          final boolean disabled = ComponentUtil.getBooleanAttribute(column, TobagoConstants.ATTR_DISABLED);
          writer.startElement(HtmlConstants.IMG, null);
          if (disabled) {
            writer.writeAttribute(HtmlAttributes.SRC, selectorDisabled, false);
          } else {
            writer.writeAttribute(HtmlAttributes.SRC, unchecked, false);
          }
          writer.writeIdAttribute(sheetId + "_data_row_selector_" + row);
          writer.writeClassAttribute("tobago-sheet-column-selector");
          writer.endElement(HtmlConstants.IMG);
        } else {
          List<UIComponent> childs = data.getRenderedChildrenOf(column);
          for (UIComponent grandkid : childs) {
            // set height to 0 to prevent use of layoutheight from parent
            grandkid.getAttributes().put(TobagoConstants.ATTR_LAYOUT_HEIGHT, 0);
            RenderUtil.encode(facesContext, grandkid);
          }
          if (childs.size() > 1) {
            if (LOG.isInfoEnabled()) {
              LOG.info(
                  "Column should not contain more than one child. Please surround the components with a tc:panel.");
            }
          }
        }
        writer.endElement(HtmlConstants.DIV);
        currentLeft += columnWidths.get(columnIndex);
      }

      writer.endElement(HtmlConstants.DIV);
      top += 20;
    }

    data.setRowIndex(-1);

    writer.endElement(HtmlConstants.DIV);

    String image1x1 = contextPath + resourceManager.getImage(viewRoot, "image/1x1.gif");

    int columnCount = 0;
    final int sortMarkerWidth = getAscendingMarkerWidth(facesContext, data);
    String imageAscending = contextPath + resourceManager.getImage(viewRoot, "image/ascending.gif");
    String imageDescending = contextPath + resourceManager.getImage(viewRoot, "image/descending.gif");
    String img = resourceManager.getImage(viewRoot, "image/unsorted.gif", true);
    String imageUnsorted = image1x1;
    if (img != null) {
      imageUnsorted = contextPath + img;
    }
    writer.startElement(HtmlConstants.DIV, null);
View Full Code Here

Examples of org.apache.tools.ant.gui.core.ResourceManager

     *
     * @return Loaded resources.
     */
    private ResourceManager getResources() {
        if(_resources == null) {
            _resources = new ResourceManager(
                "org.apache.tools.ant.gui.resources.args");
        }
        return _resources;
    }
View Full Code Here

Examples of org.apache.uima.resource.ResourceManager

  }

  public void testAggregateWithImports() throws Exception {
    try {
      String pathSep = System.getProperty("path.separator");
      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
      resMgr.setDataPath(JUnitExtension.getFile("TypeSystemDescriptionImplTest/dataPathDir")
              .getAbsolutePath()
              + pathSep
              + JUnitExtension.getFile("TypePrioritiesImplTest/dataPathDir").getAbsolutePath()
              + pathSep
              + JUnitExtension.getFile("FsIndexCollectionImplTest/dataPathDir").getAbsolutePath());
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.