Examples of TextArea


Examples of org.apache.click.control.TextArea

     */
    public void testDynamicRequest() {
        MockContext context = MockContext.initContext();
        MockRequest request = (MockRequest) context.getMockRequest();

        TextArea textArea = new TextArea("text");
        assertEquals("text", textArea.getName());

        request.setParameter("param", "value");
        request.getParameterMap().put("text", "textvalue");

        // Registry a listener which must be invoked
        textArea.setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                // When action is invoked, set flag to true
                return actionCalled = true;
            }
        });
        assertTrue(textArea.onProcess());

        // Fire all action events that was registered in the onProcess method
        context.executeActionListeners();

        assertTrue("TextArea action was not invoked", actionCalled);
        assertTrue(textArea.isValid());
        assertEquals("textvalue", textArea.getValue());
        assertEquals("textvalue", textArea.getValueObject());
       
        // Check that getParameterMap() is modifiable by adding a
        // key/value pair.
        context = (MockContext) Context.getThreadLocalContext();
        context.getRequest().getParameterMap().put("textvalue",
          textArea.getValue());
    }
View Full Code Here

Examples of org.apache.ecs.html.TextArea

        table.addElement( getRow( "Link: ", new Input().setType("text")
                                                      .setName("link")
                                                      .setValue( link ) ) );

        table.addElement( new TR().addElement( new TD().setColSpan(2)
            .addElement( new TextArea().setName("description")
                                       .setCols( 65 )
                                       .setRows( 15 )
                                       .addElement( description ) ) ) );
       
        form.addElement( new Input().setType( "hidden" )
View Full Code Here

Examples of org.apache.ecs.xhtml.textarea

            throw new PluginException( rb.getString( "formtextarea.namemissing" ) );

        // In order to isolate posted form elements into their own
        // map, prefix the variable name here. It will be stripped
        // when the handler plugin is executed.
        textarea field = new textarea( HANDLERPARAM_PREFIX + inputName,
                                       rows, cols);

        if( previousValues != null )
        {
            String oldValue = (String)previousValues.get( inputName );
            if( oldValue != null )
            {
                field.addElement( oldValue );
            }
            else
            {
                oldValue = (String)params.get( PARAM_VALUE );
                if( oldValue != null ) field.addElement( oldValue );
            }
        }
        return field;
    }
View Full Code Here

Examples of org.apache.fop.area.inline.TextArea

            // will counterbalance the error and the other inline areas will be
            // placed correctly
            iTotalAdjust = iDifference;
        }

        TextArea t = createTextArea(realWidth, iTotalAdjust, context,
                                    wordSpaceIPD.opt - spaceCharIPD,
                                    firstAreaInfoIndex, lastAreaInfoIndex,
                                    context.isLastArea());

        // iWordSpaceDim is computed in relation to wordSpaceIPD.opt
        // but the renderer needs to know the adjustment in relation
        // to the size of the space character in the current font;
        // moreover, the pdf renderer adds the character spacing even to
        // the last character of a word and to space characters: in order
        // to avoid this, we must subtract the letter space width twice;
        // the renderer will compute the space width as:
        //   space width =
        //     = "normal" space width + letterSpaceAdjust + wordSpaceAdjust
        //     = spaceCharIPD + letterSpaceAdjust +
        //       + (iWordSpaceDim - spaceCharIPD -  2 * letterSpaceAdjust)
        //     = iWordSpaceDim - letterSpaceAdjust
        t.setTextLetterSpaceAdjust(iLetterSpaceDim);
        t.setTextWordSpaceAdjust(iWordSpaceDim - spaceCharIPD
                                 - 2 * t.getTextLetterSpaceAdjust());
        if (context.getIPDAdjust() != 0) {
            // add information about space width
            t.setSpaceDifference(wordSpaceIPD.opt - spaceCharIPD
                                 - 2 * t.getTextLetterSpaceAdjust());
        }
        parentLM.addChildArea(t);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.TextArea

                if (text == null || text.isEmpty()) {
                    return;
                }

                TextArea toolTipTextArea = new TextArea();

                toolTipTextArea.setText(text);
                toolTipTextArea.getStyles().put("wrapText", true);

                tooltip.setContent(toolTipTextArea);

                Point location = comp.getDisplay().getMouseLocation();
                x = location.x;
                y = location.y;

                // Ensure that the tooltip stays on screen
                Display display = comp.getDisplay();
                int tooltipHeight = tooltip.getPreferredHeight();
                if (y + tooltipHeight > display.getHeight()) {
                    y -= tooltipHeight;
                }

                int tooltipXOffset = 16;
                int padding = 15;

                toolTipTextArea.setMaximumWidth(display.getWidth() - ( x + tooltipXOffset + padding) );
                tooltip.setLocation(x + tooltipXOffset, y);
                tooltip.open(comp.getWindow());
            }
        });
View Full Code Here

Examples of org.apache.struts2.components.TextArea

    public String getBeanName() {
        return "textarea";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new TextArea(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.dojo.components.TextArea

    public TextAreaModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new TextArea(stack, req, res);
    }
View Full Code Here

Examples of org.apache.struts2.jquery.components.TextArea

    public TextAreaModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new TextArea(stack, req, res);
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.TextArea

    {
        super(id, model, metaData, viewOnly);

        metaData.consumeParameter(ElementMetaData.PARAM_ROWS);
        metaData.consumeParameter(ElementMetaData.PARAM_COLUMNS);
        TextArea field = new TextArea("component", model) {
            private static final long serialVersionUID = 1L;
            @Override
            protected void onComponentTag(ComponentTag tag)
            {
                super.onComponentTag(tag);
                String rows = metaData.getParameter("rows");
                if (rows != null) {
                    tag.put("rows", rows);
                }

                String cols = metaData.getParameter("cols");
                if (cols != null) {
                    tag.put("cols", cols);
                }
            }
        };
       
        setFieldParameters(field);
        field.setEnabled(!viewOnly);

        add(field);
    }
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.TextArea

    List form = div.addList("system-wide-alerts",List.TYPE_FORM);
    form.setHead(T_alerts_head);
   
    form.addItem(T_alerts_warning);
   
    TextArea message = form.addItem().addTextArea("message");
    message.setLabel(T_alerts_message_label);
    message.setSize(5, 45);
    if (SystemwideAlerts.getMessage() == null)
      message.setValue(T_alerts_message_default);
    else
      message.setValue(SystemwideAlerts.getMessage());
   
    Select countdown = form.addItem().addSelect("countdown");
    countdown.setLabel(T_alerts_countdown_label);
   
    countdown.addOption(0,T_alerts_countdown_none);
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.