Package edu.stanford.bmir.protege.web.client.ui.library.button

Examples of edu.stanford.bmir.protege.web.client.ui.library.button.DeleteButton


            if(editor instanceof HasEnabled) {
                ((HasEnabled) editor).setEnabled(enabled);
            }
        }
        for(int i = 0; i < tableField.getRowCount(); i++) {
            DeleteButton deleteButton = (DeleteButton) tableField.getWidget(i, DELETE_BUTTON_COLUMN);
            deleteButton.setEnabled(enabled);
            if (i < tableField.getRowCount() - 1) {
                deleteButton.setVisible(enabled);
            }
        }
    }
View Full Code Here


    private void ensureBlank() {
        if(currentEditors.isEmpty() || currentEditors.get(currentEditors.size() - 1).getValue().isPresent()) {
            addValueEditor(false);
        }
        for(int i = 0; i < tableField.getRowCount(); i++) {
            DeleteButton deleteButton = (DeleteButton) tableField.getWidget(i, DELETE_BUTTON_COLUMN);
            if(i < tableField.getRowCount() - 1 && !deleteButton.isVisible()) {
                deleteButton.setEnabled(enabled);
                deleteButton.setVisible(enabled);
            }
        }
    }
View Full Code Here

    private ValueEditor<O> addValueEditor(boolean deleteVisible) {
        final ValueEditor<O> editor = getFreshValueEditor();
        currentEditors.add(editor);
        final int rowCount = tableField.getRowCount();
        tableField.setWidget(rowCount, 0, editor.asWidget());
        final DeleteButton deleteButton = new DeleteButton();
        deleteButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                handleDelete(editor);
            }
        });
        tableField.setWidget(rowCount, 1, deleteButton);
        final FlexTable.FlexCellFormatter formatter = tableField.getFlexCellFormatter();
        formatter.setWidth(rowCount, 0, "100%");
        formatter.setVerticalAlignment(rowCount, 0, HasVerticalAlignment.ALIGN_TOP);
        formatter.setWidth(rowCount, 1, "30px");
        formatter.getElement(rowCount, 1).getStyle().setPaddingLeft(1, Style.Unit.PX);
        formatter.setVerticalAlignment(rowCount, 1, HasVerticalAlignment.ALIGN_TOP);
        editor.addDirtyChangedHandler(dirtyChangedHandler);
        editor.addValueChangeHandler(valueChangeHandler);
        deleteButton.setVisible(deleteVisible);
        deleteButton.setEnabled(enabled);
        if(editor instanceof HasEnabled) {
            ((HasEnabled) editor).setEnabled(enabled);
        }
        if(editor instanceof HasPlaceholder) {
            ((HasPlaceholder) editor).setPlaceholder(placeholder);
View Full Code Here

       
        flexTable.setWidget(rowCount, 1, lb);
        flexTable.getRowFormatter().addStyleName(rowCount, "web-protege-table-row");

        if (!userId.getUserName().equals(userName)) {
            DeleteButton deleteButton = new DeleteButton();
            deleteButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    displayedItems.remove(rowCount);
                    refill();
                }
            });
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.ui.library.button.DeleteButton

Copyright © 2018 www.massapicom. 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.