@Override public void setPlatforms(List<Platform> platforms) { for (int i=0;i<platforms.size();i++) { Platform platform = platforms.get(i); Image image = new Image(Utils.getPlatformIcon(platform)); image.setTitle(Utils.getPlatformText(platform)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getPlatformText(platform)); platformsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); platformsPanel.add(image); platformsPanel.setCellWidth(image, "32px"); platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); platformsPanel.add(label); if (i < platforms.size()-1) { label.getElement().getStyle().setPaddingRight(10, Unit.PX); } label.getElement().getStyle().setPaddingLeft(8, Unit.PX); } }
@Override public void setFeatures(List<Feature> features) { for (int i=0;i<features.size();i++) { Feature feature = features.get(i); Image image = new Image(Utils.getFeatureIcon(feature)); image.setTitle(Utils.getFeatureText(feature)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getFeatureText(feature)); featuresPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); featuresPanel.add(image); featuresPanel.setCellWidth(image, "32px"); featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); featuresPanel.add(label); if (i < features.size()-1) { label.getElement().getStyle().setPaddingRight(10, Unit.PX); } label.getElement().getStyle().setPaddingLeft(8, Unit.PX); } }
@Override public void setSdkLanguages(List<SdkLanguage> sdkLanguages) { for (int i=0;i<sdkLanguages.size();i++) { SdkLanguage sdkLanguage = sdkLanguages.get(i); Image image = new Image(Utils.getSdkLanguageIcon(sdkLanguage)); image.setTitle(Utils.getSdkLanguageText(sdkLanguage)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getSdkLanguageText(sdkLanguage)); sdkLanguagesPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); sdkLanguagesPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); sdkLanguagesPanel.add(image); sdkLanguagesPanel.setCellWidth(image, "32px"); sdkLanguagesPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); sdkLanguagesPanel.add(label); if (i < sdkLanguages.size()-1) { label.getElement().getStyle().setPaddingRight(10, Unit.PX); } label.getElement().getStyle().setPaddingLeft(8, Unit.PX); } }
public NullableCheckBox(Element elem) { super(elem); inputElem = InputElement.as(elem); inputElem.setPropertyBoolean("indeterminate", true); inputElem.getStyle().setVerticalAlign(VerticalAlign.MIDDLE); anchor.getStyle().setDisplay(Style.Display.INLINE_BLOCK); anchor.getStyle().setPosition(Style.Position.RELATIVE); anchor.getStyle().setHeight(100, Style.Unit.PCT); anchor.getStyle().setVerticalAlign(Style.VerticalAlign.MIDDLE); getElement().appendChild(anchor); }
public Object addGroup( String display, String name, Object parent ) { int row = display != null ? table.getRowCount() : -1; // create the new group GroupInfo parentInfo = (GroupInfo) parent; GroupInfo info = new GroupInfo( name, parentInfo, row ); // display the new group if( display != null && row >= 0 ) { table.setHTML( row, 0, display ); table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX ); table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD ); } return info; }
public Object addField( String display, String name, FieldType fieldType, Widget fieldWidget, Object parent ) { int row = table.getRowCount(); // create the new field GroupInfo parentInfo = (GroupInfo) parent; FieldInfo info = new FieldInfo( name, parentInfo, row, fieldType, fieldWidget ); // Display the new field if( display != null ) { HTMLStream stream = new HTMLStream(); stream.addRight( new HTML( display ) ); stream.clFl(); table.setWidget( row, 0, stream ); } table.setWidget( row, 1, info.widget ); table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 1 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD ); return info; }
private void updateTableRow(final PlayerErrorInfo item, int row) { bodyFlexTable.setText(row, 0, item.getTimestamp()); bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setVerticalAlign(VerticalAlign.TOP); bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setLineHeight(16, Unit.PX); String errorString = // Integer.toString(item.getStatusCode()) + " - " + item.getErrorMessage(); if (item.getStatusCode() != 0 && (errorRow == -1 || (item.getStatusCode() == 1 && row == 0))) { errorString += " Click <a href='" + item.getHelpLink() + "' target='_blank'>here</a> for details on this error."; } bodyFlexTable.setHTML(row, 1, errorString); // if (errorRow == -1 || (item.getStatusCode() == 1 && row == 0)) { // bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setColor("red"); // } bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setWhiteSpace(WhiteSpace.NORMAL); bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setLineHeight(16, Unit.PX); }
private void setVerticalAlignment(VerticalAlign align) { verticalAlignment = HasVerticalAlignment.class.getName(); switch (align) { case TOP: verticalAlignment += ".ALIGN_TOP"; break; case BOTTOM: verticalAlignment += ".ALIGN_BOTTOM"; break; case MIDDLE: default: verticalAlignment += ".ALIGN_MIDDLE"; break; } }
public void setImage(Image img) { if (iImageElement != null) iAnchor.removeChild(iImageElement); if (img == null) return; iImage = img; iImageElement = img.getElement(); iImageElement.getStyle().setVerticalAlign(VerticalAlign.MIDDLE); iAnchor.insertFirst(iImageElement); }
private HorizontalPanel getHorizontalPanel() { final HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); return horizontalGroup; }
private HorizontalPanel getMapGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(layerManagerTool); horizontalGroup.add(layerCatalogTool); horizontalGroup.add(basicToolBarTool); return horizontalGroup; }
private HorizontalPanel getViewGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(w3wTool); horizontalGroup.add(mapToolTipTool); horizontalGroup.add(graticuleTool); return horizontalGroup; }
private HorizontalPanel getExtentGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(currentExtentTool); horizontalGroup.add(customExtentTool); horizontalGroup.add(lockCurrentExtentTool); return horizontalGroup; }
private HorizontalPanel getProjectGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(openProjectTool); horizontalGroup.add(saveProjectTool); horizontalGroup.add(infoProjectTool); return horizontalGroup; }
private HorizontalPanel getLayerGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(addLayerTool); horizontalGroup.add(layerInfoTool); horizontalGroup.add(changeStyleTool); return horizontalGroup; }
private HorizontalPanel getLayer2GroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.add(searchAttributeTool); horizontalGroup.add(snappingTool); horizontalGroup.add(geometricAnalysisTool); return horizontalGroup; }
private HorizontalPanel getMeasureToolGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(measureAreaTool); horizontalGroup.add(measureTool); horizontalGroup.add(measureElementTool); return horizontalGroup; }
private HorizontalPanel getZoomToolGroupTools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(zoomPrev); horizontalGroup.add(zoomNext); horizontalGroup.add(zoomBoxTool); return horizontalGroup; }
private HorizontalPanel getZoomToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(zoomIn); horizontalGroup.add(zoomOut); horizontalGroup.add(zoomToSeletionTool); return horizontalGroup; }
private Widget getSaveToolGroup1Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(saveLayerTool); horizontalGroup.add(exportLayerTool); //horizontalGroup.add(saveProjectTool); return horizontalGroup; }
private HorizontalPanel getDrawToolGroup1Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(polygonTool); horizontalGroup.add(holePolygonTool); horizontalGroup.add(regularPolygonTool); return horizontalGroup; }
private HorizontalPanel getDrawToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(lineStringTool); horizontalGroup.add(pointTool); horizontalGroup.add(circleTool); return horizontalGroup; }
private HorizontalPanel getEditionToolGroup1Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(reshapeTool); horizontalGroup.add(resizeTool); horizontalGroup.add(rotateTool); return horizontalGroup; }
private HorizontalPanel getEditionToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(dragTool); horizontalGroup.add(deleteTool); horizontalGroup.add(copyElementTool); return horizontalGroup; }
private HorizontalPanel getSpatialToolGroup1Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(unionTool); horizontalGroup.add(divideTool); horizontalGroup.add(geometricValidationTool); return horizontalGroup; }
private HorizontalPanel getSpatialToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle() .setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(bufferTool); horizontalGroup.add(envelopeTool); horizontalGroup.add(centroidTool); return horizontalGroup; }
@Override public void setSdkLanguage(SdkLanguage sdkLanguage) { Image image = new Image(Utils.getSdkLanguageIcon(sdkLanguage)); image.setTitle(Utils.getSdkLanguageText(sdkLanguage)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getSdkLanguageText(sdkLanguage)); sdkLanguagePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); sdkLanguagePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); sdkLanguagePanel.add(image); sdkLanguagePanel.setCellWidth(image, "32px"); sdkLanguagePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); sdkLanguagePanel.add(label); label.getElement().getStyle().setPaddingLeft(8, Unit.PX); }
@Override public void setComplexity(Complexity complexity) { Image image = new Image(Utils.getFilterComplexityIcon(complexity)); image.setTitle(Utils.getComplexityText(complexity)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getComplexityText(complexity)); complexityPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); complexityPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); complexityPanel.add(image); complexityPanel.setCellWidth(image, "32px"); complexityPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); complexityPanel.add(label); label.getElement().getStyle().setPaddingLeft(8, Unit.PX); }
@Override public void setComplexity(Complexity complexity) { Image image = new Image(Utils.getFilterComplexityIcon(complexity)); image.setTitle(Utils.getComplexityText(complexity)); image.getElement().getStyle().setVerticalAlign(Style.VerticalAlign.MIDDLE); Label label = new Label(Utils.getComplexityText(complexity)); complexityPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); complexityPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); complexityPanel.add(image); complexityPanel.setCellWidth(image, "32px"); complexityPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); complexityPanel.add(label); label.getElement().getStyle().setPaddingLeft(8, Style.Unit.PX); }
private void initComp() { buttonImage = new Image(REMOVE_BUTTON_IMAGE); buttonImage.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); removeButton = new Anchor(); removeButton.addClickHandler(this); removeButton.setPixelSize(12, 12); removeButton.getElement().appendChild(buttonImage.getElement()); fieldsList = new ListBox(); fieldsList.addChangeHandler(this); fieldsList.setPixelSize(100, 20); for (Field field : Field.values()) { fieldsList.addItem(field.getName()); } actionList = new ListBox(); actionList.setPixelSize(140, 20); textBox = new TextBox(); textBox.setPixelSize(140, 12); priorityList = new ListBox(); priorityList.setPixelSize(140, 20); for (JobPriority priority : JobPriority.values()) { priorityList.addItem(priority.name()); } stateList = new ListBox(); stateList.setPixelSize(140, 20); for (JobStatus status : JobStatus.values()) { stateList.addItem(status.name()); } valuePanel = new SimplePanel(); valuePanel.setPixelSize(150, 25); setActionsAccordingToSelectedField(); }