VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setBorderWidth(1); mainPanel.getElement().getStyle().setBackgroundColor("white"); final HTML titleBar = new HTML("<center><b>Logging</b></center>"); mainPanel.add(titleBar); new WindowMoveHandler(titleBar); scrollPanel.setPixelSize(300, 200); HorizontalPanel bottomBar = new HorizontalPanel(); mainPanel.add(bottomBar); bottomBar.setWidth("100%"); bottomBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); final Button maxmin = new Button("Minimize"); bottomBar.add(maxmin); maxmin.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (maxmin.getText().equals("Minimize")) { new HTML("<div style='font-size:200%; line-height:75%'>\u21F2</div>"); resizeIcon.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); bottomBar.add(resizeIcon); new WindowResizeHandler(resizeIcon);
/** * Inserts a widget into the panel. If the Widget is already attached, it will * be moved to the requested index. * * @param child the widget to be added * @param text the text to be shown on its header * @param asHtml <code>true</code> to treat the specified text as HTML * @param headerSize the size of the header widget * @param beforeIndex the index before which it will be inserted */ public void insert( Widget child, @IsSafeHtml String text, boolean asHtml, double headerSize, int beforeIndex) { HTML contents = new HTML(); if (asHtml) { contents.setHTML(text); } else { contents.setText(text); } insert(child, contents, headerSize, beforeIndex); }
/** * Creates an HTML widget with the specified HTML contents and specifies a * direction estimator. * * @param html the new widget's SafeHtml contents * @param directionEstimator A DirectionEstimator object used for automatic * direction adjustment. For convenience, * {@link Label#DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public HTML(SafeHtml html, DirectionEstimator directionEstimator) { this(); setDirectionEstimator(directionEstimator); setHTML(html); }
getElement().getStyle().setZIndex( Integer.MAX_VALUE ); setGlassEnabled( true ); checkInCommentTextBox ); final HorizontalPanel hp = new HorizontalPanel(); final Button create = new Button( CommonConstants.INSTANCE.DeletePopupDelete() ); create.addClickHandler( new ClickHandler() { public void onClick( ClickEvent arg0 ) { hp.add( create ); final Button cancel = new Button( "Cancel" ); cancel.addClickHandler( new ClickHandler() { public void onClick( final ClickEvent arg0 ) { hp.add( new HTML( " " ) ); hp.add( cancel ); addAttribute( "",
HorizontalPanel pagingPanel = new HorizontalPanel(); initWidget(pagingPanel); pagingPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); pagingPanel.setWidth("100%"); setStyleName(resources.getStyle().css().defaultStyleName()); loadingImage = new Image("scrollTableLoading.gif"); loadingImage.setVisible(false); errorLabel = new HTML(); errorLabel.setStylePrimaryName("errorMessage"); buttonPanel = new HorizontalPanel();
private Widget getCharacteristics() { characteristicsPanel = new VerticalPanel(); characteristicsTables = new ArrayList<FlexTable>(); final HorizontalPanel toolbar = new HorizontalPanel(); btnAddCharacteristic = new Button(GuidedScoreCardConstants.INSTANCE.addCharacteristic(), new ClickHandler() { public void onClick(ClickEvent event) { addCharacteristic(null); } }); toolbar.add(btnAddCharacteristic); toolbar.setHeight("24"); characteristicsPanel.add(toolbar); final SimplePanel gapPanel = new SimplePanel(); gapPanel.add(new HTML("<br/>")); characteristicsPanel.add(gapPanel); return characteristicsPanel; }
dialogBox.setGlassEnabled(true); VerticalPanel dialogVPanel = new VerticalPanel(); dialogVPanel.addStyleName("dialogVPanel"); dialogVPanel.add(new HTML("<b>" + title + "</b>")); dialogVPanel.add(new HTML("<br><b>" + message + "</b><br><br>")); dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); HorizontalPanel buttons = new HorizontalPanel(); dialogVPanel.add(buttons); Button ok = new Button("OK"); buttons.add(ok); ok.addClickHandler(new ClickHandler() buttons.add(gap); Button cancel = new Button("Cancel"); buttons.add(cancel); cancel.addClickHandler(new ClickHandler()
private FlexTable render( final FixtureList rfl, final Scenario sc ) { FlexTable data = new FlexTable(); data.setWidget( i, 0, new Image( CommonImages.INSTANCE.warning() ) ); data.setWidget( i, 4, new HTML( TestScenarioConstants.INSTANCE.ActualResult( v.getActualResult().toString() ) ) ); data.getCellFormatter().addStyleName( i, data.setWidget( i, 0, new Image( TestScenarioImages.INSTANCE.testPassed() ) ); "e" ); final TextBox num = new TextBox(); ( (InputElement) num.getElement().cast() ).setSize( 5 ); HorizontalPanel h = new HorizontalPanel(); h.add( b ); h.add( num ); data.setWidget( i, 2,
public static void ask( String title, String message, final Callback callback ) { Button yes = new Button( "Yes" ); Button no = new Button( "No" ); HorizontalPanel buttonBar = UiBuilder.addIn( new HorizontalPanel(), yes, no ); final DialogBox db = DialogBoxBuilder.create( title, UiBuilder.addIn( new VerticalPanel(), new HTML( message ), buttonBar ) ); no.addClickHandler( new ClickHandler() { @Override public void onClick( ClickEvent event ) { db.hide(); } } ); yes.addClickHandler( new ClickHandler() { @Override public void onClick( ClickEvent event ) { db.hide(); callback.onConfirmedBox(); } } ); db.show( false ); } }
data.setWidget( i, 0, new Image( CommonImages.INSTANCE.warning() ) ); data.setWidget( i, 4, new HTML( TestScenarioConstants.INSTANCE.ActualResult(v.getActualResult().toString()) ) ); data.getCellFormatter().addStyleName( i, 4, "testErrorValue" ); //NON-NLS data.setWidget( i, 0, new Image( TestScenarioImages.INSTANCE.testPassed() ) ); HorizontalPanel h = new HorizontalPanel(); h.add( b ); h.add( num ); data.setWidget( i, 2, del.setAltText(TestScenarioConstants.INSTANCE.RemoveThisRuleExpectation()); del.setTitle(TestScenarioConstants.INSTANCE.RemoveThisRuleExpectation()); del.addClickHandler(new ClickHandler() {
HorizontalPanel infoPanel = new HorizontalPanel(); infoPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); infoPanel.setSpacing(5); infoPanel.setStyleName("bpm-header-right"); Image img = new Image(icons.user()); img.addClickHandler( new ClickHandler() popup.setAnimationEnabled(true); popup.setSize("240px", "130px"); HTML html = new HTML(sb.toString()); html.setStyleName("bpm-user-info-popup"); popup.add(html); Button btn = new Button("Logout", new ClickHandler()
public WSCellTitle(WSGrid.WSCell cell, String title) { this.cell = cell; label.setHTML(title); hPanel.add(label); hPanel.add(img); hPanel.setWidth("100%"); hPanel.setCellWidth(img, "16px"); img.setVisible(false); img.getElement().getStyle().setProperty("textAlign", "right"); }
private void setColor( String color ) { if( color == null ) html.getElement().getStyle().clearBackgroundColor(); else html.getElement().getStyle().setBackgroundColor( color ); html.getElement().setAttribute( "value", color ); GWT.log( "setValue : " + color ); }
public CitationPanel( final String eagleID) { popupPanel = new DecoratedPopupPanel(false, true); popupPanel.setStyleName( "citationPanel" ); contents = new VerticalPanel(); closeButton = new Button("Close", new ClickHandler() { @Override public void onClick(ClickEvent event) { popupPanel.hide(); isShowing = false; } }); // Build the message for the user and add it to the contents final StringBuilder sb = new StringBuilder(); sb.append("<p>eagle-i ID for this resource:</p><p>"); sb.append(eagleID).append("</p>"); sb.append("<p>Click <a href=").append( CITATION_URL ).append(" target=\"_blank\">here</a> for citation examples and more information.</p>"); message = new HTML( sb.toString() ); contents.add( message ); contents.add( closeButton ); contents.setCellHorizontalAlignment( closeButton, HasHorizontalAlignment.ALIGN_CENTER ); popupPanel.setWidget( contents ); popupPanel.center(); }
@Override protected int initDetailsTableImpl() { int row = -1; Label schemaLabel = new Label(Utils.constants.schemaVersion()); detailsTable.setWidget(++row, 0, schemaLabel); if (create) { schemaLabel.addStyleName(Utils.avroUiStyle.requiredField()); schema = new VersionListBox(); schema.setWidth("80px"); VerticalPanel panel = new VerticalPanel(); panel.setWidth("100%"); panel.add(schema); panel.add(new HTML(" ")); detailsTable.setWidget(row, 1, panel); schema.addValueChangeHandler(this); } else { schemaVersion = new KaaAdminSizedTextBox(-1, false); schemaVersion.setWidth("100%"); detailsTable.setWidget(row, 1, schemaVersion); } return row; }
@Override public void update(ActionEvent e) { panel.clear(); if (notifier.isNotified()) { Widget icon = new HTML(FontAwesome.EXCLAMATION_TRIANGLE); icon.getElement().getStyle().setMarginRight(5., Style.Unit.PX); panel.add(icon); Label headLabel = new Label(constant.lowDiskSpaceStatusBarMessage()); headLabel.ensureDebugId("statusBarProjectFreeDiskSpaceNotification"); Style headLabelStyle = headLabel.getElement().getStyle(); headLabelStyle.setMarginRight(5., Style.Unit.PX); panel.add(headLabel); } }
private Widget createWidget() { m_errorLabel.setText("hello"); Button ok = new Button("OK"); ok.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { m_layoutPanel.setHeight("125px"); m_caption.getElement().getStyle().setBackgroundColor("#ebebeb"); m_caption.setText("Error"); m_layoutPanel.addNorth(m_caption, 2); m_layoutPanel.addSouth(ok, 2);
ZoomBox() { // Set ourselves up as the event handler for all mouse-draggable events. graph.addMouseDownHandler(this); graph.addMouseUpHandler(this); // Also save the handlers on the actual zoom highlight box (this is in // case the cursor gets on the zoombox, so that it keeps responding // correctly). super.addMouseUpHandler(this); final Style style = super.getElement().getStyle(); style.setProperty("background", "red"); style.setProperty("filter", "alpha(opacity=50)"); style.setProperty("opacity", "0.4"); // Needed to make this object focusable. super.getElement().setAttribute("tabindex", "-1"); }