Author: tchemit Date: 2012-10-12 12:13:36 +0200 (Fri, 12 Oct 2012) New Revision: 2506 Url: http://nuiton.org/repositories/revision/jaxx/2506 Log: fixes #2346: Can no use css to add title in tab Modified: trunk/jaxx-compiler/src/main/java/jaxx/compiler/tags/swing/TabHandler.java Modified: trunk/jaxx-compiler/src/main/java/jaxx/compiler/tags/swing/TabHandler.java =================================================================== --- trunk/jaxx-compiler/src/main/java/jaxx/compiler/tags/swing/TabHandler.java 2012-10-11 02:48:05 UTC (rev 2505) +++ trunk/jaxx-compiler/src/main/java/jaxx/compiler/tags/swing/TabHandler.java 2012-10-12 10:13:36 UTC (rev 2506) @@ -79,7 +79,7 @@ } @Override - public void compileSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException { + public void compileSecondPass(Element tag, final JAXXCompiler compiler) throws CompilerException, IOException { if (!ClassDescriptorHelper.getClassDescriptor(JTabbedPane.class).isAssignableFrom(compiler.getOpenComponent().getObjectClass())) { compiler.reportError("tab tag may only appear within JTabbedPane tag"); return; @@ -93,7 +93,16 @@ // id = compiler.getAutoId(ClassDescriptorHelper.getClassDescriptor(TabInfo.class)); } TabInfo tabInfo = new TabInfo(id); - CompiledObject compiledTabInfo = new CompiledObject(id, ClassDescriptorHelper.getClassDescriptor(TabInfo.class), compiler); + CompiledObject compiledTabInfo = new CompiledObject(id, ClassDescriptorHelper.getClassDescriptor(TabInfo.class), compiler) { + + @Override + public void addProperty(String property, String value) { + if (I18nHelper.isI18nableAttribute(property, compiler)) { + value = I18nHelper.addI18nInvocation(getId(), property, value, compiler); + } + super.addProperty(property, value); + } + }; compiler.registerCompiledObject(compiledTabInfo); //id = tabInfo.getId(); tabs.tabInfo = tabInfo;