use of com.google.gwt.user.client.ui.Hyperlink in project perun by CESNET.
the class GetFacility method onFinished.
/**
* When successfully finishes
*
* @param jso javascript objects (array) returned from RPC
*/
public void onFinished(JavaScriptObject jso) {
this.facility = (Facility) jso;
session.getUiElements().setLogText("Loading facility for resource : " + this.resourceId + " finished.");
// creates the link
Hyperlink link = new Hyperlink(facility.getName(), session.getTabManager().getLinkForTab(new FacilityDetailTabItem(facility)));
facilityLinkWrapper.setWidget(link);
// custom on finished
events.onFinished(facility);
}
use of com.google.gwt.user.client.ui.Hyperlink in project gwt-test-utils by gwt-test-utils.
the class HyperlinkTest method constructor_Text_Token.
@Test
public void constructor_Text_Token() {
// When
Hyperlink link = new Hyperlink("test-text", "test-history-token");
// Then
assertThat(link.getText()).isEqualTo("test-text");
assertThat(link.getTargetHistoryToken()).isEqualTo("test-history-token");
}
use of com.google.gwt.user.client.ui.Hyperlink in project gwt-test-utils by gwt-test-utils.
the class HyperlinkTest method title.
@Test
public void title() {
// When
Hyperlink link = new Hyperlink();
// When
link.setTitle("title");
// Then
assertThat(link.getTitle()).isEqualTo("title");
}
use of com.google.gwt.user.client.ui.Hyperlink in project gwt-test-utils by gwt-test-utils.
the class HyperlinkTest method checkVisible.
@Test
public void checkVisible() {
// When
Hyperlink link = new Hyperlink();
// Preconditions
assertThat(link.isVisible()).isEqualTo(true);
// When
link.setVisible(false);
// Then
assertThat(link.isVisible()).isEqualTo(false);
}
use of com.google.gwt.user.client.ui.Hyperlink in project gwt-test-utils by gwt-test-utils.
the class HyperlinkTest method html.
@Test
public void html() {
// Given
Hyperlink link = new Hyperlink();
// When
link.setHTML("<h1>test</h1>");
// Then
assertThat(link.getHTML()).isEqualTo("<h1>test</h1>");
assertThat(link.getElement().getChild(0).getChildCount()).isEqualTo(1);
HeadingElement h1 = link.getElement().getChild(0).getChild(0).cast();
assertThat(h1.getTagName()).isEqualTo("H1");
assertThat(h1.getInnerText()).isEqualTo("test");
}
Aggregations