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

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

Introduction

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

Prototype

public PopupSettings setLeft(int popupPositionLeft) 

Source Link

Document

Sets the left 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  .  jav  a  2s  . c o 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);
}