Example usage for com.google.gwt.user.client.ui AbstractImagePrototype AbstractImagePrototype

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

Introduction

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

Prototype

AbstractImagePrototype

Source Link

Usage

From source file:com.ikon.frontend.client.widget.filebrowser.FileBrowser.java

License:Open Source License

/**
 * FileBrowser// w w  w.  j av a 2  s .c o m
 */
public FileBrowser() {
    // Sets the actual view and view values hashMap object
    actualView = UIDesktopConstants.NAVIGATOR_TAXONOMY;
    viewValues = new HashMap<String, Controller>();
    docHandlerExtensionList = new ArrayList<DocumentHandlerExtension>();
    folderHandlerExtensionList = new ArrayList<FolderHandlerExtension>();
    mailHandlerExtensionList = new ArrayList<MailHandlerExtension>();

    panel = new VerticalPanel();
    filePath = new FilePath();

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        /*
         * (non-Javadoc)
         * @see com.google.gwt.gen2.table.client.AbstractScrollTable.
         * ScrollTableImages#scrollTableAscending()
         */
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        /*
         * (non-Javadoc)
         * @see com.google.gwt.gen2.table.client.AbstractScrollTable.
         * ScrollTableImages#scrollTableDescending()
         */
        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        /*
         * (non-Javadoc)
         * @see com.google.gwt.gen2.table.client.AbstractScrollTable.
         * ScrollTableImages#scrollTableFillWidth()
         */
        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };
    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();
    table = new ExtendedScrollTable(dataTable, headerTable, scrollTableImages);
    table.setSize("540", "140");
    table.setCellSpacing(0);
    table.setCellPadding(0);

    // eliminat aqui

    headerTable.addStyleName("okm-DisableSelect");
    table.addStyleName("okm-Input");

    taxonomyMenuPopup = new MenuPopup(new TaxonomyMenu());
    taxonomyMenuPopup.setStyleName("okm-FileBrowser-MenuPopup");
    categoriesMenuPopup = new MenuPopup(new CategoriesMenu());
    categoriesMenuPopup.setStyleName("okm-Tree-MenuPopup");
    thesaurusMenuPopup = new MenuPopup(new ThesaurusMenu());
    thesaurusMenuPopup.setStyleName("okm-Tree-MenuPopup");
    trashMenuPopup = new MenuPopup(new TrashMenu());
    trashMenuPopup.setStyleName("okm-Tree-MenuPopup");
    templatesMenuPopup = new MenuPopup(new TemplatesMenu());
    templatesMenuPopup.setStyleName("okm-Tree-MenuPopup");
    personalMenuPopup = new MenuPopup(new PersonalMenu());
    personalMenuPopup.setStyleName("okm-Tree-MenuPopup");
    mailMenuPopup = new MenuPopup(new MailMenu());
    mailMenuPopup.setStyleName("okm-Tree-MenuPopup");
    massiveOperationsMenuPopup = new MenuPopup(new MassiveOperationsMenu());
    massiveOperationsMenuPopup.setStyleName("okm-Tree-MenuPopup");
    status = new Status(this);
    status.setStyleName("okm-StatusPopup");
    massiveStatus = new com.ikon.frontend.client.widget.popup.Status(this);
    massiveStatus.setStyleName("okm-StatusPopup");
    fileTextBox = new FileTextBox();
    separator = new Image("img/transparent_pixel.gif");

    separator.setSize("100%", "4px");
    separator.setStyleName("okm-FileBrowser-Separator");

    panel.add(filePath);
    panel.add(separator);
    panel.add(table);
    panel.setSize("100%", "100%");
    panel.setCellHeight(filePath, "22");
    panel.setCellHeight(separator, "4");
    panel.setCellWidth(filePath, "100%");
    panel.setCellWidth(separator, "100%");
    panel.setCellVerticalAlignment(table, VerticalPanel.ALIGN_TOP);
    panel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
    initWidget(panel);
}

From source file:com.ikon.frontend.client.widget.notify.RoleScrollTable.java

License:Open Source License

/**
 * RoleScrollTable/*from www .j a  va2s  .co  m*/
 * 
 * @param isAssigned
 */
public RoleScrollTable(boolean isRolesToNofity) {
    this.isRolesToNofity = isRolesToNofity;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(0);
    table.setSize("175", "140");

    // Level 1 headers
    if (isRolesToNofity) {
        headerTable.setHTML(0, 0, Main.i18n("fileupload.label.roles.to.notify"));
    } else {
        headerTable.setHTML(0, 0, Main.i18n("fileupload.label.roles"));
    }

    table.setColumnWidth(0, 167);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);

    table.setScrollPolicy(ScrollPolicy.BOTH);

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.notify.UserScrollTable.java

License:Open Source License

/**
 * UserScrollTable/*from w w  w  . jav a  2 s  .co m*/
 * 
 * @param isUserToNofity
 */
public UserScrollTable(boolean isUserToNofity) {
    this.isUserToNofity = isUserToNofity;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(0);
    table.setSize("175", "140");

    // Level 1 headers
    if (isUserToNofity) {
        headerTable.setHTML(0, 0, Main.i18n("fileupload.label.users.to.notify"));
    } else {
        headerTable.setHTML(0, 0, Main.i18n("fileupload.label.users"));
    }

    headerTable.setHTML(0, 1, "");

    table.setColumnWidth(0, 167);
    table.setColumnWidth(1, 0);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);

    table.setScrollPolicy(ScrollPolicy.BOTH);

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.properties.SecurityScrollTable.java

License:Open Source License

/**
 * SecurityScrollTable/*from w w w .  ja  va2s .com*/
 */
public SecurityScrollTable() {
    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(2);
    table.setSize("540", "140");

    button = new Button(Main.i18n("button.update"), this);
    button.setStyleName("okm-ChangeButton");

    initSecurity();

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.properties.VersionScrollTable.java

License:Open Source License

/**
 * Version/*from  w ww  .  java 2 s.c o m*/
 */
public VersionScrollTable() {
    versions = new ArrayList<String>();
    buttonView = new ArrayList<Button>();
    buttonRestore = new ArrayList<Button>();

    purge = new Button(Main.i18n("version.purge.document"), this);
    purge.setStyleName("okm-DeleteButton");
    purge.setEnabled(false);

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(2);
    table.setSize("540", "140");
    table.setColumnWidth(0, 70);
    table.setColumnWidth(1, 150);
    table.setColumnWidth(2, 150);
    table.setColumnWidth(3, 100);
    table.setColumnWidth(4, 100);
    table.setColumnWidth(5, 150);

    table.setPreferredColumnWidth(0, 70);
    table.setPreferredColumnWidth(1, 150);

    table.setColumnSortable(5, false);

    // Level 1 headers
    headerTable.setHTML(0, 0, Main.i18n("version.name"));
    headerTable.setHTML(0, 1, Main.i18n("version.created"));
    headerTable.setHTML(0, 2, Main.i18n("version.author"));
    headerTable.setHTML(0, 3, Main.i18n("version.size"));
    headerTable.setHTML(0, 4, "&nbsp;");
    headerTable.setWidget(0, 5, purge);
    headerTable.setHTML(0, 6, Main.i18n("version.comment"));

    headerTable.getCellFormatter().setHorizontalAlignment(0, 5, HasAlignment.ALIGN_CENTER);
    headerTable.getCellFormatter().setVerticalAlignment(0, 5, HasAlignment.ALIGN_MIDDLE);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);
    table.setResizePolicy(ResizePolicy.UNCONSTRAINED);
    table.setScrollPolicy(ScrollPolicy.BOTH);

    headerTable.addStyleName("okm-DisableSelect");
    dataTable.addStyleName("okm-DisableSelect");

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.searchresult.SearchCompactResult.java

License:Open Source License

/**
 * SearchCompactResult//from w w w .jav  a 2 s  .c  om
 */
public SearchCompactResult() {
    menuPopup = new MenuPopup();
    menuPopup.setStyleName("okm-SearchResult-MenuPopup");

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();
    table = new ExtendedScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(2);
    table.setSize("540", "140");

    // Level 1 headers
    headerTable.setHTML(0, 0, Main.i18n("search.result.score"));
    headerTable.setHTML(0, 1, "&nbsp;");
    headerTable.setHTML(0, 2, Main.i18n("search.result.name"));
    headerTable.setHTML(0, 3, Main.i18n("search.result.size"));
    headerTable.setHTML(0, 4, Main.i18n("search.result.date.update"));
    headerTable.setHTML(0, 5, Main.i18n("search.result.author"));
    headerTable.setHTML(0, 6, Main.i18n("search.result.version"));

    // Format    
    table.setColumnWidth(0, 70);
    table.setColumnWidth(1, 25);
    table.setColumnWidth(2, 150);
    table.setColumnWidth(3, 100);
    table.setColumnWidth(4, 150);
    table.setColumnWidth(5, 110);
    table.setColumnWidth(6, 90);

    table.setPreferredColumnWidth(0, 70);
    table.setPreferredColumnWidth(1, 25);
    table.setPreferredColumnWidth(4, 150);

    table.addStyleName("okm-DisableSelect");
    table.addStyleName("okm-Input");

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.security.RoleScrollTable.java

License:Open Source License

/**
 * RoleScrollTable/*from  w w w  .  j  a  va 2s .co m*/
 * 
 * @param isAssigned
 */
public RoleScrollTable(boolean isAssigned) {
    this.isAssigned = isAssigned;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(2);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);
    table.setResizePolicy(ResizePolicy.UNCONSTRAINED);
    table.setScrollPolicy(ScrollPolicy.BOTH);

    initSecurity();

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.security.UserScrollTable.java

License:Open Source License

/**
 * UserScrollTable/* ww  w  .j  a v a 2  s . c o  m*/
 * 
 * @param isAssigned
 */
public UserScrollTable(boolean isAssigned) {
    this.isAssigned = isAssigned;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(2);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);
    table.setResizePolicy(ResizePolicy.UNCONSTRAINED);
    table.setScrollPolicy(ScrollPolicy.BOTH);

    initSecurity();

    initWidget(table);
}

From source file:com.openkm.extension.frontend.client.widget.openmeetings.invite.RoleScrollTable.java

License:Open Source License

/**
 * RoleScrollTable//w w w .j a  va2s  .  c  o  m
 * 
 * @param isAssigned
 */
public RoleScrollTable(boolean isRolesToInvite) {
    this.isRolesToInvite = isRolesToInvite;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(0);
    table.setSize("175", "140");

    // Level 1 headers
    if (isRolesToInvite) {
        headerTable.setHTML(0, 0, GeneralComunicator.i18nExtension("openmeetings.invitate.groups.to.invitate"));
    } else {
        headerTable.setHTML(0, 0, GeneralComunicator.i18nExtension("openmeetings.invitate.groups"));
    }

    table.setColumnWidth(0, 167);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);

    table.setScrollPolicy(ScrollPolicy.BOTH);

    initWidget(table);
}

From source file:com.openkm.extension.frontend.client.widget.openmeetings.invite.UserScrollTable.java

License:Open Source License

/**
 * UserScrollTable/*from  ww w .  ja v a2s. c  o m*/
 * 
 * @param isUserToInvite
 */
public UserScrollTable(boolean isUserToInvite) {
    this.isUserToInvite = isUserToInvite;

    ScrollTableImages scrollTableImages = new ScrollTableImages() {
        public AbstractImagePrototype scrollTableAscending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_asc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_asc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableDescending() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/sort_desc.gif");
                }

                public Image createImage() {
                    return new Image("img/sort_desc.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
                }
            };
        }

        public AbstractImagePrototype scrollTableFillWidth() {
            return new AbstractImagePrototype() {
                public void applyTo(Image image) {
                    image.setUrl("img/fill_width.gif");
                }

                public Image createImage() {
                    return new Image("img/fill_width.gif");
                }

                public String getHTML() {
                    return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
                }
            };
        }
    };

    headerTable = new FixedWidthFlexTable();
    dataTable = new FixedWidthGrid();

    table = new ScrollTable(dataTable, headerTable, scrollTableImages);
    table.setCellSpacing(0);
    table.setCellPadding(0);
    table.setSize("175", "140");

    // Level 1 headers
    if (isUserToInvite) {
        headerTable.setHTML(0, 0, GeneralComunicator.i18nExtension("openmeetings.invitate.users.to.invitate"));
    } else {
        headerTable.setHTML(0, 0, GeneralComunicator.i18nExtension("openmeetings.invitate.users"));
    }
    headerTable.setHTML(0, 1, "");
    headerTable.getCellFormatter().setVisible(0, 1, false);

    table.setColumnWidth(0, 167);

    // Table data
    dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);

    table.setScrollPolicy(ScrollPolicy.BOTH);

    initWidget(table);
}