List of usage examples for org.apache.wicket.markup.html.link PopupSettings setHeight
public PopupSettings setHeight(int popupHeight)
From source file:com.lili.WicketExampleHeader.java
License:Apache License
/** * Construct./* www . j av a2 s.c om*/ * * @param id * id of the component * @param exampleTitle * title of the example * @param page * The example page */ public WicketExampleHeader(String id, String exampleTitle, WebPage page) { super(id); // add(new DebugBar("debug")); // add(new Label("exampleTitle", exampleTitle)); // BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources", // SourcesPage.class, SourcesPage.generatePageParameters(page)); // BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources", // null,null); // add(link); PopupSettings settings = new PopupSettings("sources", PopupSettings.RESIZABLE); settings.setWidth(800); settings.setHeight(600); // link.setPopupSettings(settings); }
From source file:com.marintek.isis.wicket.ui.components.scalars.wicket.StandaloneValueAsPopupWicketBox.java
License:Apache License
private void buildGui() { PopupWicketBox fb;// w ww . j a v 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); }
From source file:com.mastfrog.acteur.wicket.borrowed.WicketExampleHeader.java
License:Apache License
/** * Construct.//from w ww .j a v a2 s .co m * * @param id * id of the component * @param exampleTitle * title of the example * @param page * The example page */ public WicketExampleHeader(String id, String exampleTitle, WebPage page) { super(id); // add(new DebugBar("debug")); add(new Label("exampleTitle", exampleTitle)); BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources", SourcesPage.class, SourcesPage.generatePageParameters(page)); add(link); PopupSettings settings = new PopupSettings("sources", PopupSettings.RESIZABLE); settings.setWidth(800); settings.setHeight(600); link.setPopupSettings(settings); }
From source file:com.senacor.wbs.web.project.ProjectListPanel.java
License:Apache License
public ProjectListPanel(final String id, final List<Project> projects) { super(id);//from w w w .jav a 2 s .c o m this.locale = getLocale(); SortableListDataProvider<Project> projectProvider = new SortableListDataProvider<Project>(projects) { @Override protected Locale getLocale() { return ProjectListPanel.this.getLocale(); } public IModel model(final Object object) { return new CompoundPropertyModel(object); } }; projectProvider.setSort("name", true); dataView = new DataView("projects", projectProvider, 4) { @Override protected void populateItem(final Item item) { Project project = (Project) item.getModelObject(); PageParameters pageParameters = new PageParameters(); pageParameters.put("projectId", project.getId()); item.add(new BookmarkablePageLink("tasks", ProjectDetailsPage.class, pageParameters) .add(new Label("id"))); item.add(new Label("kuerzel")); item.add(new Label("titel", project.getName())); item.add(new Label("budget")); item.add(new Label("costPerHour")); item.add(new Label("start")); item.add(new Label("ende")); item.add(new Label("state")); // Alternieren der Farbe zwischen geraden und // ungeraden Zeilen item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel() { @Override public Object getObject() { return (item.getIndex() % 2 == 1) ? "even" : "odd"; } })); } }; add(dataView); Form localeForm = new Form("localeForm"); ImageButton deButton = new ImageButton("langde", new ResourceReference(BaseWBSPage.class, "de.png")) { @Override public void onSubmit() { ProjectListPanel.this.locale = Locale.GERMANY; } }; localeForm.add(deButton); ImageButton usButton = new ImageButton("langus", new ResourceReference(BaseWBSPage.class, "us.png")) { @Override public void onSubmit() { ProjectListPanel.this.locale = Locale.US; } }; localeForm.add(usButton); add(localeForm); final IResourceStream pdfResourceStream = new AbstractResourceStreamWriter() { public void write(final OutputStream output) { Document document = new Document(); try { PdfWriter.getInstance(document, output); document.open(); // document.add(new // Paragraph("WBS-Projektliste")); // document.add(new Paragraph("")); PdfPTable table = new PdfPTable(new float[] { 1f, 1f, 2f, 1f }); PdfPCell cell = new PdfPCell(new Paragraph("WBS-Projektliste")); cell.setColspan(4); cell.setGrayFill(0.8f); table.addCell(cell); table.addCell("ID"); table.addCell("Krzel"); table.addCell("Titel"); table.addCell("Budget in PT"); for (Project project : projects) { table.addCell("" + project.getId()); table.addCell(project.getKuerzel()); table.addCell(project.getName()); table.addCell("" + project.getBudget()); } document.add(table); document.close(); } catch (DocumentException e) { throw new RuntimeException(e); } } public String getContentType() { return "application/pdf"; } }; WebResource projectsResource = new WebResource() { { setCacheable(false); } @Override public IResourceStream getResourceStream() { return pdfResourceStream; } @Override protected void setHeaders(final WebResponse response) { super.setHeaders(response); // response.setAttachmentHeader("projekte.pdf"); } }; WebResource projectsResourceDL = new WebResource() { { setCacheable(false); } @Override public IResourceStream getResourceStream() { return pdfResourceStream; } @Override protected void setHeaders(final WebResponse response) { super.setHeaders(response); response.setAttachmentHeader("projekte.pdf"); } }; ResourceLink pdfDownload = new ResourceLink("pdfDownload", projectsResourceDL); ResourceLink pdfPopup = new ResourceLink("pdfPopup", projectsResource); PopupSettings popupSettings = new PopupSettings(PopupSettings.STATUS_BAR); popupSettings.setWidth(500); popupSettings.setHeight(700); pdfPopup.setPopupSettings(popupSettings); Link pdfReqTarget = new Link("pdfReqTarget") { @Override public void onClick() { RequestCycle.get() .setRequestTarget(new ResourceStreamRequestTarget(pdfResourceStream, "projekte.pdf")); } }; add(pdfReqTarget); add(pdfDownload); add(pdfPopup); add(new OrderByBorder("orderByKuerzel", "kuerzel", projectProvider)); add(new OrderByBorder("orderByName", "name", projectProvider)); add(new OrderByBorder("orderByBudget", "budget", projectProvider)); add(new OrderByBorder("orderByCostPerHour", "costPerHour", projectProvider)); add(new OrderByBorder("orderByStart", "start", projectProvider)); add(new OrderByBorder("orderByEnde", "ende", projectProvider)); add(new OrderByBorder("orderByState", "state", projectProvider)); add(new PagingNavigator("projectsNavigator", dataView)); }
From source file:de.tudarmstadt.ukp.csniper.webapp.support.wicket.ThresholdLink.java
License:Apache License
public ThresholdLink(String aId, int aWidth, int aHeight) { super(aId);//from w ww.j a v a 2 s . co m PopupSettings ps = new PopupSettings(aId, PopupSettings.SCROLLBARS + PopupSettings.LOCATION_BAR); ps.setWidth(aWidth); ps.setHeight(aHeight); setPopupSettings(ps); setBody(new Model<String>( "<img src=\"images/questionmark.png\" alt=\"Explanation\" style=\"vertical-align:bottom\" />")); setEscapeModelStrings(false); }
From source file:de.twenty11.skysail.client.osgimonitor.wicket.pages.bundles.WicketExampleHeader.java
License:Apache License
/** * Construct.//from www .ja v a 2 s.c o m * * @param id * id of the component * @param exampleTitle * title of the example * @param page * The example page */ public WicketExampleHeader(String id, String exampleTitle, WebPage page) { super(id); //add(new DebugBar("debug")); add(new Label("exampleTitle", exampleTitle)); // BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources", // SourcesPage.class, SourcesPage.generatePageParameters(page)); //add(link); PopupSettings settings = new PopupSettings("sources", PopupSettings.RESIZABLE); settings.setWidth(800); settings.setHeight(600); //link.setPopupSettings(settings); }
From source file:jp.go.nict.langrid.management.web.view.page.language.component.form.panel.OtherLanguagePathPanel.java
License:Open Source License
/** * /* w w w .j ava 2 s .c om*/ * * @param componentId */ public OtherLanguagePathPanel(String componentId, String key) { super(componentId); remove(inputLanguageId); add(inputArea = new LanguagePathTextArea(inputAreaId)); PopupLink<LanguageInputFormPopupPage> pl; add(pl = new PopupLink<LanguageInputFormPopupPage>("inputFormLink", "", "", LanguageInputFormPopupPage.class) { private static final long serialVersionUID = 1L; }); PopupSettings ps = pl.getSettings(); ps.setHeight(370); metaKey = key; }
From source file:jp.go.nict.langrid.management.web.view.page.user.component.link.ExternalHomePageLink.java
License:Open Source License
/** * //from w w w . java 2s.com * */ public ExternalHomePageLink(String componentId, String url, String uniqueId) { super(componentId, url); PopupSettings settings = new PopupSettings(PageMap.forName(componentId.concat(uniqueId)), PopupSettings.SCROLLBARS | PopupSettings.RESIZABLE | PopupSettings.MENU_BAR | PopupSettings.LOCATION_BAR | PopupSettings.STATUS_BAR | PopupSettings.TOOL_BAR); settings.setHeight(HEIGHT); settings.setWidth(WIDTH); setPopupSettings(settings); add(createLabel(componentId, url).add(new AttributeAppender("title", new Model<String>(url), " "))); }
From source file:jp.go.nict.langrid.management.web.view.page.user.component.link.ExternalHomePageLink.java
License:Open Source License
/** * /*from w w w . ja v a 2 s .c om*/ * */ public ExternalHomePageLink(String componentId, String url, String uniqueId, int limit) { super(componentId, url); PopupSettings settings = new PopupSettings(PageMap.forName(componentId.concat(uniqueId)), PopupSettings.SCROLLBARS | PopupSettings.RESIZABLE | PopupSettings.MENU_BAR | PopupSettings.LOCATION_BAR | PopupSettings.STATUS_BAR | PopupSettings.TOOL_BAR); settings.setHeight(HEIGHT); settings.setWidth(WIDTH); setPopupSettings(settings); if (url == null || url.equals("")) { url = "-"; } add(createLabel(componentId, StringUtil.shortenString(url, limit)) .add(new AttributeAppender("title", new Model<String>(url), " "))); setEnabled(!(url == null || url.equals("") || url.equals("-"))); }
From source file:org.efaps.ui.wicket.components.menu.PopupItem.java
License:Apache License
/** * @param _wicketId Wicket id for this component * @param _model model for this component *//*from w w w .j av a 2 s. c om*/ public PopupItem(final String _wicketId, final IModel<UIMenuItem> _model) { super(_wicketId, _model); final PopupSettings popupsetting = new PopupSettings(); popupsetting.setHeight(_model.getObject().getWindowHeight()); popupsetting.setWidth(_model.getObject().getWindowWidth()); popupsetting.setWindowName("eFapsPopup"); setPopupSettings(popupsetting); }