Examples of Widget


Examples of org.apache.rave.portal.model.Widget

    }

    @Test
    public void viewAdminWidgetDetail() throws Exception {
        Model model = new ExtendedModelMap();
        Widget widget = new Widget();
        final long entityId = 123L;
        widget.setEntityId(entityId);
        widget.setTitle("My widget");

        expect(service.getWidget(entityId)).andReturn(widget);
        expect(categoryService.getAll()).andReturn(categories);
        replay(service, categoryService);
        String adminWidgetDetailView = controller.viewWidgetDetail(entityId, model);
View Full Code Here

Examples of org.apache.rave.rest.model.Widget

    }

    @Override
    public Widget getWidget(String id) {
        org.apache.rave.model.Widget widget = getFromService(id);
        return new Widget(widget);
    }
View Full Code Here

Examples of org.apache.wookie.connector.framework.Widget

  public void widgetHandling ( ) throws WookieConnectorException, IOException {
    File widgetFile = new File ( "connector/java/src-test/org/apache/wookie/tests/connector/framework/impl/empty.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    File saveWidgetFile = File.createTempFile("empty"+Long.toString(System.nanoTime()), "wgt");
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
   
    uploadedWidget = service.updateWidget(widgetFile, identifier, adminUsername, adminPassword);
    uploadedWidget = service.getWidget(identifier);
    assertNotNull("Widget value from getWidget is null", uploadedWidget);
   
View Full Code Here

Examples of org.araneaframework.Widget

    handleUpdate(input);
   
    Iterator ite = (new HashMap(getChildren())).keySet().iterator();
    while(ite.hasNext()) {
      Object key = ite.next();
      Widget widget = (Widget)getChildren().get(key);
      if (widget != null) {
      try {
          input.pushScope(key);
        widget._getWidget().update(input);
      }
      finally {
        input.popScope();
      }
    }
View Full Code Here

Examples of org.araneaframework.Widget

    }
   
    if (path.hasNext()) {
      Object next = path.next();
     
      Widget pWidget = (Widget)getChildren().get(next);          
     
      if (pWidget == null ) {
        log.warn("No widget found", new NoSuchWidgetException(next.toString()))
        return;
      }
     
      try {
        input.pushScope(next);
        pWidget._getWidget().event(path, input);
      }
      finally {
        input.popScope();
      }
View Full Code Here

Examples of org.araneaframework.Widget

  protected void process() throws Exception {
    handleProcess();
   
    Iterator ite = (new HashMap(getChildren())).keySet().iterator();
    while(ite.hasNext()) {
      Widget child = (Widget)getChildren().get(ite.next());
      if (child != null) {
      child._getWidget().process();
    }
  }
  }
View Full Code Here

Examples of org.araneaframework.Widget

   */
  public void testFormRequestHandling() throws Exception {

    FormWidget testForm = makeUsualForm();
   
    Widget currentWidget = testForm;
   
    MockHttpServletRequest validRequest = new MockHttpServletRequest();

    validRequest.addParameter("testForm.__present", "true");
    validRequest.addParameter("testForm.myCheckBox", "true");
    validRequest.addParameter("testForm.myLongText", "108");
    validRequest.addParameter("testForm.myDateTime.date", "11.10.2015");
    validRequest.addParameter("testForm.myDateTime.time", "01:01");
    validRequest.addParameter("testForm.hierarchyTest.myTextarea", "blah");
    validRequest.addParameter("testForm.hierarchyTest.mySelect", "2");   
   
   
    MockUiLibUtil.emulateHandleRequest(currentWidget, "testForm", validRequest);
    currentWidget._getWidget().process();             

    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("myCheckBox")._getViewable().getViewModel()).getSimpleValue().equals("true"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("myLongText")._getViewable().getViewModel()).getSimpleValue().equals("108"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("hierarchyTest.myTextarea")._getViewable().getViewModel()).getSimpleValue().equals("blah"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("hierarchyTest.mySelect")._getViewable().getViewModel()).getSimpleValue().equals("2"));    
View Full Code Here

Examples of org.beryl.gui.Widget

    }
  }

  private RadioButton findButton(Object object) throws GUIException {
    for (int i=0, count = getChildCount(); i<count; i++) {
      Widget widget = (Widget) getChild(i);
      if (widget instanceof RadioButton) {
        RadioButton button = (RadioButton) widget;
        if (button.getValue() == object || button.getValue().equals(object)) {
          return button;
        }
View Full Code Here

Examples of org.beryl.gui.Widget

      if (((String) value).length() > 0)
        button.setMnemonic(((String) value).charAt(0));
      else
        button.setMnemonic('\0');
    } else if (name.equals("default")) {
      Widget widget = getParentWidgetByClass(Frame.class);
      if (widget == null) {
        widget = getParentWidgetByClass(Dialog.class);
      }
      if (widget == null) {
        throw new GUIException("Could not find root window");
      }
      if (((Boolean) value).booleanValue()) {
        widget.setProperty("default", this);
      } else {
        if (widget.getProperty("default") == this)
          widget.setProperty("default", null);
      }
    } else {
      super.setProperty(name, value);
    }
  }
View Full Code Here

Examples of org.beryl.gui.Widget

          int sortedRow = sorter.getSortedRowForRow(row);
          try {
            TableRow tableRow = tableDataModel.getTableRow(sortedRow);
            String key = (String) columnKeys.get(column);
            if (tableRow.hasCustomRenderer(key)) {
              Widget renderer =
                tableRow.getRenderer(
                  Table.this,
                  getValueAt(row, column),
                  isCellSelected(row, column),
                  hasFocus(),
                  tableRow,
                  key);

              if (renderer != null) {
                return new CustomCellRenderer(renderer);
              }
            }
          } catch (GUIException e) {
            /* There should be no exception here */
            throw new RuntimeException(e);
          }

          if (tableDataModel != null) {
            Object object = tableDataModel.getValue(sortedRow, (String) columnKeys.get(column));
            if (object != null) {
              return getDefaultRenderer(object.getClass());
            }
          }
        }

        /* Fall back to the JTable internal processing */
        return super.getCellRenderer(row, column);
      }

      public TableCellEditor getCellEditor(int row, int column) {
        if (message == null) {
          int sortedRow = sorter.getSortedRowForRow(row);

          try {
            TableRow tableRow = tableDataModel.getTableRow(sortedRow);
            String key = (String) columnKeys.get(column);

            Widget editor =
              tableRow.getEditor(
                Table.this,
                getValueAt(row, column),
                tableDataModel.getTableRow(sortedRow),
                key);
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.