List of usage examples for org.apache.wicket.markup.html.image Image Image
public Image(final String id, final String string)
From source file:au.org.theark.core.web.StudyHelper.java
License:Open Source License
public void setStudyLogoImage(final Study study, String id, WebMarkupContainer studyLogoImageContainer) { // Set the study logo if (study != null && study.getStudyLogoBlob() != null) { final java.sql.Blob studyLogoBlob = study.getStudyLogoBlob(); if (studyLogoBlob != null) { BlobImageResource blobImageResource = new BlobImageResource() { private static final long serialVersionUID = 1L; @Override/*from w ww.j a v a 2s .c o m*/ protected Blob getBlob() { return studyLogoBlob; } }; Image studyLogoImage = new Image(id, blobImageResource); studyLogoImageContainer.addOrReplace(studyLogoImage); } } else { noStudyLogoImage = new ContextImage("study.studyLogoImage", new Model<String>("images/no_study_logo.gif")); studyLogoImageContainer.addOrReplace(noStudyLogoImage); } }
From source file:au.org.theark.lims.web.component.inventory.panel.box.display.GridBoxPanel.java
License:Open Source License
/** * Initialise the key for the box /*from w ww .ja va 2 s. co m*/ * @param invCellList */ private void initialiseGridKey(List<InvCell> invCellList) { gridBoxKeyContainer.setOutputMarkupId(true); gridBoxKeyContainer.addOrReplace(new Image("emptyCellIcon", EMPTY_CELL_ICON)); gridBoxKeyContainer.addOrReplace(new Image("usedCellIcon", USED_CELL_ICON)); gridBoxKeyContainer.addOrReplace(new Image("privateUsedCellIcon", PRIVATE_USED_CELL_ICON)); gridBoxKeyContainer.addOrReplace(new Image("barcodeCellIcon", BARCODE_CELL_ICON)); // Download file link gridBoxKeyContainer.addOrReplace(buildXLSDownloadLink(invCellList)); addOrReplace(gridBoxKeyContainer); gridBoxKeyContainer.setVisible(!allocating); }
From source file:ca.travelagency.components.CheckMarkPanel.java
License:Apache License
public CheckMarkPanel(String id, boolean checked) { super(id);/*w w w. j av a 2s. com*/ ContextRelativeResource contextRelativeResource = new ContextRelativeResource( "images/" + (checked ? "checked.png" : "blank.png")); add(new Image(IMAGE, contextRelativeResource)); }
From source file:ca.travelagency.invoice.items.ItemRowPanel.java
License:Apache License
private IndicatingAjaxLink<Void> makeMoveLink(final String id, final ItemsPanel itemsPanel) { IndicatingAjaxLink<Void> link = new IndicatingAjaxLink<Void>(id) { private static final long serialVersionUID = 1L; @Override/*from ww w . j a v a2 s . c o m*/ public void onClick(AjaxRequestTarget target) { if (MOVE_UP.equals(id)) { itemsPanel.moveUp(target, getInvoiceItem()); } else { itemsPanel.moveDown(target, getInvoiceItem()); } } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.getAjaxCallListeners().add(new BlockUIDecorator()); } }; ContextRelativeResource contextRelativeResource = new ContextRelativeResource( "images/" + (MOVE_UP.equals(id) ? "move_up.png" : "move_down.png")); link.add(new Image(MOVE_LABEL, contextRelativeResource)); return link; }
From source file:ch.qos.mistletoe.wicket.TestReportPanel.java
License:Open Source License
void handleBlankPlaceHolderImage() { final WebMarkupContainer parent = new WebMarkupContainer(Constants.TREE_CONTROL_ID); // we don't want the "hand" cursor to appear over the blank place holder // image//from www . ja va2 s . com parent.add(new AttributeModifier("style", "cursor: default;")); Image image = new Image(Constants.TREE_CONTROL_SYMBOL_ID, new PackageResourceReference(TestReportPanel.class, Constants.BLANK_GIF)); parent.add(image); add(parent); }
From source file:ch.qos.mistletoe.wicket.TestReportPanel.java
License:Open Source License
void handleResultImage(TestReport description) { boolean hasFailures = description.hasFailures(); boolean isSuite = description.isSuite(); String testResultSrc = null;//from w w w . j a v a2 s .co m if (isSuite) { if (hasFailures) { testResultSrc = Constants.TSUITE_ERROR_GIF; } else { testResultSrc = Constants.TSUITE_OK_GIF; } } else { if (hasFailures) { testResultSrc = Constants.TEST_ERROR_GIF; } else { testResultSrc = Constants.TEST_OK_GIF; } } Image image = new Image(Constants.IMAGE_ID, new PackageResourceReference(TestReportPanel.class, testResultSrc)); add(image); }
From source file:ch.qos.mistletoe.wicket.TreeExpansionLink.java
License:Open Source License
public TreeExpansionLink(String id) { super(id);/* ww w . ja va 2s . co m*/ ResourceReference ref = getControlSymbolResourceReference(expanded); Image image = new Image(Constants.TREE_CONTROL_SYMBOL_ID, ref); image.setOutputMarkupId(true); this.add(image); }
From source file:com.ccc.crest.need.template.FooterPanel.java
License:Open Source License
public FooterPanel(String id) { super(id);/*from w w w . ja v a 2 s. com*/ Properties properties = CrestController.getCrestController().getProperties(); String copyrightYear = properties.getProperty(CrestServlet.CopyrightYearKey); String copyrightowner = properties.getProperty(CrestServlet.CopyrightOwnerKey); String crestImg = "/images/server_error.png"; if (((CrestController) CoreController.getController()).isCrestUp()) crestImg = "/images/server.png"; String xmlApiImg = "/images/server_error.png"; if (((CrestController) CoreController.getController()).isXmlApiUp()) xmlApiImg = "/images/server.png"; add(new Label("crestServerLabel", "crest server")); add(new Image("crestServerImage", new ContextRelativeResource(crestImg))); add(new Label("xmlApiServerLabel", "xmlapi server")); add(new Image("xmlApiServerImage", new ContextRelativeResource(xmlApiImg))); add(new Label("copyright", copyrightYear + " " + copyrightowner)); // add(new NonCachingImage("crestServerImage", new AbstractReadOnlyModel<DynamicImageResource>() // { // @Override // public DynamicImageResource getObject() // { // DynamicImageResource dir = new DynamicImageResource() // { // private static final long serialVersionUID = 7691769266370001440L; // // @Override // protected byte[] getImageData(Attributes attributes) // { // String crestImg = "/images/server_error.png"; // if (((CrestController) CoreController.getController()).isCrestUp()) // crestImg = "/images/server.png"; // ResourceReference ir; //// new ContextRelativeResource(crestImg). // return getCurrImage(); // } // }; // dir.setFormat("image/png"); // return dir; // } // })); }
From source file:com.ccc.crest.need.template.HeaderPanel.java
License:Open Source License
public HeaderPanel(String id) { super(id);//w w w . j av a 2 s . co m WicketClientInfo sessionClientInfo = (WicketClientInfo) getWebSession().getClientInfo(); CrestClientInfo clientInfo = (CrestClientInfo) sessionClientInfo.getOauthClientInfo(); String user = sessionClientInfo.isAuthenticated() ? clientInfo.getVerifyData().CharacterName : null; login = new BookmarkablePageLink<Object>("login", LoginPage.class); logout = new BookmarkablePageLink<Object>("logout", LogoutPage.class); logoutLabel = new Label("logoutLabel", "Welcome, " + user + " - "); needsApiLabel = new Label("needsApiLabel", "We need your API Key"); // String s = CrestController.getCrestController().scopes.getCreatePredefinedUrl(ScopeToMask.Type.Character); // needsApi = new ExternalLink("needsApi", s); needsApi = new BookmarkablePageLink<Object>("needsApi", ApiKeyInput.class); boolean loggedIn = user != null && !user.isEmpty(); boolean hasKeys = true; // not going to display if not authenticated //TODO: add in check if there are actually any scopes configured if (loggedIn) hasKeys = CrestController.getCrestController().capsuleerHasApiKey(user); logout.setVisible(loggedIn); logoutLabel.setVisible(loggedIn); login.setVisible(!loggedIn); needsApiLabel.setVisible(!hasKeys); needsApi.setVisible(!hasKeys); PackageResourceReference resourceReference = new PackageResourceReference(getClass(), "eveSsoSmlWht.png"); login.add(new Image("loginImg", resourceReference)); add(new BookmarkablePageLink<>("homeURL", Index.class)); add(login); add(logoutLabel); add(logout); add(needsApiLabel); add(needsApi); }
From source file:com.evolveum.midpoint.web.component.AsyncUpdatePanel.java
License:Apache License
protected Component getLoadingComponent(final String markupId) { Image image = new Image(markupId, PRELOADER); image.add(new VisibleEnableBehaviour() { @Override// w w w . j a va 2 s.c o m public boolean isVisible() { return isLoadingVisible(); } }); return image; }