Examples of OpenType


Examples of ceylon.language.meta.declaration.OpenType

            = producedType.getTypeArguments();
        while((it = typeParameters.next()) != finished_.get_()){
            com.redhat.ceylon.compiler.java.runtime.metamodel.FreeTypeParameter tp = (com.redhat.ceylon.compiler.java.runtime.metamodel.FreeTypeParameter) it;
            com.redhat.ceylon.compiler.typechecker.model.TypeParameter tpDecl = (com.redhat.ceylon.compiler.typechecker.model.TypeParameter) tp.declaration;
            com.redhat.ceylon.compiler.typechecker.model.ProducedType ptArg = ptArguments.get(tpDecl);
            OpenType ptArgWrapped = Metamodel.getMetamodel(ptArg);
            typeArguments.put(tp, ptArgWrapped);
        }
        this.typeArguments = new InternalMap<ceylon.language.meta.declaration.TypeParameter,
                                             ceylon.language.meta.declaration.OpenType>(ceylon.language.meta.declaration.TypeParameter.$TypeDescriptor$,
                                                                                             ceylon.language.meta.declaration.OpenType.$TypeDescriptor$,
View Full Code Here

Examples of java.awt.font.OpenType

        this.f = f;

        // if it's an OpenType font, parse the relevant tables to get
        // glyph name to code mappings
        if (f instanceof OpenType) {
            OpenType ot = (OpenType) f;

            byte[] cmapData = ot.getFontTable (OpenType.TAG_CMAP);
            byte[] postData = ot.getFontTable (OpenType.TAG_POST);

            TrueTypeFont ttf = new TrueTypeFont (0x10000);

            cmapTable =
            (CmapTable) TrueTypeTable.createTable (ttf, "cmap",
View Full Code Here

Examples of javax.management.openmbean.OpenType

                                     List attributesList){

        CompositeType type = getCompositeType(connection, objectName, attrInfo);
        for(Iterator it=type.keySet().iterator(); it.hasNext(); ){
            String itemName = (String)it.next();
            OpenType itemType = type.getType(itemName);
            Class itemTypeClass = getClass(itemType.getClassName(),
                        this.getClass().getClassLoader());
            for(int j=0; j<dataTypes.length; j++){

                Class dataType = getClass(dataTypes[j],
                        this.getClass().getClassLoader());
                if(dataType.isAssignableFrom(itemTypeClass)){
                    attributesList.add(
                            new ObjectAttributeInfo(
                                    attrInfo.getName() + COMPOSITE_ATTR_SEPARATOR + itemName,
                                    type.getDescription(itemName),
                                    itemType.getClassName(), false, true, false));
                }
            }
        }
    }
View Full Code Here

Examples of javax.management.openmbean.OpenType

    {
      if (value instanceof CompositeData)
        return (queryAttributeRecursive((CompositeData) value, attrNameList));
      else if (value instanceof OpenType)
      {
        OpenType ot = (OpenType) value;
        Collectd.logNotice ("GenericJMXConfValue: Handling of OpenType \""
            + ot.getTypeName () + "\" is not yet implemented.");
        return (null);
      }
      else
      {
        Collectd.logError ("GenericJMXConfValue: Received object of "
View Full Code Here

Examples of javax.management.openmbean.OpenType

            CompositeType compositeType = data.getCompositeType();
            Set keys = compositeType.keySet();
            for (Iterator iter = keys.iterator(); iter.hasNext();) {
                String key = (String) iter.next();
                Object value = data.get(key);
                OpenType type = compositeType.getType(key);
                if (type instanceof SimpleType) {
                    setProperty(propertyPrefix + "." + key, value);
                } else {
                    createProperty(propertyPrefix + "." + key, value);
                }
            }
        } else if (result instanceof TabularDataSupport) {
            TabularDataSupport data = (TabularDataSupport) result;
            for (Iterator iter = data.keySet().iterator(); iter.hasNext();) {
                Object key = iter.next();
                for (Iterator iter1 = ((List) key).iterator(); iter1.hasNext();) {
                    Object key1 = iter1.next();
                    CompositeData valuedata = data.get(new Object[] { key1 });
                    Object value = valuedata.get("value");
                    OpenType type = valuedata.getCompositeType().getType(
                            "value");
                    if (type instanceof SimpleType) {
                        setProperty(propertyPrefix + "." + key1, value);
                    } else {
                        createProperty(propertyPrefix + "." + key1, value);
View Full Code Here

Examples of javax.management.openmbean.OpenType

      {
  h.debug(e);
      }
    try
      {
  ArrayType type = new ArrayType(-1, new OpenType("Mauve","Mauve","Mauve")
    {
      public boolean equals(Object obj)
      {
        return false;
      }
View Full Code Here

Examples of javax.management.openmbean.OpenType

        // ItemNames in composite data
        List<String> itemNames = new ArrayList<String>(data.getCompositeType().keySet());

        for (String itemName : itemNames)
        {
            OpenType itemType = data.getCompositeType().getType(itemName);
            Label keyLabel = toolkit.createLabel(compositeHolder, itemName, SWT.TRAIL);
            GridData layoutData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
            layoutData.minimumWidth = 70;
            keyLabel.setLayoutData(layoutData);

            if (itemType.isArray())
            {
                OpenType type = ((ArrayType)itemType).getElementOpenType();
                //  If Byte array and mimetype is text, convert to text string
                if (type.getClassName().equals(Byte.class.getName()))
                {
                    String mimeType = null;
                    String encoding = null;
                    if (data.containsKey("MimeType"))
                    {
                        mimeType = (String)data.get("MimeType");
                    }
                    if (data.containsKey("Encoding"))
                    {
                        encoding = (String)data.get("Encoding");
                    }
                   
                    if (encoding == null || encoding.length() == 0)
                    {
                        encoding = Charset.defaultCharset().name();
                    }

                    if ("text/plain".equals(mimeType))
                    {
                        convertByteArray(toolkit, compositeHolder, data, itemName, encoding);
                    }
                    else
                    {
                        handleBinaryMessageContent(toolkit, compositeHolder, data, itemName, encoding);
                    }                       
                }
                // If array of any other supported type, show as a list of String array
                else if (SUPPORTED_ARRAY_DATATYPES.contains(type.getClassName()))
                {
                    convertArrayItemForDisplay(compositeHolder, data, itemName);
                }
                else
                {
View Full Code Here

Examples of javax.management.openmbean.OpenType

            CompositeType compositeType = data.getCompositeType();
            Set keys = compositeType.keySet();
            for (Iterator iter = keys.iterator(); iter.hasNext();) {
                String key = (String) iter.next();
                Object value = data.get(key);
                OpenType type = compositeType.getType(key);
                if (type instanceof SimpleType) {
                    setProperty(propertyPrefix + "." + key, value);
                } else {
                    createProperty(propertyPrefix + "." + key, value);
                }
            }
        } else if (result instanceof TabularDataSupport) {
            TabularDataSupport data = (TabularDataSupport) result;
            for (Iterator iter = data.keySet().iterator(); iter.hasNext();) {
                Object key = iter.next();
                for (Iterator iter1 = ((List) key).iterator(); iter1.hasNext();) {
                    Object key1 = iter1.next();
                    CompositeData valuedata = data.get(new Object[] { key1 });
                    Object value = valuedata.get("value");
                    OpenType type = valuedata.getCompositeType().getType(
                            "value");
                    if (type instanceof SimpleType) {
                        setProperty(propertyPrefix + "." + key1, value);
                    } else {
                        createProperty(propertyPrefix + "." + key1, value);
View Full Code Here

Examples of javax.management.openmbean.OpenType

   }

   public void testConstructorSimple()
      throws Exception
   {
      OpenType test = new MyOpenType("java.lang.Void", "type", "description");
      assertEquals("java.lang.Void", test.getClassName());
      assertEquals("type", test.getTypeName());
      assertEquals("description", test.getDescription());
      assertEquals(false, test.isArray());
   }
View Full Code Here

Examples of javax.management.openmbean.OpenType

   }

   public void testConstructorArray()
      throws Exception
   {
      OpenType test = new MyOpenType("[[Ljava.lang.Void;", "type", "description");
      assertEquals("[[Ljava.lang.Void;", test.getClassName());
      assertEquals("type", test.getTypeName());
      assertEquals("description", test.getDescription());
      assertEquals(true, test.isArray());
   }
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.