Package nextapp.echo2.app.componentxml

Examples of nextapp.echo2.app.componentxml.ComponentIntrospector


        this.setMaximizable(false);
        this.setKeystrokeListener(this.createKeyStrokeListener());
        this.setPostOnEnterKey(true);
        this.setCancelOnEscKey(true);

        SplitPane spMain = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new JbsExtent(45));

        this.add(spMain);
        spMain.add(initPnButtons());

        pnMain = new JbsContentPane();
        spMain.add(pnMain);
    }
View Full Code Here


     */
    @Override
    protected void initForm() {
        super.initForm();

        ButtonGroup radioGroup = new ButtonGroup();
        Column colMain = new Column();
        Row row1 = new Row();
        row1.setAlignment(Alignment.ALIGN_TOP);
        rbNoDate = new JbsRadioButton();
        rbNoDate.setText(JbsL10N.getString("FmSelectDate.noDate"));
View Full Code Here

*/
public class ComponentIntrospectorTest extends TestCase {
   
    public void testIntrospection()
    throws Exception {
        ComponentIntrospector ci = ComponentIntrospector.forName("nextapp.echo2.app.Label",
                ComponentIntrospectorTest.class.getClassLoader());
        assertEquals(String.class, ci.getPropertyClass("text"));
        assertEquals(Color.class, ci.getPropertyClass("background"));
    }
View Full Code Here

        assertEquals(Color.class, ci.getPropertyClass("background"));
    }
   
    public void testConstants()
    throws Exception {
        ComponentIntrospector ci = ComponentIntrospector.forName("nextapp.echo2.app.Grid",
                ComponentIntrospectorTest.class.getClassLoader());
        assertEquals(new Integer(0), ci.getConstantValue("ORIENTATION_HORIZONTAL"));
        assertEquals(new Integer(1), ci.getConstantValue("ORIENTATION_VERTICAL"));
    }
View Full Code Here

     *         constant is not found.
     */
    public Integer introspectConstantValue(ClassLoader classLoader, Class objectClass, String value)
    throws InvalidPropertyException {
        try {
            ComponentIntrospector ci = ComponentIntrospector.forName(objectClass.getName(), classLoader);
            if (value.startsWith(objectClass.getName())) {
                // Remove class name if required.
                value = value.substring(objectClass.getName().length() + 1);
            }
            Object constantValue = ci.getConstantValue(value);
            if (constantValue instanceof Integer) {
                return (Integer) constantValue;
            } else {
                return null;
            }
View Full Code Here

            // Instantiate LayoutData instance.
            Class propertyClass = Class.forName(type, true, classLoader);
            LayoutData layoutData = (LayoutData) propertyClass.newInstance();
           
            // Create introspector to analyze LayoutData class.
            ComponentIntrospector ci = ComponentIntrospector.forName(type, classLoader);
           
            // Set property values of LayoutData instance.
            Iterator it = propertyStyle.getPropertyNames();
            while (it.hasNext()) {
                String propertyName = (String) it.next();
                Method writeMethod = ci.getWriteMethod(propertyName);
                writeMethod.invoke(layoutData, new Object[]{propertyStyle.getProperty(propertyName)});
            }
           
            return layoutData;
        } catch (ClassNotFoundException ex) {
View Full Code Here

    protected void addAction(String actionCommand) {
        EventListener[] listeners = listenerList.getListeners(ActionListener.class);
        for (int i = 0; i < listeners.length; i++) {
            ActionListener actionListener = (ActionListener) listeners[i];
            try {
                actionListener.actionPerformed(new ActionEvent(JbsDialogWindow.this, actionCommand));
            } catch (Throwable t) {
                logger.error("Error adding action.",t);
            }
        }
    }
View Full Code Here

    protected void addAction(String actionCommand) {
        EventListener[] listeners = listenerList.getListeners(ActionListener.class);
        for (int i = 0; i < listeners.length; i++) {
            ActionListener actionListener = (ActionListener) listeners[i];
            try {
                actionListener.actionPerformed(new ActionEvent(PnEditJbsObject.this, actionCommand));
            } catch (Throwable t) {
                logger.error("Error adding action.",t);
            }
        }
    }
View Full Code Here

        EventListener[] listeners = listenerList.getListeners(ActionListener.class);
        for (int i = 0; i < listeners.length; i++) {
            ActionListener actionListener = (ActionListener) listeners[i];
            try {
                actionListener.actionPerformed(
                        new ActionEvent(JbsOptionPane.this, getActionCommand((Component) e.getSource())));
            } catch (Throwable t) {
                ExceptionHandler.handle(t);
            }
        }
View Full Code Here

    protected final String IMG_DROPDOWN = Styles.IMAGE_PATH + "blank.gif";
   
    public JbsMenuLabel(String text) {
        super();
        this.setBtnMain(new JbsButton(""));
        this.getBtnMain().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent arg0) {
                logger.debug("popup");
                setExpanded(!isExpanded());
                collapseAllOther();
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.componentxml.ComponentIntrospector

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.