Package nextapp.echo2.app

Examples of nextapp.echo2.app.ImageReference


     */
    @Override
    protected void createControls() throws Exception {
        super.createControls();
        this.tbMain = new JbsToolbar();
        this.pnMain = new ContentPane();
       
        this.btnNew = new JbsObjectToolPaneButton("add.png",JbsL10N.getString("StdList.newCaption"),false);
        this.btnNew.setToolTipText(JbsL10N.getString("StdList.newTooltip"));
        this.btnNew.addActionListener(new ActionListener() {
       
View Full Code Here


        }
    }

    @Override
    protected void initPanel() {
        ContentPane cpStdData = new ContentPane();

        JbsGrid grdMain = new JbsGrid(2);
        grdMain.setInsets(new Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        grdMain.add(new Label(JbsL10N.getString("JbsUser.userName")));
        grdMain.add(txUserName);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.password")));
        grdMain.add(txPassword);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.addInfo")));
        grdMain.add(txAddInfo);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.mainGroup")));
        grdMain.add(cbbMainGroup);

        grdMain.add(new Label(JbsL10N.getString("JbsUser.groupList")));
        grdMain.add(groupEditor);
        if (ClientGlobals.getUser().isRoot()) { //No other person is allowed to set companies for a user
            grdMain.add(new Label(JbsL10N.getString("JbsUser.companyList")));
            grdMain.add(companyEditor);
        }

        grdMain.add(new Label(JbsL10N.getString("JbsUser.contact")));
        grdMain.add(this.contactSelectField);
       
        grdMain.add(new Label(JbsL10N.getString("JbsUser.canChangePassword")));
        grdMain.add(this.cbCanChangePassword);

        grdMain.add(new Label(JbsL10N.getString("JbsUser.startModule")));
        grdMain.add(this.selStartModule);
       
        cpStdData.add(grdMain);
        this.add(cpStdData);
    }
View Full Code Here

    protected JbsLangEntryHelper createTextField(JbsLanguage language) {
        return new JbsLangEntryTextField(language);
    }

    protected void initPanel() {
        Grid grdMain = new Grid(2);
        grdMain.setInsets(new nextapp.echo2.app.Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextField txtField = (JbsLangEntryTextField) it.next();
            grdMain.add(new Label(txtField.getLanguage().getName()));
            grdMain.add(txtField);
        }

        this.getPnMain().add(grdMain);
    }
View Full Code Here

        this.setStyleName("Default");
        this.setMaximizable(false);
        this.setMinimizable(false);
        this.setResizable(false);
        this.setModal(true);
        ImageReference icon = getMessageIcon(messageType);
        Label iconLabel = new Label("");
        int iconHeight = 0;
        if (icon != null) {
            iconLabel.setIcon(icon);
            iconHeight = icon.getHeight().getValue();
        }


        // Split newlines into multiple labels
        if (message instanceof String) {
View Full Code Here

        if (!(imagePropertyValue instanceof ImageReference)) {
            throw new InvalidPropertyException("Invalid FillImage property (type \"" + imageType
                    + "\" is not an ImageReference.", null);
        }

        ImageReference imageReference = (ImageReference) imagePropertyValue;
        FillImage fillImage = new FillImage(imageReference, offsetX, offsetY, repeat);
       
        return fillImage;
    }
View Full Code Here

    public void testCustom() {
        Style bravoStyle = styleSheet.getStyle(TextComponent.class, "bravo");
        FillImage backgroundImage = (FillImage) bravoStyle.getProperty(TextComponent.PROPERTY_BACKGROUND_IMAGE);
        assertNotNull(backgroundImage);
        ImageReference imageReference = backgroundImage.getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
        assertEquals(FillImage.REPEAT_HORIZONTAL, backgroundImage.getRepeat());
View Full Code Here

   
    public void testSimple() {
        Style alphaStyle = styleSheet.getStyle(TextComponent.class, "alpha");
        FillImage backgroundImage = (FillImage) alphaStyle.getProperty(TextComponent.PROPERTY_BACKGROUND_IMAGE);
        assertNotNull(backgroundImage);
        ImageReference imageReference = backgroundImage.getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
    }
View Full Code Here

        assertEquals(2, layoutData.getColumnSpan());
        assertEquals(1, layoutData.getRowSpan());
        assertEquals(new Color(0xabcdef), layoutData.getBackground());
        assertEquals(new Insets(20, 30), layoutData.getInsets());
        assertNotNull(layoutData.getBackgroundImage());
        ImageReference imageReference = layoutData.getBackgroundImage().getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
    }
View Full Code Here

        Style alphaStyle = styleSheet.getStyle(Column.class, "alpha");
        SplitPaneLayoutData layoutData = (SplitPaneLayoutData) alphaStyle.getProperty(Component.PROPERTY_LAYOUT_DATA);
        assertEquals(new Color(0xabcdef), layoutData.getBackground());
        assertEquals(new Insets(20, 30), layoutData.getInsets());
        assertNotNull(layoutData.getBackgroundImage());
        ImageReference imageReference = layoutData.getBackgroundImage().getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
    }
View Full Code Here

        assertEquals(new Insets(12), fillImageBorder.getContentInsets());
        assertEquals(new Insets(6, 4), fillImageBorder.getBorderInsets());
       
        FillImage topLeftFillImage = fillImageBorder.getFillImage(FillImageBorder.TOP_LEFT);
        assertNotNull(topLeftFillImage);
        ImageReference imageReference = topLeftFillImage.getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
        assertEquals(FillImage.REPEAT_HORIZONTAL, topLeftFillImage.getRepeat());
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.ImageReference

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.