Example usage for org.apache.wicket.markup.html.link PopupSettings setTop

List of usage examples for org.apache.wicket.markup.html.link PopupSettings setTop

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.link PopupSettings setTop.

Prototype

public PopupSettings setTop(int popupPositionTop) 

Source Link

Document

Sets the top position of the popup window.

Usage

From source file:com.marintek.isis.wicket.ui.components.scalars.wicket.StandaloneValueAsPopupWicketBox.java

License:Apache License

private void buildGui() {
    PopupWicketBox fb;/*from  w w w  .j  a  v  a2  s . co m*/
    IModel fbModel;

    final ValueModel model = getModel();
    final ObjectAdapter boxAdapter = model.getObject();
    final Object boxObj = boxAdapter.getObject();
    PopupWicketBox box = (PopupWicketBox) boxObj;

    // Add that link as a popup
    PopupSettings popupSettings = new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS);
    popupSettings.setHeight(box.getHeight());
    popupSettings.setWidth(box.getWidth());
    popupSettings.setLeft(box.getLeft());
    popupSettings.setTop(box.getTop());
    popupSettings.setWindowName(box.getTitle());

    ExternalLink link = new ExternalLink("popupbox", box.getUrl(), "Pop Up").setPopupSettings(popupSettings);
    addOrReplace(link);
}