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()); } }
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()); } }
public void addComponent(IvyComponent comp) { components.Add(comp); list.Items.Add(comp.getComponent()); }