Package nextapp.echo2.app

Examples of nextapp.echo2.app.Label


        table.setDefaultRenderer(Object.class, new TableCellRenderer() {
            public Component getTableCellRendererComponent(Table table, Object value, int column, int row) {
                switch (column) {
                case 0:
                case 1:
                    return new Label(value.toString());
                case 2:
                    CheckBox checkBox = new CheckBox();
                    checkBox.setSelected(((Boolean) value).booleanValue());
                    return checkBox;
                default:
View Full Code Here


    public ImageReferenceTest() {
        addHeaderRow("ImageReference Types");
        HttpImageReference httpImageReference = new HttpImageReference("images/two.jpg");
        ResourceImageReference resourceImageReference
                = new ResourceImageReference(RESOURCE_IMAGE_LOCATION);
        addTestRow("AwtImageReference", new Label(AWT_IMAGE_REFERENCE));
        addTestRow("HttpImageReference", new Label(httpImageReference));
        addTestRow("ResourceImageReference", new Label(resourceImageReference));
        addTestRow("StreamImageReference", new Label(streamImageReference));
    }
View Full Code Here

        ContainerContext containerContext
                = (ContainerContext) app.getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
       
        Column clientPropertiesColumn = new Column();
        add(clientPropertiesColumn);
        clientPropertiesColumn.add(new Label("Client Properties"));
        clientPropertiesColumn.add(createClientPropertiesTable(containerContext));
       
        Column initialParametersColumn = new Column();
        add(initialParametersColumn);
        initialParametersColumn.add(new Label("Initial Parameters"));
        initialParametersColumn.add(createInitialParametersTable(containerContext));
       
        Column applicationPropertiesColumn = new Column();
        add(applicationPropertiesColumn);
        applicationPropertiesColumn.add(new Label("ApplicationInstance Properties"));
        applicationPropertiesColumn.add(createApplicationPropertiesTable(app));
       
        Column cookiesColumn = new Column();
        add(cookiesColumn);
        cookiesColumn.add(new Label("Cookies"));
        cookiesColumn.add(createCookieTable(containerContext));
        Button setCookieButton = new Button("Set Cookie");
        setCookieButton.setStyleName("Default");
        setCookieButton.addActionListener(new ActionListener() {
       
View Full Code Here

       
        Grid headerGrid = new Grid();
        headerGrid.setInsets(new Insets(0, 2));
        layoutColumn.add(headerGrid);
       
        Label label;
       
        label = new Label(Messages.getString("Message.PromptLabel.To"));
        headerGrid.add(label);
       
        toField = new TextField();
        toField.setStyleName("Default");
        toField.setWidth(new Extent(450));
        headerGrid.add(toField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Cc"));
        headerGrid.add(label);
       
        ccField = new TextField();
        ccField.setStyleName("Default");
        ccField.setWidth(new Extent(450));
        headerGrid.add(ccField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Bcc"));
        headerGrid.add(label);
       
        bccField = new TextField();
        bccField.setStyleName("Default");
        bccField.setWidth(new Extent(450));
        headerGrid.add(bccField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Subject"));
        headerGrid.add(label);
       
        subjectField = new TextField();
        subjectField.setStyleName("Default");
        subjectField.setWidth(new Extent(450));
View Full Code Here

       
        Grid headerGrid = new Grid();
        headerGrid.setStyleName("Message.HeaderGrid");
        add(headerGrid);

        toFieldPromptLabel = new Label(Messages.getString("Message.PromptLabel.To"));
        toFieldPromptLabel.setStyleName("Message.HeaderGridPrompt");
        headerGrid.add(toFieldPromptLabel);
       
        toFieldValueLabel = new Label();
        headerGrid.add(toFieldValueLabel);
       
        ccFieldPromptLabel = new Label(Messages.getString("Message.PromptLabel.Cc"));
        ccFieldPromptLabel.setStyleName("Message.HeaderGridPrompt");
        headerGrid.add(ccFieldPromptLabel);
       
        ccFieldValueLabel = new Label();
        headerGrid.add(ccFieldValueLabel);
       
        bccFieldPromptLabel = new Label(Messages.getString("Message.PromptLabel.Bcc"));
        bccFieldPromptLabel.setStyleName("Message.HeaderGridPrompt");
        headerGrid.add(bccFieldPromptLabel);
       
        bccFieldValueLabel = new Label();
        headerGrid.add(bccFieldValueLabel);
       
        Label subjectFieldPromptLabel = new Label(Messages.getString("Message.PromptLabel.Subject"));
        subjectFieldPromptLabel.setStyleName("Message.HeaderGridPrompt");
        headerGrid.add(subjectFieldPromptLabel);
       
        subjectFieldValueLabel = new Label();
        headerGrid.add(subjectFieldValueLabel);
       
        messageColumn = new Column();
        messageColumn.setFont(new Font(Font.MONOSPACE, Font.PLAIN, null));
        add(messageColumn);
View Full Code Here

                    if (partContent instanceof String) {
                        // Part content is a string, add it to returned array of Components as a Label.
                        data[index] = renderMessageText((String) partContent);
                    } else {
                        // Part content is not a string, add it to returned array as a Label containing its content type.
                        data[index] = new Label(part.getContentType());
                    }
                }
                return data;
            } else {
                // Unhandled type, should not generally occur.
                return new Component[]{new Label(Messages.getString("Messages.UnableToParseError"))};
            }
        } catch (IOException ex) {
            // Generally should not occur.
            return new Component[]{new Label(Messages.getString("Messages.UnableToParseError"))};
        }
    }
View Full Code Here

        CharacterIterator ci = new StringCharacterIterator(text);
        char ch = ci.first();
        while (ch != CharacterIterator.DONE) {
            if (ch == '\n') {
                String labelText = out.toString();
                Label label = new Label(labelText);
                if (labelText.trim().length() == 0) {
                    label.setLayoutData(SPACER_COLUMN_LAYOUT_DATA);
                }
                componentList.add(label);
                out = new StringBuffer();
            } else if (ch >= 0x20) {
                out.append(ch);
            }
            ch  = ci.next();
        }
        Label label = new Label(out.toString());
        componentList.add(label);
       
        if (componentList.size() == 1) {
            return label;
        } else {
View Full Code Here

            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            break;
        }
       
        Label contentLabel = new Label(message);
        contentLabel.setStyleName("MessageDialog.ContentLabel");
        splitPane.add(contentLabel);
       
        setModal(true);
    }
View Full Code Here

    /**
     * Test receiving input from client.
     */
    public void testInput() {
        SplitPane splitPane = new SplitPane();
        splitPane.add(new Label("one label"));
        splitPane.add(new Label("one more label"));
        splitPane.setSeparatorPosition(new Extent(80));
        splitPane.processInput(SplitPane.PROPERTY_SEPARATOR_POSITION, new Extent(212));
        assertEquals(new Extent(212), splitPane.getSeparatorPosition());
    }
View Full Code Here

    /**
     * Attempt to illegally add more than two children, tests for failure.
     */
    public void testOverload() {
        SplitPane splitPane = new SplitPane();
        splitPane.add(new Label("one label"));
        splitPane.add(new Label("one more label"));
        boolean exceptionThrown = false;
        try {
            splitPane.add(new Label("one label too many"));
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Label

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.