Package nextapp.echo2.app.componentxml

Examples of nextapp.echo2.app.componentxml.PropertyLoader


    protected void initPane() {
        Column colMain = new Column();
        colMain.add(this.getLbUserGroups());

        Row rowButtons = new Row();
        rowButtons.setAlignment(new Alignment(Alignment.RIGHT, Alignment.TOP));
        rowButtons.add(this.getBtnAdd());
        rowButtons.add(this.getBtnDelete());
        colMain.add(rowButtons);

        KeyStrokeListener ks = new KeyStrokeListener();
        ks.addKeyCombination(KeyStrokeListener.VK_INSERT, "INSERT");
        ks.addKeyCombination(KeyStrokeListener.VK_DELETE, "DELETE");
        ks.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                if (arg0.getActionCommand().equals("INSERT")) {
                    addGroup();
                } else if (arg0.getActionCommand().equals("DELETE")) {
                    deleteGroup();
                }
            }
        });
        rowButtons.add(ks);


        this.add(colMain);
    }
View Full Code Here


        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

        Element imageElement = DomUtil.getChildElementByTagName(fillImageElement, "image");
        if (imageElement == null) {
            throw new InvalidPropertyException("Invalid FillImage property.", null);
        }
        String imageType = imageElement.getAttribute("type");
        PropertyLoader propertyLoader = PropertyLoader.forClassLoader(classLoader);
       
        Class propertyClass;
        try {
            propertyClass = Class.forName(imageType, true, classLoader);
        } catch (ClassNotFoundException ex) {
            throw new InvalidPropertyException("Invalid FillImage property (type \"" + imageType + "\" not found.", ex);
        }
       
        Object imagePropertyValue = propertyLoader.getPropertyValue(FillImage.class, propertyClass, imageElement);
        if (!(imagePropertyValue instanceof ImageReference)) {
            throw new InvalidPropertyException("Invalid FillImage property (type \"" + imageType
                    + "\" is not an ImageReference.", null);
        }
View Full Code Here

        if (fillImageBorderElement == null) {
            throw new InvalidPropertyException("Invalid FillImageBorder property.", null);
        }

        FillImageBorder fillImageBorder = new FillImageBorder();
        PropertyLoader propertyLoader = PropertyLoader.forClassLoader(classLoader);
       
        if (fillImageBorderElement.hasAttribute("color")) {
            Color color = ColorPeer.toColor(fillImageBorderElement.getAttribute("color"));
            fillImageBorder.setColor(color);
        }
        if (fillImageBorderElement.hasAttribute("border-insets")) {
            Insets insets = InsetsPeer.toInsets(fillImageBorderElement.getAttribute("border-insets"));
            fillImageBorder.setBorderInsets(insets);
        }
        if (fillImageBorderElement.hasAttribute("content-insets")) {
            Insets insets = InsetsPeer.toInsets(fillImageBorderElement.getAttribute("content-insets"));
            fillImageBorder.setContentInsets(insets);
        }
       
        NodeList borderPartList = fillImageBorderElement.getElementsByTagName("border-part");
        int borderPartCount = borderPartList.getLength();
        for (int i = 0; i < borderPartCount; ++i) {
            Element borderPartElement = (Element) borderPartList.item(i);
            String position = borderPartElement.getAttribute("position");

            FillImage fillImage = (FillImage) propertyLoader.getPropertyValue(FillImageBorder.class, FillImage.class,
                    borderPartElement);
           
            if ("top-left".equals(position)) {
                fillImageBorder.setFillImage(FillImageBorder.TOP_LEFT, fillImage);
            } else if ("top".equals(position)) {
View Full Code Here

        try {
            Element layoutDataElement = DomUtil.getChildElementByTagName(propertyElement, "layout-data");
            String type = layoutDataElement.getAttribute("type");

            // Load properties from XML into Style.
            PropertyLoader propertyLoader = PropertyLoader.forClassLoader(classLoader);
            Element propertiesElement = DomUtil.getChildElementByTagName(layoutDataElement, "properties");
            Style propertyStyle = propertyLoader.createStyle(propertiesElement, type);
           
            // Instantiate LayoutData instance.
            Class propertyClass = Class.forName(type, true, classLoader);
            LayoutData layoutData = (LayoutData) propertyClass.newInstance();
           
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.PropertyLoader

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.