flexTable.setCellSpacing(0); flexTable.setCellPadding(0); flexTable.setHeight("100%"); topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
public void setScrollable(boolean scrollable) { if (!scrollable) { setStyleAttribute(scrollPanel.getElement(), "overflow", "hidden"); scrollPanel.setHeight("20px"); table.setHeight("20px"); } else { setStyleAttribute(scrollPanel.getElement(), "overflow", "scroll"); } }
/** * Prepares the selected value box for displaying. */ protected void prepareSelectedValue() { TextBox selectedValue = getSelectedValue(); selectedValue.setReadOnly(!isCustomTextAllowed()); selectedValue.setStyleName("selected-value"); if(getHeight() != null) { getLayout().setHeight("100%"); getLayout().getCellFormatter().setHeight(0, 0, "100%"); getSelectedValue().setHeight("100%"); } if (getWidth() != null) { getLayout().setWidth("100%"); getLayout().getCellFormatter().setWidth(0, 0, "100%"); getSelectedValue().setWidth("100%"); } }