[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
style for tiledcontainer within tiledare  XML
Forum Index -> Development
Author Message
bzeuner

Power User

Joined: 28/02/2011 17:12:24
Messages: 59
Offline

Hi,

It seems that the style of the tiled container is the same as the one of the default foldablepane. It is possible to create a seperate style that could be assigned to all tiled containers within a special tiled area?

Ben
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5535
Offline

Hi,

no, there are special style variants used. I thinks the simplest way is to take a look into the code below which is taken from TILEDAREABinding.

Regards, Björn

Code:
     private void render()
     {
         if (m_objectbinding == null)
             return;
         if (m_info == null)
             loadLayout();
         PANENode outestPane = new PANENode();
         outestPane.setWidth("100%");
         outestPane.setHeight("100%");
         ROWNode outestRow = new ROWNode();
         outestPane.addSubNode(outestRow);
         int columnsCounter = 0;
         for (TILEDAREAColumnInfo taci: m_info.getColumns())
         {
             if (columnsCounter == 0)
             {
                 // left distance
                 PANENode leftDistancePane = new PANENode();
                 outestRow.addSubNode(leftDistancePane);
                 leftDistancePane.setHeight("100%");
                 leftDistancePane.setDropreceive("CCTILE"+m_ddid);
                 leftDistancePane.setComment("COL_"+columnsCounter);
                 leftDistancePane.setActionListener(m_objectbinding.replace("}",".onDropAction}"));
                 leftDistancePane.setStylevariant("CCTILEDAREA_HORIZONTALDISTANCEPANE");
             }
             PANENode columnContentPane = new PANENode();
             outestRow.addSubNode(columnContentPane);
             columnContentPane.setWidth("100%");
             columnContentPane.setRowalignmenty("top");
             int tileCounter = 0;
             for (TILEDAREATileInfo tati: taci.getTiles())
             {
                 if (tileCounter == 0)
                 {
                     ROWNode topDistanceRow = new ROWNode();
                     columnContentPane.addSubNode(topDistanceRow);
                     PANENode topDistancePane = new PANENode();
                     topDistanceRow.addSubNode(topDistancePane);
                     topDistancePane.setWidth("100%");
                     topDistancePane.setDropreceive("CCTILE"+m_ddid);
                     topDistancePane.setComment("ROW_" + columnsCounter + "_" + tileCounter);
                     topDistancePane.setActionListener(m_objectbinding.replace("}",".onDropAction}"));
                     topDistancePane.setStylevariant("CCTILEDAREA_VERTICALDISTANCEPANE");
                 }
                 ROWNode foldablePaneRow = new ROWNode();
                 columnContentPane.addSubNode(foldablePaneRow);
                 Tile tile = m_tiles.get(tati.getId());
                 FOLDABLEPANENode foldablePane = new FOLDABLEPANENode();
                 foldablePaneRow.addSubNode(foldablePane);
                 foldablePane.setText(m_objectbinding.replace("}",".tiles[\""+tati.getId()+"\"].title}"));
                 foldablePane.setOpened(m_objectbinding.replace("}",".tiles[\""+tati.getId()+"\"].opened}"));
                 foldablePane.setWidth("100%");
                 foldablePane.setDragsend("CCTILE"+m_ddid+":"+tati.getId());
                 foldablePane.setStylevariant("CCTILEDAREA_FOLDABLEPANE");
                 ROWPAGEBEANINCLUDENode rowPageBeanInclude = new ROWPAGEBEANINCLUDENode();
                 foldablePane.addSubNode(rowPageBeanInclude);
                 rowPageBeanInclude.setPagebeanbinding(m_objectbinding.replace("}",".tiles[\""+tati.getId()+"\"].pageBean}"));
                 {
                     ROWNode bottomDistanceRow = new ROWNode();
                     columnContentPane.addSubNode(bottomDistanceRow);
                     PANENode bottomDistancePane = new PANENode();
                     bottomDistanceRow.addSubNode(bottomDistancePane);
                     bottomDistancePane.setWidth("100%");
                     bottomDistancePane.setDropreceive("CCTILE"+m_ddid);
                     bottomDistancePane.setComment("ROW_" + columnsCounter + "_" + (tileCounter+1));
                     bottomDistancePane.setActionListener(m_objectbinding.replace("}",".onDropAction}"));
                     bottomDistancePane.setStylevariant("CCTILEDAREA_VERTICALDISTANCEPANE");
                 }
                 tileCounter++;
             }
             // right distance
             PANENode rightDistancePane = new PANENode();
             outestRow.addSubNode(rightDistancePane);
             rightDistancePane.setHeight("100%");
             rightDistancePane.setDropreceive("CCTILE"+m_ddid);
             rightDistancePane.setComment("COL_"+(columnsCounter+1));
             rightDistancePane.setActionListener(m_objectbinding.replace("}",".onDropAction}"));
             rightDistancePane.setStylevariant("CCTILEDAREA_HORIZONTALDISTANCEPANE");
             columnsCounter++;
         }
         m_content.setContentNode(outestPane);
     }
 

Björn Müller, CaptainCasa GmbH
bzeuner

Power User

Joined: 28/02/2011 17:12:24
Messages: 59
Offline

Ah ok, thanks
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team