@Inject
  public TransUnitsTableView(
      FilterViewConfirmationDisplay filterViewConfirmationDisplay, LoadingPanel loadingPanel) {
    this.filterViewConfirmationDisplay = filterViewConfirmationDisplay;
    this.loadingPanel = loadingPanel;
    initWidget(uiBinder.createAndBindUi(this));
    noContentLabel.setText(messages.noContent());
    noContentLabel.setStyleName("gamma");

    transUnitTable.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            HTMLTable.Cell cellForEvent = transUnitTable.getCellForEvent(event);
            if (cellForEvent != null) {
              selectRow(cellForEvent.getRowIndex());
            }
          }
        });
    transUnitTable.resize(0, 2);
    transUnitTable.getColumnFormatter().setWidth(0, "49%");
    transUnitTable.getColumnFormatter().setWidth(1, "51%");
    Window.addResizeHandler(
        new ResizeHandler() {
          @Override
          public void onResize(ResizeEvent event) {
            listener.refreshView();
          }
        });

    transUnitTable.ensureDebugId("transUnitTable");
  }
Esempio n. 2
0
 @Inject
 public TargetContentsView(
     Provider<ValidationMessagePanelView> validationMessagePanelViewProvider,
     TableEditorMessages messages) {
   validationPanel = validationMessagePanelViewProvider.get();
   rootPanel = binder.createAndBindUi(this);
   editorGrid.addStyleName("TableEditorCell-Target-Table");
   editorGrid.ensureDebugId("target-contents-grid");
   editorGrid.setWidth("100%");
   editors = Lists.newArrayList();
 }