Examples of Widget


Examples of org.nlogo.window.Widget

  // new widgets in the UI.  For most widget types, the same type string
  // is used in both places. - ST 3/17/04
  @Override
  public Widget makeWidget(String type, boolean loading) {
    type = type.toUpperCase();
    Widget fromRegistry = org.nlogo.window.WidgetRegistry.apply(type);
    if (fromRegistry != null) {
      return fromRegistry;
    } else if (type.equalsIgnoreCase("SLIDER")) {
      return new org.nlogo.window.SliderWidget(workspace.world.auxRNG) {
        @Override
View Full Code Here

Examples of org.openhab.model.sitemap.Widget

  }
 
  @Test
  public void getLabel_plainLabel() {
    String testLabel = "This is a plain text";
    Widget w = mock(Widget.class);
    when(w.getLabel()).thenReturn(testLabel);
    String label = uiRegistry.getLabel(w);
    assertEquals(testLabel, label);
  }
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.Widget

    prepareWidgets(context, parameters);
  }


    private Widget buildDropdownWidget(Integer size){
        Widget dropdownWidget = new DropdownWidget(size);
        if(size==1 || !required){
            // show an empty option when size =1, even if required =true
            ((DropdownWidget) dropdownWidget).addOption(new Option());
        }
        return dropdownWidget;
View Full Code Here

Examples of org.opentides.bean.Widget

      HttpServletResponse res) throws Exception {
    String name = req.getParameter("name");
    Map<String, Object> model = new HashMap<String, Object>();
    if (!StringUtil.isEmpty(name)) {
      String widgetUrl = req.getRequestURL().toString();
      Widget widget = widgetService
          .requestWidget(widgetUrl, name, req);
      if (widget != null) {
        if (widget.getCacheType().startsWith(
            Widget.TYPE_IMAGE)) {
          // return as image
          res.setContentType(widget.getCacheType());
          OutputStream outputStream = res.getOutputStream();
          outputStream.write(widget.getCache());
          outputStream.flush();
          return null;
        }
        model.put("body", new String(widget.getCache()));
        model.put("cacheDate", widget.getLastCacheUpdate());
      } else {
        model.put("body", "Unable to load widget. Name [" + name
            + "] not found");
        model.put("cacheDate", new Date());
      }
View Full Code Here

Examples of org.osforce.spring4me.web.stereotype.Widget

*/
public abstract class WidgetInterceptorAdapter implements HandlerInterceptor {

  public boolean preHandle(HttpServletRequest request,
      HttpServletResponse response, Object handler) throws Exception {
    Widget widget = AnnotationUtils.findAnnotation(handler.getClass(), Widget.class);
    if(widget!=null) {
      return preHandleWidget(new HttpWidgetRequest(request),
          new HttpWidgetResponse(response), handler);
    }
    return true;
View Full Code Here

Examples of org.pdfclown.documents.interaction.annotations.Widget

  private void apply(
    PushButton field
    )
  {
    Document document = field.getDocument();
    Widget widget = field.getWidgets().get(0);

    Appearance appearance = widget.getAppearance();
    if(appearance == null)
    {widget.setAppearance(appearance = new Appearance(document));}

    FormXObject normalAppearanceState = new FormXObject(document);
    {
      Rectangle2D widgetBox = widget.getBox();
      Dimension2D size = new Dimension(widgetBox.getWidth(),widgetBox.getHeight());
      normalAppearanceState.setSize(size);
      PrimitiveComposer composer = new PrimitiveComposer(normalAppearanceState);

      composer.beginLocalState();
View Full Code Here

Examples of org.pdfclown.documents.interaction.annotations.Widget

  private void apply(
    TextField field
    )
  {
    Document document = field.getDocument();
    Widget widget = field.getWidgets().get(0);

    Appearance appearance = widget.getAppearance();
    if(appearance == null)
    {widget.setAppearance(appearance = new Appearance(document));}

    widget.getBaseDataObject().put(
      PdfName.DA,
      new PdfString("/Helv " + getFontSize() + " Tf 0 0 0 rg")
      );

    FormXObject normalAppearanceState = new FormXObject(document);
    {
      Rectangle2D widgetBox = widget.getBox();
      Dimension2D size = new Dimension(widgetBox.getWidth(),widgetBox.getHeight());
      normalAppearanceState.setSize(size);
      PrimitiveComposer composer = new PrimitiveComposer(normalAppearanceState);

      composer.beginLocalState();
View Full Code Here

Examples of org.pdfclown.documents.interaction.annotations.Widget

  private void apply(
    ComboBox field
    )
  {
    Document document = field.getDocument();
    Widget widget = field.getWidgets().get(0);

    Appearance appearance = widget.getAppearance();
    if(appearance == null)
    {widget.setAppearance(appearance = new Appearance(document));}

    widget.getBaseDataObject().put(
      PdfName.DA,
      new PdfString("/Helv " + getFontSize() + " Tf 0 0 0 rg")
      );

    FormXObject normalAppearanceState = new FormXObject(document);
    {
      Rectangle2D widgetBox = widget.getBox();
      Dimension2D size = new Dimension(widgetBox.getWidth(),widgetBox.getHeight());
      normalAppearanceState.setSize(size);
      PrimitiveComposer composer = new PrimitiveComposer(normalAppearanceState);

      composer.beginLocalState();
View Full Code Here

Examples of org.pdfclown.documents.interaction.annotations.Widget

  private void apply(
    ListBox field
    )
  {
    Document document = field.getDocument();
    Widget widget = field.getWidgets().get(0);

    Appearance appearance = widget.getAppearance();
    if(appearance == null)
    {widget.setAppearance(appearance = new Appearance(document));}

    {
      PdfDictionary widgetDataObject = widget.getBaseDataObject();
      widgetDataObject.put(
        PdfName.DA,
        new PdfString("/Helv " + getFontSize() + " Tf 0 0 0 rg")
        );
      widgetDataObject.put(
        PdfName.MK,
        new PdfDictionary(
          new PdfName[]
          {
            PdfName.BG,
            PdfName.BC
          },
          new PdfDirectObject[]
          {
            new PdfArray(new PdfDirectObject[]{new PdfReal(.9),new PdfReal(.9),new PdfReal(.9)}),
            new PdfArray(new PdfDirectObject[]{new PdfInteger(0),new PdfInteger(0),new PdfInteger(0)})
          }
          )
        );
    }

    FormXObject normalAppearanceState = new FormXObject(document);
    {
      Rectangle2D widgetBox = widget.getBox();
      Dimension2D size = new Dimension(widgetBox.getWidth(),widgetBox.getHeight());
      normalAppearanceState.setSize(size);
      PrimitiveComposer composer = new PrimitiveComposer(normalAppearanceState);

      composer.beginLocalState();
View Full Code Here

Examples of org.pdfclown.documents.interaction.annotations.Widget

    )
  {
    if(isDual)
      return new DualWidget(baseObject,getContainer());
    else
      return new Widget(baseObject,getContainer());
  }
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.