예제 #1
0
파일: IvyGrid.cs 프로젝트: rokuan/ivy
        public void setComponentAt(IvyComponent comp, int r, int c)
        {
            if (r >= 0 && r < rows && c >= 0 && c < cols)
            {
                grid[r, c] = comp;


                Grid.SetColumn(comp.getComponent(), c);
                Grid.SetRow(comp.getComponent(), r);
                Grid.SetColumnSpan(comp.getComponent(), comp.getColSpan());
                Grid.SetRowSpan(comp.getComponent(), comp.getRowSpan());

                //TODO: mettre le bon parametre

                /*if(comp.getWidthType() == DimensionParameters.FILL && comp.getHeightType() == DimensionParameters.FILL){
                 *  constr.fill = GridBagConstraints.BOTH;
                 * }
                 * else if(comp.getWidthType() == DimensionParameters.FILL){
                 *  constr.fill = GridBagConstraints.HORIZONTAL;
                 * }
                 * else if(comp.getHeightType() == DimensionParameters.FILL){
                 *  constr.fill = GridBagConstraints.VERTICAL;
                 * }*/

                gridComp.Children.Add(comp.getComponent());
            }
        }
예제 #2
0
파일: IvyGrid.cs 프로젝트: rokuan/ivy
        public void setComponentAt(IvyComponent comp, int r, int c)
        {
            if (r >= 0 && r < rows && c >= 0 && c < cols)
            {
                grid[r, c] = comp;

                Grid.SetColumn(comp.getComponent(), c);
                Grid.SetRow(comp.getComponent(), r);
                Grid.SetColumnSpan(comp.getComponent(), comp.getColSpan());
                Grid.SetRowSpan(comp.getComponent(), comp.getRowSpan());

                //TODO: mettre le bon parametre
                /*if(comp.getWidthType() == DimensionParameters.FILL && comp.getHeightType() == DimensionParameters.FILL){
                    constr.fill = GridBagConstraints.BOTH;
                }
                else if(comp.getWidthType() == DimensionParameters.FILL){
                    constr.fill = GridBagConstraints.HORIZONTAL;
                }
                else if(comp.getHeightType() == DimensionParameters.FILL){
                    constr.fill = GridBagConstraints.VERTICAL;
                }*/

                gridComp.Children.Add(comp.getComponent());
            }
        }
예제 #3
0
파일: IvyList.cs 프로젝트: rokuan/ivy
 public void addComponent(IvyComponent comp)
 {
     components.Add(comp);
     list.Items.Add(comp.getComponent());
 }
예제 #4
0
파일: IvyList.cs 프로젝트: rokuan/ivy
 public void addComponent(IvyComponent comp)
 {
     components.Add(comp);
     list.Items.Add(comp.getComponent());
 }