Creating an offline Rich-Client-Application using HTML, CSS and Java with SWT

There are a lot of frameworks out there to create offline applications and rich clients in Java. One exotic alternative is to use the HTML, CSS and Javascript for this purpose and render the application in a Java frame using SWT and SWT’s browser component. Creating a new Project We’re using maven here for our project but you shouldn’t have a problem to use SBT, Gradle or Ivy instead… Adding Maven Dependencies We need two things .. first comes a repository for the swt dependencies … ...

November 12, 2012 · 6 min · 1084 words · Micha Kops

Atlassian Snippets

Disable YUI compressor <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <compressResources>false</compressResources> [..] </configuration> </plugin> Confluence – Get favourites by user Using the label manager. List getFavouriteSpaces(String username) Confluence – Determine the base URL Using the SettingsManager: String baseUrl = settingsManager.getGlobalSettings().getBaseUrl(); Confluence – Get the context path Using the BootstrapManager: String contextPath = bootstrapManager.getWebAppContextPath(); Confluence – Using Velocity Template for a Macro final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext()); contextMap.put("key", obj); // references obj as variable named $key in the velocity template VelocityUtils.getRenderedTemplate("path/to/template.vm", contextMap); ...

March 1, 2010 · 3 min · 544 words · Micha Kops

CSS Snippets

Calculations see also W3C draft .container { width: calc(100% - 80px); }

March 1, 2010 · 1 min · 12 words · Micha Kops