Package nextapp.echo2.app

Examples of nextapp.echo2.app.Color


        this.setStyleName("Default");
        this.setText(title);
        this.setWidth(new JbsExtent(100, JbsExtent.PERCENT));
        //this.setHeight(new (48, .PX));
        this.setStdColor(this.getBackground());
        this.setAlignment(new Alignment(Alignment.LEFT, Alignment.CENTER));
    }
View Full Code Here


    }

    protected JbsContentPane initPnButtons() {
        pnButtons = new JbsContentPane();
        Row mainRow = new Row();
        mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
        mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));

        btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
        btnOK.setAlignmentHorizontal(Alignment.CENTER);
        btnOK.setWidth(new JbsExtent(80));
View Full Code Here

                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

        ks.addActionListener(this);
        topRow.add(ks);

        ButtonPanel buttonPanel = new ButtonPanel();
        ColumnLayoutData buttonPanelLayout = new ColumnLayoutData();
        buttonPanelLayout.setAlignment(new Alignment(Alignment.CENTER, Alignment.TOP));
        buttonPanel.setLayoutData(buttonPanelLayout);
        for (int i = 0; i < buttons.size(); i++) {
            buttonPanel.add((AbstractButton) buttons.get(i));
        }
View Full Code Here

    public JbsImageIcon() {
        super(null);
    }
   
    public void setImage(byte[] image) throws IOException {
        AwtImageReference imgRef = null;
        if (image!=null) {
            logger.debug("Showing logo - length: " + image.length);
            Image img = ImageIO.read(new ByteArrayInputStream(image));
            imgRef = new AwtImageReference(img);
        }
        this.setIcon(imgRef);
    }
View Full Code Here

    public Component newInstance() {
        try {
            Component component = (Component) componentClass.newInstance();
            switch ((int) (Math.random() * 3)) {
            case 1:
                component.setForeground(new Color((int) (16777216 * Math.random()) & 0x7f7f7f));
                component.setBackground(new Color((int) (16777216 * Math.random()) | 0xb0b0b0));
                break;
            case 2:
                component.setBackground(new Color((int) (16777216 * Math.random())));
                break;
            case 3:
                component.setForeground(new Color((int) (16777216 * Math.random())));
                break;
            }
            return component;
        } catch (InstantiationException ex) {
            throw new RuntimeException(ex);
View Full Code Here

    public Component newInstance() {
        Button button = new Button();
        switch ((int) (Math.random() * 3)) {
        case 0:
            button.setText("Button #" + ++count);
            button.setBackground(new Color((int) (16777216 * Math.random())));
            break;
        case 1:
            button.setText("This is an example button.");
            button.setForeground(new Color((int) (16777216 * Math.random()) & 0x7f7f7f));
            button.setBackground(new Color((int) (16777216 * Math.random()) | 0xb0b0b0));
            button.setBorder(new Border(1, new Color((int) (16777216 * Math.random()) | 0xb3b3b3), Border.STYLE_OUTSET));
            button.setInsets(INSETS_10_5);
            break;
        case 2:
            button.setText("Initially Plain Button");
            break;
View Full Code Here

    public Component newInstance() {
        Label label = new Label();
        switch ((int) (Math.random() * 3)) {
        case 0:
            label.setText("Label #" + ++count);
            label.setBackground(new Color((int) (16777216 * Math.random())));
            break;
        case 1:
            label.setText("The quirk red fox jumps over the lazy brown dog.");
            label.setForeground(new Color((int) (16777216 * Math.random())));
            break;
        case 2:
            label.setText("Initially Plain Label");
            break;
        }
View Full Code Here

    }
   
    public void testBasic() {
        Style defaultContentPaneStyle = styleSheet.getStyle(ContentPane.class, "default");
        assertNotNull(defaultContentPaneStyle);
        assertEquals(new Color(0x00ffff), defaultContentPaneStyle.getProperty(Component.PROPERTY_BACKGROUND));
        assertEquals(new Color(0xff0000), defaultContentPaneStyle.getProperty(Component.PROPERTY_FOREGROUND));
    }
View Full Code Here

    }
   
    public void testDerived() {
        Style selectedButtonStyle = styleSheet.getStyle(Button.class, "selected");
        assertNotNull(selectedButtonStyle);
        assertEquals(new Color(0xff0000), selectedButtonStyle.getProperty(Component.PROPERTY_BACKGROUND));
        assertEquals(new Color(0x00cc00), selectedButtonStyle.getProperty(Component.PROPERTY_FOREGROUND));
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Color

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.