Examples of AttributeSet


Examples of javax.swing.text.AttributeSet

        assertFalse(jep1.getScrollableTracksViewportHeight());
        assertFalse(jep1.getScrollableTracksViewportWidth());
    }

    private AttributeSet getAttributeSetByIndex(final AbstractDocument d, final int offset) {
        AttributeSet as = null;
        Element elem = d.getDefaultRootElement();
        while (elem.getElementCount() > 0) {
            elem = elem.getElement(elem.getElementIndex(offset));
            as = elem.getAttributes();
        }
View Full Code Here

Examples of javax.swing.text.AttributeSet

        jep.setDocument(doc);
        jep.setSelectionStart(6);
        jep.setSelectionEnd(7);
        jep.replaceSelection("YYY");
        for (int i = 0; i < doc.getLength(); i++) {
            AttributeSet as = getAttributeSetByIndex(doc, i);
            if (i > 3 && i < 12) {
                assertEquals(as2, as);
            } else {
                assertEquals(as1, as);
            }
View Full Code Here

Examples of javax.swing.text.AttributeSet

        StyleConstants.setStrikeThrough(attrs, true);
        StyleConstants.setAlignment(attrs, StyleConstants.ALIGN_CENTER);
        textPane.getStyledDocument().setParagraphAttributes(paragraph.getStartOffset(),
                paragraph.getEndOffset() - paragraph.getStartOffset(), attrs, true);
        // tests
        AttributeSet textAttrs;
        textPane.setCaretPosition(1);
        textAttrs = textPane.getParagraphAttributes();
        assertFalse(StyleConstants.isUnderline(textAttrs));
        assertTrue(StyleConstants.isStrikeThrough(textAttrs));
        assertEquals(StyleConstants.ALIGN_CENTER, StyleConstants.getAlignment(textAttrs));
View Full Code Here

Examples of javax.swing.text.AttributeSet

        assertEquals(StyleConstants.ALIGN_CENTER, StyleConstants.getAlignment(textAttrs));
    }

    public void testSetParagraphAttributes() {
        StyledDocument doc = textPane.getStyledDocument();
        AttributeSet textAttrs;
        // The attributes are applied to the paragraph at the current caret
        // position.
        textPane.setCaretPosition(1);
        StyleConstants.setSubscript(attrs, false);
        doc.setParagraphAttributes(0, doc.getLength(), attrs, false);
View Full Code Here

Examples of org.auraframework.instance.AttributeSet

        return config;
    }
   
    static void removeAttribute(BaseComponent<?,?> component, String name) throws QuickFixException {
        if (component != null) {
            AttributeSet componentAttributes = component.getAttributes();
            if (componentAttributes.getValue(name) != null) {
                Iterator<Attribute> iterator = componentAttributes.iterator();
                while (iterator.hasNext()) {
                    Attribute attribute = iterator.next();
                    if (attribute.getName().equalsIgnoreCase(name)) {
                        iterator.remove();
                        break;
View Full Code Here

Examples of org.blueoxygen.postila.materialmanagement.productattributes.entity.AttributeSet

    }
    if(hasErrors()){
      return INPUT;
    }
   
    AttributeSet attributeSet;
    if(getAttributeSet().getId() == null || "".equalsIgnoreCase(getAttributeSet().getId())){
      attributeSet = new AttributeSet();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      attributeSet = (AttributeSet) manager.getById(AttributeSet.class, getAttributeSet().getId());
      logInfo = attributeSet.getLogInformation();
    }

    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    attributeSet.setLogInformation(logInfo);
    attributeSet.setName(getAttributeSet().getName());
    attributeSet.setDescription(getAttributeSet().getDescription());
    attributeSet.setLot(getAttributeSet().getLot());
    attributeSet.setInstanceAttribute(getAttributeSet().getInstanceAttribute());
    attributeSet.setMandatoryLot(getAttributeSet().getMandatoryLot());
    attributeSet.setLotControl(getLotControl());
    attributeSet.setLotCharStartOverwrite(getAttributeSet().getLotCharStartOverwrite());
    attributeSet.setLotCharEndOverwrite(getAttributeSet().getLotCharEndOverwrite());
    attributeSet.setSerialNo(getAttributeSet().getSerialNo());
    attributeSet.setMandatorySerialNo(getAttributeSet().getMandatorySerialNo());
    attributeSet.setSerialNoControl(getSerialNoControl());
    attributeSet.setSerialNoCharStartOverwrite(getAttributeSet().getSerialNoCharStartOverwrite());
    attributeSet.setSerialNoCharEndOverwrite(getAttributeSet().getSerialNoCharEndOverwrite());
    attributeSet.setGuaranteeDate(getAttributeSet().getGuaranteeDate());
    attributeSet.setMandatoryGuaranteeDate(getAttributeSet().getMandatoryGuaranteeDate());
    attributeSet.setMandatoryType(getAttributeSet().getMandatoryType());
   
    manager.save(attributeSet);
    setAttributeSet(attributeSet);
    return SUCCESS;
  }
View Full Code Here

Examples of org.exist.xslt.expression.AttributeSet

          templates.add(template);
        } else {
          namedTemplates.put(template.getName(), template);//UNDERSTAND: check doubles?
        }
      } else if (expr instanceof AttributeSet) {
        AttributeSet attributeSet = (AttributeSet) expr;
        if (attributeSets.containsKey(attributeSet.getName()))
          attributeSets.get(attributeSet.getName()).add(attributeSet);
        else {
          List<AttributeSet> list = new ArrayList<AttributeSet>();
          list.add(attributeSet);
          attributeSets.put(attributeSet.getName(), list);
        }
          
      } else if (expr instanceof org.exist.xslt.expression.Variable) {
        org.exist.xslt.expression.Variable variable = (org.exist.xslt.expression.Variable) expr;
        variables.add(variable);
View Full Code Here

Examples of org.exolab.castor.xml.AttributeSet

        //-- create new Namespace scope
        Namespaces nsDecls = _namespaces.createNamespaces();
        _namespaces = nsDecls;

        //-- handle namespaces
        AttributeSet attSet = processAttributeList(atts);

        String namespace = null;
        int idx = name.indexOf(':');
        if (idx >= 0 ) {
            String prefix = name.substring(0,idx);
View Full Code Here

Examples of org.openquark.util.attributes.AttributeSet

     * @see org.openquark.util.xml.XMLElementSerializer#loadFromElement(org.openquark.util.xml.XMLSerializationManager, org.w3c.dom.Element)
     */
    public Object loadFromElement(XMLSerializationManager manager, Element element) {
        List<Attribute> attributes = new ArrayList<Attribute>();
        manager.loadFromChildElements(element, attributes);
        return new AttributeSet(attributes);
    }
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.