Package com.l2fprod.common.propertysheet

Examples of com.l2fprod.common.propertysheet.DefaultProperty


        return makeProperty(category, name, value);
    }

    public static Property makeProperty(String category, String name, String value)
    {
        DefaultProperty prop;
        prop = new DefaultProperty();
        prop.setCategory(category);

        prop.setName(name);
        prop.setDisplayName(name);
        prop.setValue(value);
        prop.setShortDescription(value);
        return prop;
    }
View Full Code Here


                for (int j = 0; j < facets.getLength(); ++j) {
                    XSFacet facet = (XSFacet) facets.item(j);
                    if (null == facets) {
                        continue;
                    }
                    DefaultProperty p = new DefaultProperty();
                    p.setName(String.valueOf(facet.getFacetKind()));
                    p.setDisplayName(SchemaElementsPropertyFactory.getNameForFacet(facet.getFacetKind()));
                    p.setValue(facet.getLexicalFacetValue());
                    p.setEditable(false);
                    properties.add(p);

                }
            }
            else {
View Full Code Here

    }

    private static DefaultProperty createProperty(String propertyName, Object value) {
        final String methodSuffix = propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);

        DefaultProperty p = new DefaultProperty();
        p.setName(propertyName);
        p.setDisplayName(SchemaElementsPropertyFactory.DISPLAY_NAME_MAPPING.get(propertyName));
        p.setEditable(false);
        try {
            for (String prefix : SchemaElementsPropertyFactory.GETTER_PREFIX) {
                String methodName = prefix + methodSuffix;
                try {
                    Method m = value.getClass().getMethod(methodName, null);
                    p.setType(m.getReturnType());
                    break;
                }
                catch (NoSuchMethodException e) {
                    SchemaElementsPropertyFactory.logger.debug("Cannot get return type for getter of property [" + propertyName + "] using method [" + methodName + "]");
                }
View Full Code Here

    add( message );

    final Colorful data = new Colorful();
    data.setColor( new Color( 255, 153, 102 ) );

        DefaultProperty level0 = new NoReadWriteProperty();
        level0.setDisplayName("Level 0");
        level0.setCategory("A category");
        DefaultProperty level1 = new NoReadWriteProperty();
        level1.setDisplayName("Level 1");
        level1.setCategory("Another category");
        level0.addSubProperty(level1);
        DefaultProperty level2 = new NoReadWriteProperty();
        level2.setDisplayName("Level 2");
        level1.addSubProperty(level2);
        DefaultProperty level21 = new NoReadWriteProperty();
        level21.setDisplayName("Level 3");
        level1.addSubProperty(level21);

        DefaultProperty level211 = new NoReadWriteProperty();
        level211.setDisplayName("Level 3.1");
        level21.addSubProperty(level211);

        DefaultProperty root = new NoReadWriteProperty();
        root.setDisplayName("Root");
       
        final PropertySheetPanel sheet = new PropertySheetPanel();
    sheet.setMode( PropertySheet.VIEW_AS_FLAT_LIST );
    sheet.setProperties( new Property[] { new ColorProperty(), level0, root } );
    sheet.readFromObject( data );
View Full Code Here

TOP

Related Classes of com.l2fprod.common.propertysheet.DefaultProperty

Copyright © 2018 www.massapicom. 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.