Java Code Examples for com.google.gwt.user.client.ui.HorizontalPanel#addStyleName()
The following examples show how to use
com.google.gwt.user.client.ui.HorizontalPanel#addStyleName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 6 votes |
private void createSeparatorPanel() { separatorPanel = new HorizontalPanel(); separatorPanel.setSpacing(1); separatorPanel.setWidth("100%"); separatorPanel.addStyleName(ThemeStyles.get().style().borderTop()); separatorPanel.addStyleName(ThemeStyles.get().style().borderBottom()); separatorPanel .setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); separatorPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); separatorPanel.add(new Label(UIMessages.INSTANCE .separator(DEFAULT_CSV_SEPARATOR))); separatorTextField = new TextField(); separatorTextField.setText(DEFAULT_CSV_SEPARATOR); separatorTextField.setWidth(30); separatorPanel.add(separatorTextField); }
Example 2
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private void getCSVComboPanel() { comboPanel = new HorizontalPanel(); comboPanel.setWidth("100%"); comboPanel.addStyleName(ThemeStyles.get().style().borderTop()); comboPanel.setSpacing(5); comboPanel.setVisible(false); comboPanel.add(new Label(UIMessages.INSTANCE.bindableAttribute())); comboPanel.add(csvAttributeCombo); }
Example 3
Source File: JoinDataDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private void createLayerAttributeComboPanel() { layerAttributeComboPanel = new HorizontalPanel(); layerAttributeComboPanel.setWidth("100%"); layerAttributeComboPanel.addStyleName(ThemeStyles.get().style() .borderBottom()); layerAttributeComboPanel.setSpacing(5); layerAttributeComboPanel.setVisible(false); layerAttributeComboPanel.add(new Label(UIMessages.INSTANCE .layerSchemaToolText())); layerAttributeComboPanel.add(layerAttributeCombo); }
Example 4
Source File: AttributeSearchDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private HorizontalPanel createAttrPanel(){ HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); hPanel.addStyleName(ThemeStyles.get().style().borderBottom()); hPanel.addStyleName(ThemeStyles.get().style().borderTop()); hPanel.add(getAttrCombo()); hPanel.add(getAttrValuePanel()); return hPanel; }
Example 5
Source File: GeneralView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { columns = new Column[]{ new TextColumn("Status", "OFF"), new NumberColumn("average-commit-time", "Average Commit Time"), new NumberColumn("number-of-inflight-transactions", "Inflight Transactions"), new NumberColumn("number-of-nested-transactions", "Nested Transactions") }; grid = new Grid(columns.length, 2); grid.addStyleName("metric-grid"); for (int row = 0; row < columns.length; ++row) { grid.getCellFormatter().addStyleName(row, 0, "nominal"); grid.getCellFormatter().addStyleName(row, 1, "numerical"); } grid.setText(0, 0, "Status"); HorizontalPanel header = new HorizontalPanel(); header.addStyleName("fill-layout-width"); header.add(new HTML("<h3 class='metric-label'>General Statistics</h3>")); final HelpSystem.AddressCallback addressCallback = () -> { ModelNode address = new ModelNode(); address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get()); address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "transactions"); return address; }; MetricHelpPanel helpPanel = new MetricHelpPanel(addressCallback, this.columns); VerticalPanel metricsPanel = new VerticalPanel(); metricsPanel.addStyleName("metric-container"); metricsPanel.add(header); metricsPanel.add(helpPanel.asWidget()); metricsPanel.add(grid); return metricsPanel.asWidget(); }
Example 6
Source File: HistoryPopupPanel.java From EasyML with Apache License 2.0 | 4 votes |
/** * UI Initialization */ protected void init() { this.setSize("850px", "400px"); this.setGlassEnabled(true); this.setModal(true); desc.setText(desc.getText()+" Job Id - "+bdaJobId); closeButton.setSize("10px", "10px"); closeButton.setStyleName("closebtn"); VerticalPanel topPanel = new VerticalPanel(); //Outermost vertical panel topPanel.add(closeButton); topPanel.setCellHeight(closeButton, "13px"); topPanel.setStyleName("vpanel"); desc.setStyleName("popupTitle"); topPanel.add(desc); topPanel.setCellHeight(desc, "30px"); HorizontalPanel optPanel = new HorizontalPanel(); //Operation panel(include search, batch delete.etc) optPanel.addStyleName("run-history-optPanel"); DateTimeFormat pickerFormat = DateTimeFormat.getFormat("yyyy-MM-dd"); startTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat)); startTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup"); endTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat)); endTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup"); searchBtn.removeStyleName("gwt-Button"); searchBtn.addStyleName("run-history-search-button"); //The initial time is set to 2016-1-1 endTime = new Date(); DateTimeFormat tmpFormatter = DateTimeFormat.getFormat("yyyy-MM-dd"); startTime = tmpFormatter.parse("2016-01-01"); selectAllChkBox.setVisible(false); batchDelBtn.removeStyleName("gwt-Button"); batchDelBtn.addStyleName("run-history-batch-del-button"); optPanel.add(startTimeLabel); optPanel.add(startTimeBox); optPanel.add(endTimeLabel); optPanel.add(endTimeBox); optPanel.add(searchBtn); if(isExample && !AppController.power.equals("111")) //Example job only can be deleted by administrator privileges {} else optPanel.add(batchDelBtn); optPanel.add(selectAllChkBox); runHistoryGrid.addStyleName("run-history-table"); //Data view runHistoryGrid.addStyleName("table-striped"); runHistoryGrid.addStyleName("table-hover"); runHistoryGrid.resize(rowNum, colNum); for(int i=0;i<colNum;i++) { runHistoryGrid.setText(0, i, columns[i]); } initGridData(); topPanel.add(optPanel); topPanel.add(runHistoryGrid); VerticalPanel bottomPanel = new VerticalPanel(); //Paging control bottomPanel.add(pageGrid); bottomPanel.addStyleName("run-history-bottomPanel"); VerticalPanel panel = new VerticalPanel(); panel.add(topPanel); panel.add(bottomPanel); this.add(panel); this.setStyleName("loading_container"); }
Example 7
Source File: HomePage.java From sc2gears with Apache License 2.0 | 4 votes |
@Override public void buildGUI() { add( ClientUtils.createVerticalEmptyWidget( 30 ) ); final HorizontalPanel greetingsPanel = new HorizontalPanel(); add( greetingsPanel ); if ( sharedApiAccountUserInfo == null ) { // Greeting if ( apiUserInfo.getLastVisit() == null ) { greetingsPanel.add( new Label( "Welcome " ) ); greetingsPanel.add( ClientUtils.createHorizontalEmptyWidget( 5 ) ); greetingsPanel.add( ClientUtils.styledWidget( new Label( apiUserInfo.getUserName() ), "strong" ) ); greetingsPanel.add( new Label( "!" ) ); } else { greetingsPanel.add( new Label( "Welcome back" ) ); greetingsPanel.add( ClientUtils.createHorizontalEmptyWidget( 5 ) ); greetingsPanel.add( ClientUtils.styledWidget( new Label( apiUserInfo.getUserName() ), "strong" ) ); greetingsPanel.add( new Label( "! Your last visit was at:" ) ); greetingsPanel.add( ClientUtils.createHorizontalEmptyWidget( 5 ) ); greetingsPanel.add( ClientUtils.createTimestampWidget( apiUserInfo.getLastVisit() ) ); } } else { if ( sharedApiAccountUserInfo.isHasApiAccount() ) greetingsPanel.add( new Label( "You are now viewing the" ) ); else greetingsPanel.add( new Label( "You do NOT have access to the" ) ); greetingsPanel.add( ClientUtils.createHorizontalEmptyWidget( 9 ) ); greetingsPanel.add( ClientUtils.styledWidget( new Label( sharedApiAccountUserInfo.getSharedApiAccount() ), "strong" ) ); greetingsPanel.add( ClientUtils.createHorizontalEmptyWidget( 9 ) ); greetingsPanel.add( new Label( "API account!" ) ); } // Replay parser engine version if ( apiUserInfo.getRepParserEngineVer() != null ) { add( ClientUtils.createVerticalEmptyWidget( 30 ) ); final HorizontalPanel rowPanel = new HorizontalPanel(); rowPanel.add( new Label( "Replay parser engine version:" ) ); rowPanel.add( ClientUtils.createHorizontalEmptyWidget( 5 ) ); rowPanel.add( ClientUtils.styledWidget( new Label( apiUserInfo.getRepParserEngineVer() ), "strong" ) ); add( rowPanel ); } // Parsing service tester page add( ClientUtils.createVerticalEmptyWidget( 30 ) ); add( new Anchor( "Parsing Service Tester page", "/parsing_service_tester.html", "_blank" ) ); add( ClientUtils.createVerticalEmptyWidget( 70 ) ); // Footer final HorizontalPanel linksPanel = new HorizontalPanel(); linksPanel.setWidth( "500px" ); DOM.setStyleAttribute( linksPanel.getElement(), "padding", "2px" ); DOM.setStyleAttribute( linksPanel.getElement(), "borderTop", "1px solid #555555" ); linksPanel.addStyleName( "noWrap" ); linksPanel.add( new Anchor( "About the Service", "https://sites.google.com/site/sc2gears/parsing-service", "_blank" ) ); linksPanel.add( ClientUtils.createHorizontalEmptyWidget( 10 ) ); linksPanel.add( new Anchor( "Terms of Service", "https://sites.google.com/site/sc2gears/parsing-service#TOC-Terms-of-Service", "_blank" ) ); linksPanel.add( ClientUtils.createHorizontalEmptyWidget( 10 ) ); linksPanel.add( new Anchor( "Privacy Policy", "https://sites.google.com/site/sc2gears/parsing-service#TOC-Privacy-Policy", "_blank" ) ); linksPanel.add( ClientUtils.createHorizontalEmptyWidget( 15 ) ); final Label lastLabel = new Label( "© András Belicza, 2011-2014, Icons: Fugue" ); DOM.setStyleAttribute( lastLabel.getElement(), "color", "#555555" ); DOM.setStyleAttribute( lastLabel.getElement(), "paddingTop", "3px" ); linksPanel.add( lastLabel ); linksPanel.setCellWidth( lastLabel, "100%" ); linksPanel.setCellHorizontalAlignment( lastLabel, HasHorizontalAlignment.ALIGN_RIGHT ); for ( int i = linksPanel.getWidgetCount() - 1; i >= 0; i-- ) DOM.setStyleAttribute( linksPanel.getWidget( i ).getElement(), "fontSize", "80%" ); add( linksPanel ); }
Example 8
Source File: BulletGraphView.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public Widget asWidget() { VerticalPanel desc = new VerticalPanel(); desc.addStyleName("metric-container"); if(embeddedUse) desc.add(new HTML("<h3 class='metric-label-embedded'>" + title + "</h3>")); else desc.add(new HTML("<h3 class='metric-label'>" + title + "</h3>")); container = new HorizontalPanel(); container.setStyleName("fill-layout-width"); container.addStyleName("metric-panel"); grid = new Grid(columns.length, 2); grid.addStyleName("metric-grid"); // format for (int row = 0; row < columns.length; ++row) { grid.getCellFormatter().addStyleName(row, 0, "nominal"); grid.getCellFormatter().addStyleName(row, 1, "numerical"); } int baselineIndex = getBaseLineIndex(); if(baselineIndex>=0) grid.getRowFormatter().addStyleName(baselineIndex, "baseline"); // init for(int i=0; i<columns.length;i++) { grid.setText(i, 0, columns[i].label); grid.setText(i, 1, "0"); } container.add(grid); ProtovisWidget graphWidget = new ProtovisWidget(); graphWidget.initPVPanel(); vis = createVisualization(graphWidget); Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override public void execute() { renderDefault(); // the 'empty' display } }); if (address != null) { MetricHelpPanel helpPanel = new MetricHelpPanel(address, this.columns); desc.add(helpPanel.asWidget()); } container.add(graphWidget); graphWidget.getElement().getParentElement().setAttribute("align", "center"); graphWidget.getElement().getParentElement().setAttribute("width", "80%"); desc.add(container); return desc; }