Examples of TextAttribute


Examples of at.bestsolution.efxclipse.text.jface.TextAttribute

//      System.err.println("REGION: " + System.identityHashCode(r) + " => " + r.getOffset() + "/" + r.getLength());
      if( scanner != null ) {
        int lastStart= r.getOffset();
        int length= 0;
        boolean firstToken= true;
        TextAttribute lastAttribute = null;
       
        scanner.setRange(document, r.getOffset(), r.getLength());
       
        while( true ) {
          IToken token= scanner.nextToken();
          if (token.isEOF())
            break;
         
          TextAttribute attribute = getTokenTextAttribute(token);
          if (lastAttribute != null && lastAttribute.equals(attribute)) {
            length += scanner.getTokenLength();
            firstToken= false;
          } else {
            if (!firstToken) {
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.attribute.TextAttribute

      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_HYPERTEXT.equals(attributeType)){
        HypertextAttribute hyperTextAttribute = (HypertextAttribute)attribute;
        attributeValue = hyperTextAttribute.getText();
      }
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_LONGTEXT.equals(attributeType)){
        TextAttribute textAttribute = (TextAttribute) attribute;
        attributeValue = textAttribute.getText();
      }
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_MONOTEXT.equals(attributeType)){
        MonoTextAttribute mono = (MonoTextAttribute) attribute;
        attributeValue = mono.getText();
      }
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_NUMBER.equals(attributeType)){
        NumberAttribute numberattribute = (NumberAttribute) attribute;
        attributeValue = numberattribute.getNumber();
      }
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_TEXT.equals(attributeType)){
        TextAttribute textAttribute = (TextAttribute) attribute;
        attributeValue = textAttribute.getText();
      }
    }
    return attributeValue;
  }
View Full Code Here

Examples of com.caucho.config.attribute.TextAttribute

    Class<?> type = paramTypes[0];
   
    if (propName.equals("text")
        && (type.equals(String.class)
            || type.equals(RawString.class))) {
      attr = new TextAttribute(method, type);
      _addText = attr;
      _attributeMap.put("#text", attr);
    }
    else
      attr = new SetterAttribute(method, type);
View Full Code Here

Examples of com.google.code.appengine.awt.font.TextAttribute

        attrMap.put(name, this);
    }

    @Override
    protected Object readResolve() throws InvalidObjectException {
        TextAttribute result = attrMap.get(this.getName());
        if (result != null) {
            return result;
        }
        // awt.194=Unknown attribute name
        throw new InvalidObjectException(Messages.getString("awt.194")); //$NON-NLS-1$
View Full Code Here

Examples of java.awt.font.TextAttribute

    }

    @Override
    public void render(ReportContext context, TextBuilder builder,
            List<Forward> fwds) {
        TextAttribute keys[] = getKeys();
        Object savedValues[] = new Object[keys.length];
        for (int i = 0; i < keys.length; ++i) {
            savedValues[i] = builder.getAttribute(keys[i]);
            builder.setAttribute(keys[i], attributes.get(keys[i]));
        }
View Full Code Here

Examples of java.awt.font.TextAttribute

        encoder.writeObject(TextAttribute.BACKGROUND);
        encoder.close();
        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray()));
        XMLDecoder decoder = new XMLDecoder(stream);
        TextAttribute attribute = (TextAttribute) decoder.readObject();
        assertEquals(TextAttribute.BACKGROUND, attribute);
    }
View Full Code Here

Examples of java.awt.font.TextAttribute

      final AttributedCharacterIterator.Attribute attribute = (AttributedCharacterIterator.Attribute) iterator.next();
      if (!(attribute instanceof TextAttribute))
      {
        continue;
      }
      final TextAttribute textattribute = (TextAttribute) attribute;
      if (textattribute.equals(TextAttribute.FONT))
      {
        final Font font = (Font) iter.getAttributes().get(textattribute);
        setFont(font);
      }
      else if (textattribute.equals(TextAttribute.UNDERLINE))
      {
        if (iter.getAttributes().get(textattribute) == TextAttribute.UNDERLINE_ON)
        {
          underline = true;
        }
      }
      else if (textattribute.equals(TextAttribute.SIZE))
      {
        final Object obj = iter.getAttributes().get(textattribute);
        if (obj instanceof Integer)
        {
          final int i = ((Integer) obj).intValue();
          setFont(getFont().deriveFont(getFont().getStyle(), i));
        }
        else if (obj instanceof Float)
        {
          final float f = ((Float) obj).floatValue();
          setFont(getFont().deriveFont(getFont().getStyle(), f));
        }
      }
      else if (textattribute.equals(TextAttribute.FOREGROUND))
      {
        setColor((Color) iter.getAttributes().get(textattribute));
      }
      else if (textattribute.equals(TextAttribute.FAMILY))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.FAMILY, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
      }
      else if (textattribute.equals(TextAttribute.POSTURE))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.POSTURE, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
      }
      else if (textattribute.equals(TextAttribute.WEIGHT))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.WEIGHT, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
View Full Code Here

Examples of java.awt.font.TextAttribute

    }

    @SuppressWarnings("unchecked")
    public void mapInputMethodHighlight(InputMethodHighlight highlight, Map<TextAttribute, ?> map) {
        Map<TextAttribute, Object> _map = (Map<TextAttribute, Object>)map;
        TextAttribute key = TextAttribute.INPUT_METHOD_UNDERLINE;
        boolean selected = highlight.isSelected();
        switch(highlight.getState()) {
        case InputMethodHighlight.RAW_TEXT:
            _map.put(key, selected ? TextAttribute.UNDERLINE_LOW_GRAY :
                TextAttribute.UNDERLINE_LOW_DOTTED);
View Full Code Here

Examples of java.awt.font.TextAttribute

                do {
                    if (!attributes.isEmpty()) {
                        reader.moveDown();
                    }
                    final Class<?> type = mapper.realClass(reader.getAttribute(classAlias));
                    final TextAttribute attribute = (TextAttribute)textAttributeConverter.fromString(reader.getNodeName());
                    final Object value = type == Mapper.Null.class ? null : context.convertAnother(null, type);
                    attributes.put(attribute, value);
                    reader.moveUp();
                } while (reader.hasMoreChildren());
            } else {
View Full Code Here

Examples of java.awt.font.TextAttribute

    checkSerial(TextAttribute.WIDTH, harness);
  }
 
  private void checkSerial(TextAttribute ta1, TestHarness harness)
  {
    TextAttribute ta2 = null;

    try {
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(ta1);
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.