Example usage for com.google.gwt.user.client.ui FlowPanel getWidgetIndex

List of usage examples for com.google.gwt.user.client.ui FlowPanel getWidgetIndex

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui FlowPanel getWidgetIndex.

Prototype

public int getWidgetIndex(IsWidget child) 

Source Link

Usage

From source file:org.cruxframework.crux.widgets.client.uploader.AbstractFileUploader.java

License:Apache License

protected void resetFileInput() {
    FlowPanel buttonsPanel = (FlowPanel) fileInput.getParent();
    int index = buttonsPanel.getWidgetIndex(fileInput);
    buttonsPanel.remove(index);/*from w  ww.  j  a  va 2 s .c om*/

    String text = fileInput.getText();
    boolean multiple = fileInput.isMultiple();
    fileInput = initFileInput();
    fileInput.setText(text);
    fileInput.setMultiple(multiple);
    buttonsPanel.insert(fileInput, index);
}