Examples of PTextBox


Examples of com.ponysdk.ui.server.basic.PTextBox

                PNotificationManager.showHumanizedNotification("Selected level : " + level);
            }
        });

        final PFlowPanel inputPanel = new PFlowPanel();
        final PTextBox input = new PTextBox();
        final PButton add = new PButton("Add Level");
        add.setStyleName(PonySDKTheme.BUTTON_BLUE);
        add.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (input.getText().isEmpty()) breadCrumbs.addItem("level " + ++level);
                else breadCrumbs.addItem(input.getText());
                input.setText("");
            }
        });
        inputPanel.add(input);
        inputPanel.add(add);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

    }

    private PWidget getDisclosurePanelContent() {
        final PVerticalPanel verticalPanel = new PVerticalPanel();
        verticalPanel.add(new PLabel("First Name: "));
        verticalPanel.add(new PTextBox());
        verticalPanel.add(new PLabel("Last Name: "));
        verticalPanel.add(new PTextBox());
        return verticalPanel;
    }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

    protected void onFirstShowPage() {
        super.onFirstShowPage();

        final PVerticalPanel panel = new PVerticalPanel();

        final PTextBox textBox = new PTextBox();
        final PTextBox textBoxReadOnly = new PTextBox();
        textBoxReadOnly.setText("read only");
        textBoxReadOnly.setEnabled(false);
        final PTextBox passwordTextBox = new PPasswordTextBox();
        final PTextBox passwordTextBoxReadOnly = new PPasswordTextBox();
        passwordTextBoxReadOnly.setText("xxxxxxxxxxxx");
        passwordTextBoxReadOnly.setEnabled(false);
        final PTextArea textArea = new PTextArea();

        panel.add(new PLabel("Normal text box:"));
        panel.add(textBox);
        panel.add(textBoxReadOnly);

        final PTextBox placeHolder = new PTextBox();
        panel.add(new PLabel("Place holder : "));
        panel.add(placeHolder);

        final PButton button = new PButton("Set");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                textBox.setPlaceholder(placeHolder.getText());
                textBoxReadOnly.setPlaceholder(placeHolder.getText());
            }
        });
        panel.add(button);

        final PTextBox masked = new PTextBox();
        final PTextBox maskedTextBox = new PTextBox();
        final PTextBox replacement = new PTextBox();
        final PCheckBox showMask = new PCheckBox("Show mask");
        final PButton applyMaskButton = new PButton("Apply mask");
        applyMaskButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (masked.getText().isEmpty()) return;

                String replaceChar = " ";
                if (!replacement.getText().isEmpty()) replaceChar = replacement.getText().substring(0, 1);
                maskedTextBox.applyMask(masked.getText(), showMask.getValue(), replaceChar);
            }
        });
        masked.setPlaceholder("({{000}}) {{000}}.{{0000}}");
        replacement.setWidth("10px");

        final PHorizontalPanel maskPanel = new PHorizontalPanel();
        maskPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        maskPanel.add(masked);
        maskPanel.add(maskedTextBox);
        maskPanel.add(replacement);
        maskPanel.add(showMask);
        maskPanel.add(applyMaskButton);

        panel.add(new PLabel("Password text box:"));
        panel.add(passwordTextBox);
        panel.add(passwordTextBoxReadOnly);
        panel.add(new PLabel("Text area:"));
        panel.add(textArea);
        panel.add(maskPanel);

        panel.add(new PLabel("AddOn test (javascript reverse)"));
        final PTextBox boxToReverse = new PTextBox();
        new ReverseTextInput(boxToReverse);
        final PTerminalScheduledCommand deffered = new PTerminalScheduledCommand() {

            @Override
            protected void run() {
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

        super(caption);
    }

    @Override
    public IsPWidget render(FormField formField) {
        final PTextBox textBox = new PTextBox();
        if (debugID != null) {
            textBox.ensureDebugId(debugID);
        }
        final FormFieldComponent<PTextBox> textField = buildTextField(textBox);
        fields.add(textField);
        return textField;
    }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

        final PVerticalPanel panel = new PVerticalPanel();

        // Send 'info' business event
        final PHorizontalPanel infoPanel = new PHorizontalPanel();
        final PTextBox textField = new PTextBox("This is an info event");
        final PButton ok = new PButton("send [INFO]");
        ok.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setBusinessMessage(textField.getText());
                fireEvent(businessEvent);
            }
        });

        infoPanel.add(textField);
        infoPanel.add(ok);

        // Send 'warn' business event
        final PHorizontalPanel warningPanel = new PHorizontalPanel();
        final PTextBox textField2 = new PTextBox("This is a warning event");
        final PButton ok2 = new PButton("send [WARN]");

        ok2.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.WARNING);
                businessEvent.setBusinessMessage(textField2.getText());
                fireEvent(businessEvent);
            }
        });

        warningPanel.add(textField2);
        warningPanel.add(ok2);

        // Send 'error' business level
        final PHorizontalPanel errorPanel = new PHorizontalPanel();
        final PTextBox textField3 = new PTextBox("This is an error event");
        final PButton ok3 = new PButton("send [ERROR]");

        ok3.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.ERROR);
                businessEvent.setBusinessMessage(textField3.getText());
                fireEvent(businessEvent);
            }
        });

        errorPanel.add(textField3);
        errorPanel.add(ok3);

        // Show 'tray' notification
        final PHorizontalPanel trayPanel = new PHorizontalPanel();
        final PTextBox textField4 = new PTextBox("This is a tray notification");
        final PButton ok4 = new PButton("show [TRAY]");

        ok4.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PNotificationManager.notify(textField4.getText(), Notification.TRAY);
            }
        });

        trayPanel.add(textField4);
        trayPanel.add(ok4);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

        PFlexTable panel = new PFlexTable();

        panel.setStyleProperty("padding", "10px");

        panel.setWidget(0, 0, new PLabel("Name :"));
        panel.setWidget(0, 1, new PTextBox("name"));
        panel.setWidget(1, 0, new PLabel("Description :"));
        panel.setWidget(1, 1, new PTextBox("description"));

        decoratorPanel.setWidget(panel);

        examplePanel.setWidget(decoratorPanel);
    }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

        amtLabel.addStyleName("amtlabel");
        final PFlowPanel sellDirection = new PFlowPanel();
        sellDirection.addStyleName("sell_direction");
        final PLabel spread = new PLabel();
        spread.addStyleName("spread");
        final PTextBox textBox = new PTextBox();
        textBox.setStyleName("input");
        final PAnchor selector = new PAnchor();
        selector.addStyleName("selector");

        box.add(background);
        box.add(headInline);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

            public void onClick(final PClickEvent clickEvent) {
                addCustomTabContent(tabPanel);
            }
        });

        final PTextBox indexTextBox = new PTextBox();
        final PButton selectButton = new PButton("Select Tab");
        selectButton.setStyleProperty("margin", "10px");
        selectButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final String text = indexTextBox.getText();
                tabPanel.selectTab(Integer.valueOf(text));
            }
        });

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

        verticalPanel.setSpacing(10);

        // Open popup with custom URL
        final PFlexTable table = new PFlexTable();
        table.setWidget(0, 0, new PLabel("URL"));
        table.setWidget(0, 1, urlTextBox = new PTextBox("https://github.com/PonySDK/PonySDK"));
        table.setWidget(1, 0, new PLabel("Name"));
        table.setWidget(1, 1, nameTextBox = new PTextBox("PonySDK"));
        table.setWidget(2, 0, new PLabel("Features"));
        table.setWidget(2, 1, featuresTextBox = new PTextBox("width=1280,height=800,resizable,status=1"));

        final PButton open = new PButton("Open new window");
        open.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final String url = urlTextBox.getText();
                final String name = nameTextBox.getText();
                final String features = featuresTextBox.getText();
                final PWindow w = new PWindow(url, name, features);
                w.open();
            }
        });

        // Open popup that communicate with server
        final PFlexTable table2 = new PFlexTable();
        table2.setWidget(0, 0, new PLabel("Name"));
        table2.setWidget(0, 1, popNameTextBox = new PTextBox("Popup"));
        table2.setWidget(1, 0, new PLabel("Features"));
        table2.setWidget(1, 1, popFeaturesTextBox = new PTextBox("width=500,height=300,resizable"));

        final PButton open2 = new PButton("Open new window");
        open2.addClickHandler(new PClickHandler() {

            @Override
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PTextBox

    @Override
    protected void onFirstShowPage() {
        super.onFirstShowPage();

        inputTextBox = new PTextBox();
        scroll = new PScrollPanel();
        history = new PFlowPanel();
        scroll.setWidget(history);

        final PDockLayoutPanel dock = new PDockLayoutPanel(PUnit.PX);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.