private void prepareSearchArea() {
    searchPanes = new CollapsiblePanes();
    searchPanes.setLayout(new JideBoxLayout(searchPanes, JideBoxLayout.Y_AXIS));
    jspSearch.setViewportView(searchPanes);

    JPanel mypanel = new JPanel();
    mypanel.setLayout(new VerticalLayout(3));
    mypanel.setBackground(Color.WHITE);

    CollapsiblePane searchPane = new CollapsiblePane(SYSTools.xx(internalClassID));
    searchPane.setStyle(CollapsiblePane.PLAIN_STYLE);
    searchPane.setCollapsible(false);

    try {
      searchPane.setCollapsed(false);
    } catch (PropertyVetoException e) {
      OPDE.error(e);
    }

    GUITools.addAllComponents(mypanel, addCommands());

    searchPane.setContentPane(mypanel);

    searchPanes.add(searchPane);
    searchPanes.addExpansion();
  }
    public ProjectsDetailedView() {
      super(pageName);

      JPanel viewContainer = (JPanel) ViewUtil.clear(this.getContentPanel());
      viewContainer.setLayout(new BorderLayout());

      JPanel infoContainer = ViewUtil.getClearPanel();
      ViewUtil.applyVerticalBoxLayout(infoContainer);

      viewContainer.add(ViewUtil.getClearBorderlessScrollPane(infoContainer), BorderLayout.CENTER);

      CollapsiblePanes panes = new CollapsiblePanes();
      panes.setOpaque(false);
      infoContainer.add(panes);

      infoPanel = new CollapsiblePane();
      infoPanel.setStyle(CollapsiblePane.TREE_STYLE);
      infoPanel.setCollapsible(false);
      panes.add(infoPanel);
      panes.addExpansion();

      content = new JPanel();
      content.setLayout(new BorderLayout());
      infoPanel.setLayout(new BorderLayout());
      infoPanel.add(content, BorderLayout.CENTER);

      details = ViewUtil.getClearPanel();

      content.add(details);
    }
 public void propertyChange(PropertyChangeEvent evt) {
   if (Boolean.TRUE.equals(evt.getNewValue())) {
     for (CollapsiblePane p : getCollapsiblePanes()) {
       if (p != evt.getSource()) {
         p.setEmphasized(false);
       }
     }
   }
 }
 @Override
 public void setMultipleSelections(List<Object[]> items) {
   if (items.isEmpty()) {
     infoPanel.setTitle("");
   } else {
     infoPanel.setTitle("Multiple projects (" + items.size() + ")");
   }
   details.removeAll();
   details.updateUI();
 }
 /**
  * Sets the selected value for the <code>CollapsiblePaneGroup</code>. Only one pane in the group
  * may be selected at a time.
  *
  * @param pane the <code>CollapsiblePane</code>
  * @param selected <code>true</code> if this pane is to be selected, otherwise <code>false</code>
  */
 public void setSelected(CollapsiblePane pane, boolean selected) {
   if (selected && pane != null && pane != _selection) {
     CollapsiblePane oldSelection = _selection;
     _selection = pane;
     if (oldSelection != null) {
       oldSelection.setEmphasized(false);
     }
     pane.setEmphasized(true);
   }
 }
  /**
   * Adds the CollapsiblePane to the group.
   *
   * @param pane the pane to be added
   */
  public void add(CollapsiblePane pane) {
    if (pane == null) {
      return;
    }
    _panes.add(pane);
    pane.addPropertyChangeListener(CollapsiblePane.EMPHASIZED_PROPERTY, this);

    if (pane.isEmphasized()) {
      if (_selection == null) {
        _selection = pane;
      } else {
        pane.setEmphasized(false);
      }
    }
  }
  public RolloverTitlePane(CollapsiblePane pane) {
    _layout = new CardLayout();

    setLayout(_layout);
    _messageLabel = new JLabel("");
    _messageLabel.setForeground(null);
    _messageLabel.setHorizontalAlignment(SwingConstants.TRAILING);
    add(_messageLabel, "Message");
    _buttonPanel = new NullPanel();
    _buttonPanel.setLayout(new JideBoxLayout(_buttonPanel, JideBoxLayout.X_AXIS));
    _buttonPanel.add(Box.createGlue(), JideBoxLayout.VARY);
    add(_buttonPanel, "Buttons");
    pane.addPropertyChangeListener(
        "rollover",
        new PropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent evt) {
            if (Boolean.TRUE.equals(evt.getNewValue())) {
              showButtons();
            } else {
              showMessage();
            }
          }
        });
    JideSwingUtilities.setOpaqueRecursively(this, false);
  }
 /**
  * Removes the CollapsiblePane from the group.
  *
  * @param pane the pane to be removed
  */
 public void remove(CollapsiblePane pane) {
   if (pane == null) {
     return;
   }
   pane.removePropertyChangeListener(this);
   if (pane == _selection) {
     _selection = null;
   }
   _panes.remove(pane);
 }
    private void refreshSelectedProject() {
      infoPanel.setTitle(projectName);

      details.removeAll();
      details.updateUI();

      if (detailsWorker != null) {
        detailsWorker.cancel(true);
      }
      detailsWorker = new DetailsWorker(projectName);
      detailsWorker.execute();
    }
Esempio n. 10
0
  private void prepareSearchArea() {
    initPhase = true;
    searchPanes = new CollapsiblePanes();
    searchPanes.setLayout(new JideBoxLayout(searchPanes, JideBoxLayout.Y_AXIS));

    CollapsiblePane searchPane = new CollapsiblePane(SYSTools.xx(internalClassID));
    searchPane.setSlidingDirection(SwingConstants.SOUTH);
    searchPane.setStyle(CollapsiblePane.PLAIN_STYLE);
    searchPane.setCollapsible(false);

    try {
      searchPane.setCollapsed(false);
    } catch (PropertyVetoException e) {
      e
          .printStackTrace(); // To change body of catch statement use File | Settings | File
                              // Templates.
    }
    JPanel mypanel = new JPanel();
    mypanel.setLayout(new VerticalLayout(3));
    mypanel.setBackground(Color.WHITE);

    JideButton printButton =
        GUITools.createHyperlinkButton(
            "Drucken",
            SYSConst.icon22print2,
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent actionEvent) {
                SYSFilesTools.print(
                    ResInfoTools.getTXReport(
                        resident,
                        true,
                        false,
                        tbMedi.isSelected(),
                        tbBilanz.isSelected(),
                        tbBerichte.isSelected(),
                        true,
                        false,
                        true,
                        true),
                    true);
              }
            });
    mypanel.add(printButton);

    searchPane.setContentPane(mypanel);
    searchPanes.add(searchPane);
    searchPanes.add(addFilters());
    searchPanes.addExpansion();

    jspSearch.setViewportView(searchPanes);

    initPhase = false;
  }
Esempio n. 11
0
  private CollapsiblePane addFilters() {

    JPanel labelPanel = new JPanel();
    labelPanel.setBackground(Color.WHITE);
    labelPanel.setLayout(new VerticalLayout(3));

    CollapsiblePane panelFilter = new CollapsiblePane(SYSTools.xx("misc.msg.Filter"));
    panelFilter.setStyle(CollapsiblePane.PLAIN_STYLE);
    panelFilter.setCollapsible(false);

    tbMedi = GUITools.getNiceToggleButton(SYSTools.xx("misc.msg.medication"));
    tbMedi.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            if (initPhase) return;
            //                SYSPropsTools.storeState(internalClassID + ":tbMedi", tbMedi);
            reloadDisplay();
          }
        });
    tbMedi.setHorizontalAlignment(SwingConstants.LEFT);
    labelPanel.add(tbMedi);
    //        SYSPropsTools.restoreState(internalClassID + ":tbMedi", tbMedi);

    tbBerichte = GUITools.getNiceToggleButton(SYSTools.xx("nursingrecords.reports"));
    tbBerichte.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            if (initPhase) return;
            //                SYSPropsTools.storeState(internalClassID + ":tbBerichte", tbBerichte);
            reloadDisplay();
          }
        });
    tbBerichte.setHorizontalAlignment(SwingConstants.LEFT);
    labelPanel.add(tbBerichte);
    //        SYSPropsTools.restoreState(internalClassID + ":tbBerichte", tbBerichte);

    tbBilanz = GUITools.getNiceToggleButton(SYSTools.xx("misc.msg.liquid.result"));
    tbBilanz.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            if (initPhase) return;
            //                SYSPropsTools.storeState(internalClassID + ":tbBilanz", tbBilanz);
            reloadDisplay();
          }
        });
    tbBilanz.setHorizontalAlignment(SwingConstants.LEFT);
    labelPanel.add(tbBilanz);
    //        SYSPropsTools.restoreState(internalClassID + ":tbBilanz", tbBilanz);

    //        tbBWInfo = GUITools.getNiceToggleButton(SYSTools.xx(PnlInfo.internalClassID));
    //        tbBWInfo.addItemListener(new ItemListener() {
    //            @Override
    //            public void itemStateChanged(ItemEvent e) {
    //                if (initPhase) return;
    //                SYSPropsTools.storeState(internalClassID + ":tbBWInfo", tbBWInfo);
    //                reloadDisplay();
    //            }
    //        });
    //        tbBilanz.setHorizontalAlignment(SwingConstants.LEFT);
    //        labelPanel.add(tbBWInfo);
    //        SYSPropsTools.restoreState(internalClassID + ":tbBWInfo", tbBWInfo);

    panelFilter.setContentPane(labelPanel);

    return panelFilter;
  }