Examples of FBFormItem


Examples of org.jbpm.formapi.client.form.FBFormItem

                    @Override
                    public void onEvent(UndoableEvent event) {  }
                    @Override
                    public void undoAction(UndoableEvent event) {
                        String label = (String) event.getData("labelBoxValue");
                        FBFormItem item = (FBFormItem) event.getData("item");
                        revertStyles(label, item);
                    }
                    @Override
                    public void doAction(UndoableEvent event) {
                        String newLabel = (String) event.getData("labelBoxValue");
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        super(FormBuilderGlobals.getInstance().getI18n().ChangeColspanEffectLabel(), true);
    }

    @Override
    protected void createStyles() {
        FBFormItem item = getItem();
        MIGLayoutFormItem container = getContainer(item);
       
        Map<String, Object> dataSnapshot = new HashMap<String, Object>();
        dataSnapshot.put("item", item);
        dataSnapshot.put("container", container);
        dataSnapshot.put("oldColspan", container.getColSpan(item));
        dataSnapshot.put("oldRowspan", container.getRowSpan(item));
        dataSnapshot.put("newColspan", colspan.getValue());
        dataSnapshot.put("newRowspan", rowspan.getValue());
        UndoableHandler rollbackHandler = new UndoableHandler() {
            @Override
            public void onEvent(UndoableEvent event) { }
            @Override
            public void doAction(UndoableEvent event) {
                Integer rowspan = (Integer) event.getData("newRowspan");
                Integer colspan = (Integer) event.getData("newColspan");
                MIGLayoutFormItem container = (MIGLayoutFormItem) event.getData("container");
                FBFormItem item = (FBFormItem) event.getData("item");
                container.setSpan(item, colspan, rowspan);
            }
            @Override
            public void undoAction(UndoableEvent event) {
                Integer rowspan = (Integer) event.getData("oldRowspan");
                Integer colspan = (Integer) event.getData("oldColspan");
                MIGLayoutFormItem container = (MIGLayoutFormItem) event.getData("container");
                FBFormItem item = (FBFormItem) event.getData("item");
                container.setSpan(item, colspan, rowspan);
            }
        };
        bus.fireEvent(new UndoableEvent(dataSnapshot, rollbackHandler));
        container.setSpan(item, colspan.getValue(), rowspan.getValue());
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        return (MIGLayoutFormItem) parent;
    }
   
    @Override
    public PopupPanel createPanel() {
        FBFormItem item = getItem();
        MIGLayoutFormItem container = getContainer(item);
        colspan.setValue(container.getColSpan(item));
        rowspan.setValue(container.getRowSpan(item));
        final PopupPanel panel = new PopupPanel();
        Grid data = new Grid(3, 2);
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        OptionsFormItem opt = (OptionsFormItem) super.getItem();
        opt.addItem(label, value);
    }
   
    protected String getValue(String label) {
        FBFormItem item = super.getItem();
        String value = null;
        if (item instanceof OptionsFormItem) {
            OptionsFormItem opt = (OptionsFormItem) item;
            value = opt.getItems().get(label);
        }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        EasyMock.verify(view);
    }

    @Test
    public void testFormItemRemoved() throws Exception {
        FBFormItem formItem = EasyMock.createMock(FBFormItem.class);
        view.removeFormItem(EasyMock.same(formItem));
        EasyMock.replay(view, formItem);
        new TreePresenter(view);
        bus.fireEvent(new FormItemRemovedEvent(formItem));
        EasyMock.verify(view, formItem);
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    }
   
    @Test
    public void testFormItemAddedOnRoot() throws Exception {
        FBForm parentItem = EasyMock.createMock(FBForm.class);
        FBFormItem formItem = EasyMock.createMock(FBFormItem.class);
        view.addFormItem(EasyMock.same(formItem), EasyMock.same(parentItem));
        EasyMock.expectLastCall().once();
        EasyMock.replay(view, parentItem, formItem);
        new TreePresenter(view);
        bus.fireEvent(new FormItemAddedEvent(formItem, parentItem));
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        BorderPanelRepresentation brep = (BorderPanelRepresentation) rep;
        Map<Position, FormItemRepresentation> repItems = brep.getItems();
        if (repItems != null) {
            for (Map.Entry<Position, FormItemRepresentation> entry : repItems.entrySet()) {
                Position key = entry.getKey();
                FBFormItem value = super.createItem(entry.getValue());
                this.currentPosition = key;
                this.add(value);
            }
        }
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

   
    @Test
    public void testFormItemAddedOnLeaf() throws Exception {
        FBForm rootItem = EasyMock.createMock(FBForm.class);
        LayoutFormItem parentItem = EasyMock.createMock(LayoutFormItem.class);
        FBFormItem formItem = EasyMock.createMock(FBFormItem.class);
        //EasyMock.expect(formItem.getParent()).andReturn(parentItem).once();
        List<FBFormItem> items = new ArrayList<FBFormItem>();
        items.add(formItem);
        EasyMock.expect(parentItem.getItems()).andReturn(items).atLeastOnce();
        view.addFormItem(EasyMock.same(parentItem), EasyMock.same(rootItem));
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        Grid g = new Grid(rows, columns);
        populate(g);
        for (int index = 0; index < columns * rows; index++) {
            int column = index%columns;
            int row = index/columns;
            FBFormItem item = (FBFormItem) this.grid.getWidget(row, column);
            if (item != null) {
                g.setWidget(row, column, item.cloneDisplay(data));
            }
        }
        super.populateActions(g.getElement());
        return g;
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        EasyMock.verify(view);
    }
   
    @Test
    public void testFormItemSelectionSelected() throws Exception {
        FBFormItem formItem = EasyMock.createMock(FBFormItem.class);
        view.selectTab();
        EasyMock.expectLastCall().once();
        view.populate(EasyMock.same(formItem));
        EasyMock.expectLastCall().once();
        EasyMock.replay(view, formItem);
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.