Package org.projectforge.web.wicket.flowlayout

Examples of org.projectforge.web.wicket.flowlayout.DivTextPanel


      optionsFieldsetPanel.setOutputMarkupId(true);
      startDate = new DatePanel(optionsFieldsetPanel.newChildId(), new PropertyModel<Date>(getSearchFilter(), "startDate"),
          DatePanelSettings.get().withSelectPeriodMode(true));
      optionsFieldsetPanel.add(dependentFormComponents[0] = startDate);
      optionsFieldsetPanel.setLabelFor(startDate);
      optionsFieldsetPanel.add(new DivTextPanel(optionsFieldsetPanel.newChildId(), " - "));
      endDate = new DatePanel(optionsFieldsetPanel.newChildId(), new PropertyModel<Date>(getSearchFilter(), "endDate"), DatePanelSettings
          .get().withSelectPeriodMode(true));
      optionsFieldsetPanel.add(dependentFormComponents[1] = endDate);
      {
        final SubmitLink unselectPeriod = new SubmitLink(IconLinkPanel.LINK_ID) {
View Full Code Here


        new PropertyModel<Collection<GroupDO>>(this.fullAccessGroupsListHelper, "assignedItems"), groupsFullAccessProvider);
    fs.add(groupsFullAccess);

    // Full access groups inherited rights
    fs = gridBuilder.newFieldset("", getString("plugins.skillmatrix.skill.inherited"));
    @SuppressWarnings("serial")
    final DivTextPanel labelFull = new DivTextPanel(fs.newChildId(), new Model<String>() {
      /**
       * @see org.apache.wicket.model.Model#getObject()
       */
      @Override
      public String getObject()
      {
        if (getData().getParent() != null) {
          return getGroupnames(skillRight.getFullAccessGroupIds(getData().getParent()));
        }
        return "";
      }
    });
    fs.suppressLabelForWarning();
    fs.add(labelFull);
    ajaxTargets.add(labelFull.getLabel4Ajax());

    gridBuilder.newSplitPanel(GridSize.COL50, GridType.CONTAINER);
    {
      // Read-only access groups
      fs = gridBuilder.newFieldset(getString("plugins.teamcal.readonlyAccess"), getString("plugins.teamcal.access.groups"));
      final GroupsProvider groupsProvider = new GroupsProvider();
      final Collection<GroupDO> readOnlyAccessGroups = new GroupsProvider().getSortedGroups(getData().getReadOnlyAccessGroupIds());
      readOnlyAccessGroupsListHelper = new MultiChoiceListHelper<GroupDO>().setComparator(new GroupsComparator()).setFullList(
          groupsProvider.getSortedGroups());
      if (readOnlyAccessGroups != null) {
        for (final GroupDO group : readOnlyAccessGroups) {
          readOnlyAccessGroupsListHelper.addOriginalAssignedItem(group).assignItem(group);
        }
      }
      final Select2MultiChoice<GroupDO> groups = new Select2MultiChoice<GroupDO>(fs.getSelect2MultiChoiceId(),
          new PropertyModel<Collection<GroupDO>>(this.readOnlyAccessGroupsListHelper, "assignedItems"), groupsProvider);
      fs.add(groups);

      // Read-only access groups inherited rights
      fs = gridBuilder.newFieldset("", getString("plugins.skillmatrix.skill.inherited"));
      @SuppressWarnings("serial")
      final DivTextPanel labelReadOnly = new DivTextPanel(fs.newChildId(), new Model<String>() {
        /**
         * @see org.apache.wicket.model.Model#getObject()
         */
        @Override
        public String getObject()
        {
          if (getData().getParent() != null) {
            return getGroupnames(skillRight.getReadOnlyAccessGroupIds(getData().getParent()));
          }
          return "";
        }
      });
      fs.add(labelReadOnly);
      fs.suppressLabelForWarning();
      ajaxTargets.add(labelReadOnly.getLabel4Ajax());
    }

    gridBuilder.newSplitPanel(GridSize.COL50, GridType.CONTAINER);
    {
      // Training access groups
      fs = gridBuilder.newFieldset(getString("plugins.skillmatrix.skill.trainingAccess"), getString("plugins.teamcal.access.groups"));
      final GroupsProvider groupsProvider = new GroupsProvider();
      final Collection<GroupDO> trainingAccessGroups = new GroupsProvider().getSortedGroups(getData().getTrainingAccessGroupIds());
      trainingAccessGroupsListHelper = new MultiChoiceListHelper<GroupDO>().setComparator(new GroupsComparator()).setFullList(
          groupsProvider.getSortedGroups());
      if (trainingAccessGroups != null) {
        for (final GroupDO group : trainingAccessGroups) {
          trainingAccessGroupsListHelper.addOriginalAssignedItem(group).assignItem(group);
        }
      }
      final Select2MultiChoice<GroupDO> groups = new Select2MultiChoice<GroupDO>(fs.getSelect2MultiChoiceId(),
          new PropertyModel<Collection<GroupDO>>(this.trainingAccessGroupsListHelper, "assignedItems"), groupsProvider);
      fs.add(groups);

      // Training access groups inherited rights
      fs = gridBuilder.newFieldset("", getString("plugins.skillmatrix.skill.inherited"));
      @SuppressWarnings("serial")
      final DivTextPanel labelTraining = new DivTextPanel(fs.newChildId(), new Model<String>() {
        /**
         * @see org.apache.wicket.model.Model#getObject()
         */
        @Override
        public String getObject()
        {
          if (getData().getParent() != null) {
            return getGroupnames(skillRight.getTrainingAccessGroupIds(getData().getParent()));
          }
          return "";
        }
      });
      fs.add(labelTraining);
      fs.suppressLabelForWarning();
      ajaxTargets.add(labelTraining.getLabel4Ajax());
    }

    gridBuilder.newGridPanel();
    {
      // Description
View Full Code Here

    super.init();
    {
      // Statistics
      gridBuilder.newGridPanel();
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("statistics")).suppressLabelForWarning();
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return getStatisticsValue("fibu.common.netto", getAuftragsStatistik().getNettoSum(), getAuftragsStatistik().getCounter());
        }
      }));
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return WebConstants.HTML_TEXT_DIVIDER
              + getStatisticsValue("akquise", getAuftragsStatistik().getAkquiseSum(), getAuftragsStatistik().getCounterAkquise());
        }

      }) {
        @Override
        public boolean isVisible()
        {
          return (getAuftragsStatistik().getCounterAkquise() > 0);
        }
      });
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return WebConstants.HTML_TEXT_DIVIDER
              + getStatisticsValue("fibu.auftrag.status.beauftragt", getAuftragsStatistik().getBeauftragtSum(), getAuftragsStatistik()
                  .getCounterBeauftragt());
        }
      }, TextStyle.BLUE) {
        @Override
        public boolean isVisible()
        {
          return (getAuftragsStatistik().getCounterBeauftragt() > 0);
        }
      });
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return WebConstants.HTML_TEXT_DIVIDER
              + getStatisticsValue("fibu.fakturiert", getAuftragsStatistik().getFakturiertSum(),
                  getAuftragsStatistik().getCounterFakturiert());
        }
      }) {
        @Override
        public boolean isVisible()
        {
          return (getAuftragsStatistik().getCounterFakturiert() > 0);
        }
      });
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return WebConstants.HTML_TEXT_DIVIDER
              + getStatisticsValue("fibu.auftrag.filter.type.abgeschlossenNichtFakturiert", getAuftragsStatistik().getZuFakturierenSum(),
View Full Code Here

    super.init();
    gridBuilder.newGridPanel();
    {
      // Statistics
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("statistics")).suppressLabelForWarning();
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return getString("fibu.rechnung.status.bezahlt")
              + ": "
              + CurrencyFormatter.format(getStats().getPaid())
              + WebConstants.HTML_TEXT_DIVIDER;
        }
      }));
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return getString("totalSum") + ": " + CurrencyFormatter.format(getStats().getTotal()) + WebConstants.HTML_TEXT_DIVIDER;
        }
      }));
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return getString("fibu.rechnung.offen") + ": " + CurrencyFormatter.format(getStats().getOpen()) + WebConstants.HTML_TEXT_DIVIDER;
        }
      }, TextStyle.BLUE));
      fs.add(new DivTextPanel(fs.newChildId(), new Model<String>() {
        @Override
        public String getObject()
        {
          return getString("fibu.rechnung.filter.ueberfaellig") + ": " + CurrencyFormatter.format(getStats().getOverdue());
        }
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.flowlayout.DivTextPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.