pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calathus <calat...@gmail.com>
Subject Re: [pivot] are there any tools to convert bxml to Java?
Date Mon, 03 Jan 2011 16:52:01 GMT
Hi,
The current code does not handle listener code in BXML.
These restriction may be removed if someone who know BXML well.
But for me, some JS based BXML file translated in Java uisng JS interpreter
seems not so appealing situation.
Why do we want to use JS in Java?
So I have not tried much for supporting this aspect.

Also in order to support this style of code generation, some of the final
class definition must be changed in Pivot. and some handling of attribute
evaluation order is desirable.
Followings are the classes using final under wtk. I think some of class
(e.g, sequence) do not have to be none final since they are not used for
this anonymous class style instance creation.

 # grep -R "final class" * | grep java:
src/org/apache/pivot/wtk/text/TextNode.java:public final class TextNode
extends Node {
src/org/apache/pivot/wtk/BrowserApplicationContext.java:public final class
BrowserApplicationContext extends ApplicationContext {
src/org/apache/pivot/wtk/BrowserApplicationContext.java:    public static
final class HostApplet extends Applet {
src/org/apache/pivot/wtk/Accordion.java:    public final class PanelSequence
implements Sequence<Component>, Iterable<Component> {
src/org/apache/pivot/wtk/Display.java:public final class Display extends
Container {
src/org/apache/pivot/wtk/Component.java:    public final class
StyleDictionary implements Dictionary<String, Object>, Iterable<String> {
src/org/apache/pivot/wtk/Component.java:    public final class
UserDataDictionary implements
src/org/apache/pivot/wtk/Component.java:    public final class
DecoratorSequence implements Sequence<Decorator>,
src/org/apache/pivot/wtk/Span.java:public final class Span {
src/org/apache/pivot/wtk/TreeView.java:    public static final class
PathComparator implements Comparator<Path> {
src/org/apache/pivot/wtk/Menu.java:    public final class SectionSequence
implements Sequence<Section>, Iterable<Section> {
src/org/apache/pivot/wtk/DesktopApplicationContext.java://public final class
DesktopApplicationContext extends ApplicationContext {
src/org/apache/pivot/wtk/Point.java:public final class Point implements
Serializable {
src/org/apache/pivot/wtk/TableView.java:    public static final class Column
{
src/org/apache/pivot/wtk/TableView.java:    public final class
ColumnSequence implements Sequence<Column>, Iterable<Column> {
src/org/apache/pivot/wtk/TableView.java:    public final class
SortDictionary implements Dictionary<String, SortDirection>,
Iterable<String> {
src/org/apache/pivot/wtk/Prompt.java:    public final class OptionSequence
implements Sequence<Object>, Iterable<Object> {
src/org/apache/pivot/wtk/Insets.java:public final class Insets implements
Serializable {
src/org/apache/pivot/wtk/ScrollBar.java:    public static final class Scope
{
src/org/apache/pivot/wtk/Dimensions.java:public final class Dimensions
implements Serializable {
src/org/apache/pivot/wtk/Keyboard.java:public final class Keyboard {
src/org/apache/pivot/wtk/Keyboard.java:    public static final class
KeyStroke {
src/org/apache/pivot/wtk/Keyboard.java:    public static final class KeyCode
{
src/org/apache/pivot/wtk/MenuBar.java:    public final class ItemSequence
implements Sequence<Item>, Iterable<Item> {
src/org/apache/pivot/wtk/CornerRadii.java:public final class CornerRadii
implements Serializable {
src/org/apache/pivot/wtk/TabPane.java:    public final class TabSequence
implements Sequence<Component>, Iterable<Component> {
src/org/apache/pivot/wtk/GraphicsUtilities.java:public final class
GraphicsUtilities {
src/org/apache/pivot/wtk/TextArea.java:    public static final class
Paragraph {
src/org/apache/pivot/wtk/TextArea.java:    public final class
ParagraphSequence implements Sequence<Paragraph>, Iterable<Paragraph> {
src/org/apache/pivot/wtk/TablePane.java:    public final class RowSequence
implements Sequence<Row>, Iterable<Row> {
src/org/apache/pivot/wtk/TablePane.java:    public final class
ColumnSequence implements Sequence<Column>, Iterable<Column> {
src/org/apache/pivot/wtk/TablePane.java:    public static final class Filler
extends Component {
src/org/apache/pivot/wtk/Clipboard.java:public final class Clipboard {
src/org/apache/pivot/wtk/Automation.java:public final class Automation {
src/org/apache/pivot/wtk/skin/GridPaneSkin.java:    protected final class
Metadata {
src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java:    public final
class ColorChooserPopup extends Window {
src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java:    public final
class ColorChooserPopupSkin extends WindowSkin {
src/org/apache/pivot/wtk/Action.java:    public static final class
NamedActionDictionary
src/org/apache/pivot/wtk/Mouse.java:public final class Mouse {
src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java:    public
static final class RendererMapping {
src/org/apache/pivot/wtk/Limits.java:public final class Limits implements
Serializable {
src/org/apache/pivot/wtk/Form.java:    public final class SectionSequence
implements Sequence<Section>, Iterable<Section> {
src/org/apache/pivot/wtk/ApplicationContext.java:    public static final
class ResourceCacheDictionary
src/org/apache/pivot/wtk/ApplicationContext.java:    public static final
class ScheduledCallback extends TimerTask {
src/org/apache/pivot/wtk/Alert.java:    public final class OptionSequence
implements Sequence<Object>, Iterable<Object> {
src/org/apache/pivot/wtk/Bounds.java:public final class Bounds implements
Serializable {
src/org/apache/pivot/wtk/GridPane.java:    public static final class Row
implements Sequence<Component>, Iterable<Component> {
src/org/apache/pivot/wtk/GridPane.java:    public final class RowSequence
implements Sequence<Row>, Iterable<Row> {

----------------
I have already changed following classes to none final so that the generated
Java codes for tutorial bxml files can be compiled.

src/org/apache/pivot/wtk/DesktopApplicationContext.java://public final class
DesktopApplicationContext extends ApplicationContext {
src/org/apache/pivot/wtk/TableView.java://    public static final class
Column {
src/org/apache/pivot/wtk/TablePane.java://    public static final class
Filler extends Component {
src/org/apache/pivot/wtk/GridPane.java://    public static final class Row
implements Sequence<Component>, Iterable<Component> {


On Mon, Jan 3, 2011 at 5:38 AM, Sandro Martini <sandro.martini@gmail.com>wrote:

>
> Hi Calatus,
>
> > I fixed a bug(add=>setContent for embedded node), and made a few
> > improvements, now the sample StockTracker is now working. I updated the
> > github site including the READEME file with the new generated Java code:
> Very good, I'll try to take a look as soon as possible :-) ...
>
> I hope for the 2.1 we will be able to merge the required enhancements to
> Pivot with Todd prototype of BXMLCompiler ... so your sample could be
> simplified a lot.
>
> Bye,
> Sandro
>
>
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/pivot-are-there-any-tools-to-convert-bxml-to-Java-tp2118284p2184776.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>



-- 
Cheers,
calathus

Mime
View raw message