20
I Use This!
Activity Not Available

News

Posted almost 12 years ago
Hopefully the last snapshot before the 7.4 release candidate. Changes: Added support for getting package information from the right jar manifest for ikvmc compiled jars. ... [More] Don't inject private helper methods in public interfaces, because csc.exe doesn't like interfaces with non-public methods. Rewrote java.lang.ref.ReferenceQueue to be more efficient. Bug fix. Non-public annotations can be used used in code that doesn't have access to them. Merged forgotten 7u40 exclusive socket binding change. Binaries available here: ikvmbin-7.4.5178.zip [Less]
Posted almost 12 years ago
Today I released version 1.5 of Orson PDF, a fast and small PDF generator for Java (it implements the Graphics2D API). I created this library last year because I wanted to provide export to PDF for both JFreeChart and Orson Charts, but without ... [More] taking on a big external dependency: The Orson PDF jar file weighs in at less than 70kB (without using Pack200 or any other minimisation techniques). It doesn't support font embedding, but the latest release provides an option (enabled via rendering hints) to render text as vector graphics, which works pretty well when the amount of text is limited as is usually the case with charts. If you are working with Java2D, you should also check out JFreeSVG, I released a new version of that library last week. It does SVG generation via the Graphics2D API and is, like Orson PDF, very light-weight (around 48k for the jar file). [Less]
Posted almost 12 years ago
Tomorrow marks 2 years I’m at Red Hat, and it has been so far a very exciting journey, for one of the most interesting and awesome company around. I’m glad I’m here! Only problem is that I started on 29th of February, and tomorrow is actually 1sth of ... [More] March… so I need to wait two years more before I can celebrate even the first year… ouch But at least I’ll be able to do a very awesome party by  then! [Less]
Posted almost 12 years ago
Early Access builds of JDK 7u60 have been updated with Build b07. This build updates HotSpot in JDK 7u60 to HotSpot 24.60 build 09, updates time zone support data to tzdata2013i, and fixes various issues, one of which was reported by Groovy ... [More] developers - thanks! If you find issues during your own testing of this build, please report a bug.A list of changes is available.In addition, a new Early Access build of JDK 8: Build b129 is now available for testing. If you find issues during your own testing of this build, please report a bug.An extensive list of changes since the previous build is linked off the download site. For developers making their own OpenJDK builds, and looking to compare their regression test results with others, JDK 8 b129 regression test results have been posted to the quality-discuss mailing list, as usual.As a new addition, starting with 7u60 b02, you can now also find the regression test results for JDK 7u early access builds being posted to that list, including those for the latest build.Happy testing! [Less]
Posted almost 12 years ago
I found this lying on my hard drive from a while back - it's a simple ring chart with text in the middle, created using JFreeChart: The code (see below) requires a small extension to RingPlot which can be done by subclassing. I remember saying (or ... [More] thinking) I would make a small change to JFreeChart so this type of chart can be produced without the need to subclass...that's done and it will be in the upcoming 1.0.18 release. The code below runs, of course, with the current release (1.0.17). /* ------------------- * RingChartDemo1.java * ------------------- * (C) Copyright 2014, by Object Refinery Limited. * * http://www.object-refinery.com */ package org.jfree.chart.demo; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Point; import java.awt.geom.Rectangle2D; import javax.swing.JPanel; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.PiePlotState; import org.jfree.chart.plot.RingPlot; import org.jfree.chart.title.TextTitle; import org.jfree.data.general.DefaultPieDataset; import org.jfree.data.general.PieDataset; import org.jfree.text.TextUtilities; import org.jfree.ui.ApplicationFrame; import org.jfree.ui.HorizontalAlignment; import org.jfree.ui.RectangleInsets; import org.jfree.ui.RefineryUtilities; import org.jfree.ui.TextAnchor; /** * A simple demonstration application showing how to create a ring chart using * data from a {@link DefaultPieDataset}. */ public class RingChartDemo1 extends ApplicationFrame { private static final long serialVersionUID = 1L; /** * A subclass of RingPlot that adds a text entry in the middle of the * ring showing the value of the first data item. */ static class CustomRingPlot extends RingPlot { /** The font. */ private Font centerTextFont; /** The text color. */ private Color centerTextColor; /** * Creates a new ring plot for the specified dataset. * * @param dataset the dataset. */ public CustomRingPlot(PieDataset dataset) { super(dataset); this.centerTextFont = new Font(Font.SANS_SERIF, Font.BOLD, 24); this.centerTextColor = Color.LIGHT_GRAY; } /** * Draws one item for the plot and, when drawing the first section, * adds the center text. * * @param g2 the graphics target (null not permitted). * @param section the section index. * @param dataArea the data area (null not permitted). * @param state the plot state. * @param currentPass the current pass index. */ @Override protected void drawItem(Graphics2D g2, int section, Rectangle2D dataArea, PiePlotState state, int currentPass) { super.drawItem(g2, section, dataArea, state, currentPass); if (currentPass == 1 && section == 0) { Number n = this.getDataset().getValue(section); g2.setFont(this.centerTextFont); g2.setPaint(this.centerTextColor); TextUtilities.drawAlignedString(n.toString(), g2, (float) dataArea.getCenterX(), (float) dataArea.getCenterY(), TextAnchor.CENTER); } } } /** * Default constructor. * * @param title the frame title. */ public RingChartDemo1(String title) { super(title); setContentPane(createDemoPanel()); } /** * Creates a sample dataset. * * @return A sample dataset. */ private static PieDataset createDataset() { DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue("A", new Double(210)); dataset.setValue("B", new Double(150)); return dataset; } /** * Creates a chart. * * @param dataset the dataset. * * @return A chart. */ private static JFreeChart createChart(PieDataset dataset) { CustomRingPlot plot = new CustomRingPlot(dataset); JFreeChart chart = new JFreeChart("Custom Ring Chart", JFreeChart.DEFAULT_TITLE_FONT, plot, false); chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), new Color(20, 20, 20), new Point(400, 200), Color.DARK_GRAY)); // customise the title position and font TextTitle t = chart.getTitle(); t.setHorizontalAlignment(HorizontalAlignment.LEFT); t.setPaint(new Color(240, 240, 240)); t.setFont(new Font("Arial", Font.BOLD, 26)); plot.setBackgroundPaint(null); plot.setOutlineVisible(false); plot.setLabelGenerator(null); plot.setSectionPaint("A", Color.ORANGE); plot.setSectionPaint("B", new Color(100, 100, 100)); plot.setSectionDepth(0.05); plot.setSectionOutlinesVisible(false); plot.setShadowPaint(null); return chart; } /** * Creates a panel for the demo (used by SuperDemo.java). * * @return A panel. */ public static JPanel createDemoPanel() { JFreeChart chart = createChart(createDataset()); chart.setPadding(new RectangleInsets(4, 8, 2, 2)); ChartPanel panel = new ChartPanel(chart); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(600, 300)); return panel; } /** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { RingChartDemo1 demo = new RingChartDemo1("JFreeChart: Ring Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); } } [Less]
Posted almost 12 years ago
A new development snapshot is available. I finished the merge of JSR-292 part of OpenJDK 7u40. The result is a bit depressing (but not unexpected) for the amount of effort that it took. The net result is that most stuff works the ... [More] same (I did fix a couple of bugs), except slower. I expect that eventually I'll get around to optimizing things a bit, but for now I've spent enough time on it to want to work on something else. Changes: Merged remaining OpenJDK 7u40 changes. Guard against bogus LVT entries. Fix for bug #284. Bug fix. MethodHandle.invoke[Exact] does not require a version 51 class file. Bug fix. If a ghost array is used in an invokedynamic signature, we should not use the erased method type. Added Unsafe.defineAnonymousClass(). Don't filter DynamicMethods from stack trace if IKVM_DISABLE_STACKTRACE_CLEANING is defined. Bug fix. Unsafe.defineClass() should allow null class loader and '/' as package separator. Added support for CallerID in pseudo-native methods. Added Unsafe.shouldBeInitialized() and Unsafe.defineClass() overload. Bug fix. If CLASSGC is enabled, we should use a WeakReference to cache the MethodType for the MethodHandle.invoke() cache. Bug fix. MethodHandle.invoke() cache should consider vararg-ness of the MethodHandle. Removed HideFromReflectionAttribute. Added flags to HideFromJavaAttribute to support different levels of hiding (including the previous usage of HideFromReflectionAttribute and adding specific ability to hide from security stack walking and from stack traces, for future LamdbaForm support). Bug fix. Constructing .NET value types using MethodHandle didn't work. Binaries available here: ikvmbin-7.4.5170.zip [Less]
Posted almost 12 years ago
When I released Orson Charts for HTML5 a couple of weeks back, one of the immediate questions was why I used HTML5 Canvas for the rendering instead of SVG. The main reasons for choosing Canvas were that (1) the code was being ported from the ... [More] original Java version of Orson Charts and the Java2D rendering used there maps easily to the Canvas API in HTML5, and (2) I guessed that the Canvas rendering would be faster than building an SVG element in the DOM. That said, the final 2D rendering of the charts is nicely separated from the rest of the code, so it isn't difficult to provide alternative rendering paths. For the next release, I've added an option to render to SVG - click on the image below to try out the live demo. The performance is better than I expected, it is perfectly usable on my laptop although it is noticeably slower in Firefox compared to Chrome and Safari. I didn't run any performance metrics yet to compare the Canvas and SVG versions, but the Canvas version still feels faster. This isn't released yet because there is still an issue with the vertical positioning of text...getting font metrics isn't as easy as it should be and I still have to find a (lightweight) workaround for that. But it is coming soon! [Less]
Posted almost 12 years ago
Earlier this month I attended FOSDEM in Brussels, which was excellent as usual. On Sunday morning, I took a little diversion and went to Nathan Sawaya's The Art of Brick at the Bourse. I'll show you a couple of photos, even if they don't really do ... [More] justice to the exhibits. I liked this one because I feel like this sometimes when I work really hard on something: And this one I went back to a few times, it's hard to believe it's just plastic bricks: You should go see this if you get the chance. [Less]
Posted almost 12 years ago
Coming up next month, I'll be first speaking on March 19th at the rheinjug in Düsseldorf on JDK 8, and then heading to Berlin the next day to join Paul Sandoz for a Java SE 8 party. See you there!
Posted almost 12 years ago
I have an ol' OmniBook 800CT. A small, interesting computer, for its time, extremely advanced!Small form factor, but still a very nice keyboard, something unmatched on modern netbooks. The unique pop-out mouse. The series started out with 386 ... [More] processor, b&w display and ROM expansions.The 800CT is one of the latest models: same form factor, SCSI connector, but color screen (800x600) and a hefty Pentium 133Mhz!But only 32 MB of ram (the kernel report 31 of real mem, 24 avail mem)Original 5.4 kernel: 9.2MCustom kernel: 5.0 MThis shrinkage is quite hefty! almost 50%! More than raw disk usage, this new kernel boots faster and leaves  more free memory. Enough more that X11 is now almost usableHow can this be achieved? essentially by removing unused kernel options. If you remove drivers which you know you don't need because you don't have the hardware (and won't use it, e.g. you know you won't plug-in a certain card in the future) then you configure it out, it won't be built and it won't get in your kernel.On an old laptop with no expansion except the ports and the PCMCIA port it has, this is relatively easy.To build your custom kernel, follow the OpenBSD FAQ. The main theory is to take the kernel configuration file, skim over it line by line it and see if you have the hardware, which you know by checking your dmesg. Dmesg shows which devices and drivers were loaded.Remember that you do not modify GENERIC, but a copy of it.You can automate this with a tool called dmassage: it will parse your GENERIC configuration and produce an optimal tuned version, however it will not work out of the box.Why? there are drivers which do not compile if other drivers are not present.I'm unsure if this is really a bug, in my opinion it is at least "unclean" code, however since mostly this kind of extreme driver-picking is not done, it is not fatal and probably won't be fixed. If you remove all drivers at once, you won't easily find out one which one breaks, so my suggestion is to remove them in sets. One by-one is surely too tedious, since for each you need to make a build.remove X driversbuild, if it works, copy the configuration file as a backuptest the kernel, optionally, by booting itcontinue removalThus, in case of breakage, you can narrow it down to a less options.If your mahcine doesn't have a certain bus, you may remove all drievrs attached to each. But proceed from the leaves, not the trunk: gradually remove the peripheral drivers before removing the bus support.In my case, I found that an unremovable driver is:et*    at pci?                # Agere/LSI ET1310 Remember that you are running an unsupported kernel, if you want support for a problem, better try it with the original kernel, of which you should anyway for safety retain a backup copy during the iterative building process. [Less]