Brendan,

Could you please post a small, complete example demonstrating the
problem with the FlowPane not showing?  Try to keep it simple by only
using a custom renderer and not all of your other custom classes.

Chris

2011/12/28 Brendan cheng <[email protected]>:
> Hi,
>
> in renderer function, is this going to work?
>
> @Override
>
> public void render(Object item, int index, ListView listView,
>
> boolean selected, boolean checked, boolean highlighted,
>
> boolean disabled) {
>
> if (item != null && item instanceof Tab.LogView) {
>
> Tab.LogView logview = (Tab.LogView) item;
>
> fieldsflowPane = logview.fieldsPane;
>
> }
>
> }
>
>
> I couldn't get logview.fieldsPane to be shown in fieldsflowPane.
>
> How to assign the logview.fieldsPane into fieldsflowPane?
>
> How to change a component's parent reference?
>
>
> Brendan
>
>
> ________________________________
> From: [email protected]
> To: [email protected]
> Subject: ItemRender Layout question
> Date: Tue, 27 Dec 2011 14:21:45 +0000
>
>
> Hi,
>
> I'm trying render a list of list view with a nested list view.  Despite all
> my effort,  I can't get it display on screen.
>
> Here is the snippet of code:
>
> public void addNode(Person person) throws
>
> IOException, SerializationException {
>
>
> BXMLSerializer bxmlSerializer = new BXMLSerializer();
>
> LogItemRenderer logItemRenderer = (LogItemRenderer) bxmlSerializer
>
> .readObject(getClass().getResource(
>
> "fullview/LogItemRenderer.bxml"));
>
>
> ListView listView = new ListView();
>
> listView.setItemRenderer(logItemRenderer);
>
>
> org.apache.pivot.collections.List<LogView> logviewlist = new
> org.apache.pivot.collections.ArrayList<LogView>();
>
> for (Log log : person.getLogs()) {
>
> if (log instanceof Log) {
>
> Log restclientlog = (Log) log;
>
> ListView sysfieldlistView = new ListView();
>
> sysfieldlistView.setItemRenderer(new FieldItemRenderer());
>
> org.apache.pivot.collections.List<Field> syslist = new ArrayList<Field>();
>
> for (Field field : restclientlog.sysFields) {
>
>       syslist.add(field);
>
> }
>
> sysfieldlistView.setListData(syslist);
>
> FlowPane flowPane = new FlowPane();
>
> flowPane.add(sysfieldlistView);
>
> logviewlist.add(new LogView(log, flowPane));
>
> }
>
> }
>
> listView.setListData(logviewlist);
>
> Accordion.setHeaderData(listView, "Log");
>
> centerAccordion.getPanels().add(listView);
>
>
> }
>
>
> Both FieldItemRender and LogItemRenderer follow your ListViewItemRenderer
> and most component show up properly except the content of FlowPane.
>
>
> I have no idea why the content in the FlowPane can't show up.
>
>
> Any help?
>
>
> Brendan
>
>

Reply via email to