Пример #1
0
  @Override
  public void addToContainer(Object c, Object constraints) {

    super.addToContainer(c, constraints);
    Component cc = (Component) c;
    cc.setWidth("100%");
  }
Пример #2
0
 public void setNavigatorWidth(String width) {
   navigatorContainer.setWidth(width);
   Iterator<Component> i = navigatorContainer.iterator();
   while (i.hasNext()) {
     Component childComponent = i.next();
     childComponent.setWidth(width);
   }
 }
Пример #3
0
 public void addOption(Component btn) {
   CssLayout wrap = new CssLayout();
   btn.setWidth("100%");
   btn.setStyleName("action");
   wrap.addStyleName("action-wrap");
   wrap.addComponent(btn);
   ((ComponentContainer) this.getCompositionRoot()).addComponent(wrap);
 }
Пример #4
0
  public void setSearchCriteria(final S criteria) {
    this.searchCriteria = criteria;

    final JFreeChart chart = createChart();
    final JFreeChartWrapper chartWrapper = new JFreeChartWrapper(chart);

    removeAllComponents();
    final CssLayout borderWrap = new CssLayout();
    borderWrap.addComponent(chartWrapper);
    borderWrap.setStyleName("chart-wrapper");
    borderWrap.setHeight(height + "px");
    borderWrap.setWidth(width + "px");
    chartWrapper.setHeight(height + "px");
    chartWrapper.setWidth(width + "px");
    chartWrapper.setGraphHeight(height);
    chartWrapper.setGraphWidth(width);
    this.addComponent(borderWrap);
    // this.setComponentAlignment(chartWrapper, Alignment.MIDDLE_CENTER);
    final Component legendBox = createLegendBox();
    legendBox.setWidth(width + "px");
    this.addComponent(legendBox);
    this.setComponentAlignment(legendBox, Alignment.MIDDLE_CENTER);
  }
Пример #5
0
 /**
  * Sets the page in the window, at the right place (and removes the previous one) Override this
  * (don't forget to call super) if you want to do something everytime a new page is being placed
  */
 @Override
 public synchronized void changePage(Component pageParam) {
   super.changePage(pageParam); // Does most of the job.
   pageParam.setWidth("100%");
 }