Java Code Examples for com.google.gwt.dom.client.IFrameElement#as()

The following examples show how to use com.google.gwt.dom.client.IFrameElement#as() . 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: RichTextToolbar.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/** Constructor of the Toolbar **/
public RichTextToolbar(final RichTextArea richtext) {
	//Initialize the main-panel
	outer = new VerticalPanel();

	//Initialize the two inner panels
	topPanel = new HorizontalPanel();
	bottomPanel = new HorizontalPanel();
	topPanel.setStyleName("RichTextToolbar");
	bottomPanel.setStyleName("RichTextToolbar");

	//Save the reference to the RichText area we refer to and get the interfaces to the stylings

	styleText = richtext;
	styleTextFormatter = styleText.getFormatter();

	//Set some graphical options, so this toolbar looks how we like it.
	topPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
	bottomPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);

	//Add the two inner panels to the main panel
	outer.add(topPanel);
	outer.add(bottomPanel);

	//Some graphical stuff to the main panel and the initialisation of the new widget
	outer.setStyleName("RichTextToolbar");
	initWidget(outer);

	//
	evHandler = new EventHandler();

	//Add KeyUp and Click-Handler to the RichText, so that we can actualize the toolbar if neccessary
	styleText.addKeyUpHandler(evHandler);
	styleText.addClickHandler(evHandler);

	// Changing styles
	IFrameElement e = IFrameElement.as(richtext.getElement());
	e.setSrc("iframe_richtext.html");
	e.setFrameBorder(0); // removing frame border

	richTextPopup = new RichTextPopup(this);
	richTextPopup.setWidth("300px");
	richTextPopup.setHeight("50px");
	richTextPopup.setStyleName("okm-Popup");

	//Now lets fill the new toolbar with life
	buildTools();
}
 
Example 2
Source File: GadgetWidgetUi.java    From swellrt with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the gadget iframe element.
 *
 * @return Gadget iframe element.
 */
public IFrameElement getIframeElement() {
  return IFrameElement.as(gadgetIframe.getElement());
}
 
Example 3
Source File: GadgetWidgetUi.java    From incubator-retired-wave with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the gadget iframe element.
 *
 * @return Gadget iframe element.
 */
public IFrameElement getIframeElement() {
  return IFrameElement.as(gadgetIframe.getElement());
}