protected void appendToolbarWidget(Widget widget) { buttonsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); buttonsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); buttonsPanel.add(widget); buttonsPanel.setCellHeight(widget, "100%"); }
final HorizontalPanel hp = new HorizontalPanel(); final Button saveButton = new Button("save"); final Button cancelButton = new Button("cancel"); // just to see the bounds of the HorizontalPanel hp.setWidth("600px"); hp.setBorderWidth(2); // It only applies to widgets added after this property is set. hp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); hp.add(saveButton); hp.add(cancelButton); RootPanel.get().add(hp);
/** * Instantiates a new EcfVersionViewImpl. */ public EcfVersionViewImpl(boolean editable) { super(true); this.addEcButton = new ImageTextButton(Utils.resources.plus(), addButtonEventClassString()); addEcButton.setVisible(editable); addButton.setVisible(editable); supportPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); supportPanel.setWidth("300px"); supportPanel.add(addEcButton); }
protected void constructTopPanel() { FlowPanel panel = new FlowPanel(); panel.setSize("100%", "100%"); topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); topPanel.add(panel); backButtonPanel.addStyleName(Utils.kaaAdminStyle.bAppPaddedPanel()); backButtonPanel.setVisible(false); horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); horizontalPanel.add(backButtonPanel); backButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); backButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); backButtonPanel.add(backButton); horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); horizontalPanel.add(titleLabel); buttonsPanel.setHeight("100%"); buttonsPanel.addStyleName(Utils.avroUiStyle.buttonsPanel()); horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); horizontalPanel.add(buttonsPanel); buttonsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); buttonsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); buttonsPanel.add(saveButton);
flexTable.setCellPadding(0); flexTable.setHeight("100%"); topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); topPanel.add(flexTable); backButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); backButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); backButtonPanel.add(backButton); firstRowPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); firstRowPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); verticalPanel.add(firstRowPanel); secondRowPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); secondRowPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
super(false); supportPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); supportPanel.setWidth("1000px");
public StylishDropDown(Widget widget){ titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLayout.add(widget); init(); }
public void initialise(Widget widget) { titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLayout.add(widget); init(); }
HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setWidth("100%"); Button b1 = new Button("1"); Button b2 = new Button("2"); Button b3 = new Button("3"); hPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); hPanel.add(b1); hPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); hPanel.add(b2); hPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); hPanel.add(b3);
public KSThinTitleBar(String text){ titlePanel.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER); titleLabel = new Label(text, false); titlePanel.add(titleLabel); titlePanel.addStyleName("KS-Popup-Header"); this.initWidget(titlePanel); }
public StylishDropDown(String title){ titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLabel.setText(title); titleLayout.add(titleLabel); titleLayout.add(titleImage); init(); }
public void initialise(String title) { titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLabel.setText(title); titleLayout.add(titleLabel); titleLayout.add(titleImage); init(); }
public void initialise(String title, Image image, MenuImageLocation imgLoc) { titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLabel.setText(title); titleImage = image; titleLayout.add(titleLabel); if (imgLoc == MenuImageLocation.RIGHT) { titleLayout.add(titleImage); } else { titleLayout.insert(titleImage, 0); } menu.setImageLocation(imgLoc); init(); }
public StylishDropDown(String title, Image image, MenuImageLocation imgLoc){ titleLayout.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); titleLabel.setText(title); titleImage = image; titleLayout.add(titleLabel); if(imgLoc == MenuImageLocation.RIGHT){ titleLayout.add(titleImage); } else{ titleLayout.insert(titleImage, 0); } menu.setImageLocation(imgLoc); init(); }
Frame frame=new Frame("Button Frame"); Button button = new Button("Submit"); HorizontalPanel hp = new HorizontalPanel(); hp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); hp.setWidth(200); hp.add(button); frame.add(hp); frame.setSize(200,100); frame.setVisible(true);
private HeaderSorter( final DynamicColumn<BaseColumn> col ) { this.col = col; hp.setHorizontalAlignment( HorizontalPanel.ALIGN_CENTER ); hp.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE ); hp.setHeight( resources.rowHeaderSorterHeight() + "px" ); hp.setWidth( "100%" ); setIconImage(); add( hp ); // Ensure our icon is updated when the SortDirection changes col.addValueChangeHandler( new ValueChangeHandler<SortConfiguration>() { public void onValueChange( ValueChangeEvent<SortConfiguration> event ) { setIconImage(); } } ); }
private HeaderSorter( final DynamicColumn<TemplateDataColumn> col ) { this.col = col; hp.setHorizontalAlignment( HorizontalPanel.ALIGN_CENTER ); hp.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE ); hp.setHeight( resources.rowHeaderSorterHeight() + "px" ); hp.setWidth( "100%" ); setIconImage(); add( hp ); // Ensure our icon is updated when the SortDirection changes col.addValueChangeHandler( new ValueChangeHandler<SortConfiguration>() { public void onValueChange( ValueChangeEvent<SortConfiguration> event ) { setIconImage(); } } ); }
private HeaderSplitter() { hp.setHorizontalAlignment( HorizontalPanel.ALIGN_CENTER ); hp.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE ); hp.getElement().getStyle().setHeight( resources.rowHeaderSplitterHeight(), Unit.PX ); hp.setWidth( "100%" ); setIconImage(); hp.add( icon ); add( hp ); // Handle action addClickHandler( new ClickHandler() { public void onClick( ClickEvent event ) { if ( isCollapsed ) { showRow( 2 ); showRow( 3 ); } else { hideRow( 2 ); hideRow( 3 ); } isCollapsed = !isCollapsed; setIconImage(); } } ); }
private void addCreateFilterButton(final Command addfilterCommand) { HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setWidth("100%"); buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); Button createFilterButton = new Button(); createFilterButton.setText(CommonConstants.INSTANCE.Add_New_Filter()); createFilterButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { getFormValues(filterControlGroups); if (validateForm()) { addfilterCommand.execute(); refreshGrid(); cleanFormValues(filterControlGroups); tabAdd.showTab(); } } }); buttonPanel.add(createFilterButton); horizontalForm.add(buttonPanel); }
private void addCreateFilterButton(final Command addfilterCommand) { HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setWidth("100%"); buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); Button createFilterButton = new Button(); createFilterButton.setText(CommonConstants.INSTANCE.Add_New_Filter()); createFilterButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { getFormValues(filterControlGroups); if (validateForm()) { addfilterCommand.execute(); refreshGrid(); cleanFormValues(filterControlGroups); tabAdd.showTab(); } } }); buttonPanel.add(createFilterButton); horizontalForm.add(buttonPanel); }