List of usage examples for com.google.gwt.dom.client BaseElement getHref
public String getHref()
From source file:org.nuxeo.ecm.platform.annotations.gwt.client.AnnotationApplication.java
License:Apache License
private static void buildApplication() { AnnotationConfiguration annotationConfiguration = AnnotationConfiguration.getInstance(); Document document = Document.get(); BaseElement baseElement = document.getElementsByTagName("base").getItem(0).cast(); registerBaseHref(baseElement.getHref()); registerAnnoteaServerUrl(annotationConfiguration.getAnnoteaServerUrl()); registerDocUrl(annotationConfiguration.getDocumentUrl()); registerDateFormatPattern(annotationConfiguration.getDateFormatPattern()); notifyAnnoteaServerUrlRegistered();//from w ww .ja v a 2s . c om applicationPanel.setStyleName("annotationApplicationPanel"); applicationPanel.setWidth("100%"); RootPanel display = RootPanel.get("display"); String height = Integer.toString(display.getOffsetHeight()) + "px"; applicationPanel.setHeight(height); applicationPanel.setHorizontalAlignment(DockPanel.ALIGN_LEFT); PREVIEW_FRAME = new Frame(annotationConfiguration.getPreviewUrl()); PREVIEW_FRAME.setStyleName("previewFrame"); PREVIEW_FRAME.setWidth("100%"); PREVIEW_FRAME.setHeight(height); applicationPanel.add(PREVIEW_FRAME, DockPanel.CENTER); applicationPanel.setCellWidth(PREVIEW_FRAME, "100%"); AnnotationController controller = new AnnotationController(WEB_CONFIGURATION, false); AnnotationManagerPanel annotationManagerPanel = new AnnotationManagerPanel(controller, WEB_CONFIGURATION); controller.addModelChangeListener(annotationManagerPanel); HideManagerButton hideManagerButton = new HideManagerButton(controller, annotationManagerPanel, PREVIEW_FRAME); annotationManagerPanel.setWidth("250px"); applicationPanel.add(annotationManagerPanel, DockPanel.WEST); hideManagerButton.setHeight(height); applicationPanel.add(hideManagerButton, DockPanel.WEST); display.add(applicationPanel); controller.loadAnnotations(); }