Hi all
This is probably not that difficult, but I´d like to hear how you
would solve this problem.
Let´s say I have a widget that extends composite, using a Decorator
Panel as a base panel.
This is my base panel where I´ll create a controller and some models.
In the decorator panel I put another widget extending composite, using
a Tab panel as a base panel.
In this tab panel, I put (among other things) a label which holds the
current time.
In my controller, I have a Timer that fires every second, supposed to
update the label with the current time.
What would be the best way to make the model object holding the
current time visible to the label actually showing the time?
How it looks now (stripped down)
In the main panel:
AppData data = new AppData();
Controller controller = new Controller(data);
MenuPanel mainPanel = new MenuPanel(controller);
In the MenuPanel
TabPanel basePanel = new TabPanel();
basePanel.add(new TimeWidget(controller),"Current time");
In the TimeWidget
Label time = new Label("Put current time here");
Would it be a good idea to create a getData() function inside the
controller,
so that the TimeWidget could handle events fired from the model, or is
there a better solution?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---