}
gridBuilder.newSplitPanel(GridSize.COL50);
{
// Options
final FieldsetPanel fs = gridBuilder.newFieldset(getString("label.options")).suppressLabelForWarning();
final DivPanel checkBoxPanel = fs.addNewCheckBoxButtonDiv();
checkBoxPanel.addCheckBoxButton(new PropertyModel<Boolean>(data.getStyle(), "relativeTimeValues"),
getString("gantt.style.relativeTimeValues"));
checkBoxPanel.addCheckBoxButton(new PropertyModel<Boolean>(data.getStyle(), "showToday"), getString("gantt.style.showToday"));
checkBoxPanel.addCheckBoxButton(new PropertyModel<Boolean>(data.getStyle(), "showCompletion"), getString("gantt.style.showCompletion"));
checkBoxPanel.add(new CheckBoxButton(checkBoxPanel.newChildId(), new PropertyModel<Boolean>(getSettings(), "showOnlyVisibles"),
getString("gantt.settings.showOnlyVisibles")) {
/**
* @see org.projectforge.web.wicket.flowlayout.CheckBoxButton#wantOnSelectionChangedNotifications()
*/
@Override
protected boolean wantOnSelectionChangedNotifications()
{
// Submit form after toggling the check box.
return true;
}
});
}
gridBuilder.newSplitPanel(GridSize.COL50);
{
// Time period
final FieldsetPanel fs = gridBuilder.newFieldset(getString("timePeriod")).suppressLabelForWarning();
final DatePanel fromDatePanel = new DatePanel(fs.newChildId(), new PropertyModel<Date>(getSettings(), "fromDate"), DatePanelSettings
.get().withSelectProperty("fromDate"));
fs.add(fromDatePanel);
fs.add(new DivTextPanel(fs.newChildId(), "-"));
final DatePanel toDatePanel = new DatePanel(fs.newChildId(), new PropertyModel<Date>(getSettings(), "toDate"), DatePanelSettings
.get().withSelectProperty("toDate"));
fs.add(toDatePanel);
}
gridBuilder.newSplitPanel(GridSize.COL50);
{
final FieldsetPanel fs = gridBuilder.newFieldset(getString("export"));
final LabelValueChoiceRenderer<String> exportFormatChoiceRenderer = new LabelValueChoiceRenderer<String>();
exportFormatChoiceRenderer.addValue(EXPORT_JPG, getString("gantt.export.jpg"));
exportFormatChoiceRenderer.addValue(EXPORT_MS_PROJECT_MPX, getString("gantt.export.msproject.mpx"));
exportFormatChoiceRenderer.addValue(EXPORT_MS_PROJECT_XML, getString("gantt.export.msproject.xml"));
exportFormatChoiceRenderer.addValue(EXPORT_PDF, getString("gantt.export.pdf"));
exportFormatChoiceRenderer.addValue(EXPORT_PNG, getString("gantt.export.png"));
exportFormatChoiceRenderer.addValue(EXPORT_PROJECTFORGE, getString("gantt.export.projectforge"));
exportFormatChoiceRenderer.addValue(EXPORT_SVG, getString("gantt.export.svg"));
final DropDownChoice<String> exportFormatChoice = new DropDownChoice<String>(fs.getDropDownChoiceId(), new PropertyModel<String>(
this, "exportFormat"), exportFormatChoiceRenderer.getValues(), exportFormatChoiceRenderer);
exportFormatChoice.setNullValid(false);
fs.add(exportFormatChoice);
fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("export")) {
@Override
public final void onSubmit()
{
parentPage.export(exportFormat);
}
}, getString("export"), SingleButtonPanel.NORMAL));
}
gridBuilder.newGridPanel();
{
final DivPanel panel = gridBuilder.getPanel();
ganttChartEditTreeTablePanel = new GanttChartEditTreeTablePanel(panel.newChildId(), this, getData());
panel.add(ganttChartEditTreeTablePanel);
ganttChartEditTreeTablePanel.init();
ganttChartEditTreeTablePanel.setOpenNodes(getSettings().getOpenNodes());
gridBuilder.getPanel().add(imagePanel = new DivPanel(panel.newChildId()));
}
{
// Redraw:
redrawButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("redraw")) {
@Override