Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWT-724: Allow configuration and display for disclaimer in layer info… #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.TitleOrientation;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.HTMLPane;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Img;
Expand Down Expand Up @@ -150,6 +151,10 @@ public void onClick(ClickEvent event) {
});
infoLayout.addMember(legendInfo);
}
if (eli.getDisclaimer() != null) {
HTMLFlow htmlFlow = new HTMLFlow(eli.getDisclaimer());
infoLayout.addMember(htmlFlow);
}
} else if (layer instanceof VectorLayer) {
IButton legendInfo = new IButton(vectorLayer != null ? MESSAGES.layerActionsShowLegendAndFields()
: MESSAGES.layerActionsShowLegend());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class ClientExtraLayerInfo implements ClientWidgetInfo {

private String date;

private String disclaimer;

/**
* Get the source, or owner of the data in this layer.
*
Expand Down Expand Up @@ -168,4 +170,22 @@ public void setLegendUrlTitle(String legendUrlTitle) {
public String getLegendUrlTitle() {
return legendUrlTitle;
}

/**
* Get the disclaimer (html) that is displayed in the layerinfo widget.
*
* @return the disclaimer
*/
public String getDisclaimer() {
return disclaimer;
}

/**
* Set the disclaimer (html) that is displayed in the layerinfo widget.
*
* @param disclaimer the disclaimer
*/
public void setDisclaimer(String disclaimer) {
this.disclaimer = disclaimer;
}
}