Package com.jidesoft.pane

Examples of com.jidesoft.pane.CollapsiblePane


      }
     
      getContentPane().setLayout(new BorderLayout());
      CollapsiblePanes panes = new CollapsiblePanes();

      CollapsiblePane descriptionPane = new CollapsiblePane("Using Filters");
      MultilineLabel label = new MultilineLabel(getDescription());
      label.setBorder(BorderFactory.createEmptyBorder(8, 10, 8, 10));
      descriptionPane.setContentPane(label);

      try
      {
         descriptionPane.setCollapsed(true);
      }
      catch (PropertyVetoException e)
      {
         log.warn(e.getMessage(), e);
      }

      CollapsiblePane comboPane = new CollapsiblePane("Saved Filters");
      comboPane.getContentPane().setLayout(new BoxLayout(comboPane.getContentPane(), BoxLayout.X_AXIS));
      JPanel comboPanel = new JPanel();
      comboPanel.setLayout(new BoxLayout(comboPanel, BoxLayout.X_AXIS));
      comboPanel.setBorder(BorderFactory.createEmptyBorder(8, 10, 8, 10));
      comboPane.setEmphasized(true);

      try
      {
         comboPane.setCollapsed(true);
      }
      catch (PropertyVetoException e)
      {
         log.warn(e.getMessage(), e);
      }

      filterCombo = new JComboBox(filterHistory);
      filterCombo.setEditable(false);
      comboPanel.add(filterCombo);
      comboPanel.add(comboFilterButton);
      comboPanel.add(comboRemoveFilterButton);
      comboPane.setContentPane(comboPanel);

      CollapsiblePane fieldPane = new CollapsiblePane("New Filter");
      JPanel fieldPanel = new JPanel();
      fieldPane.setEmphasized(true);
      fieldPanel.setLayout(new BoxLayout(fieldPanel, BoxLayout.X_AXIS));
      fieldPanel.setBorder(BorderFactory.createEmptyBorder(8, 10, 8, 10));
      fieldPanel.add(filterField);
      fieldPanel.add(textFilterButton);
      fieldPanel.add(textSaveFilterButton);
      fieldPane.setContentPane(fieldPanel);

      panes.add(fieldPane);
      panes.add(comboPane);
      panes.add(descriptionPane);
View Full Code Here


  public CollapsiblePane getPane(boolean withAutoSaveFunction, FormBuilder form) {
    // build it
    final String id = "form.header.collapsed." + form.getIdofHeader(this);

    // build it
    CollapsiblePane ac = icon == null ? new CollapsiblePane(title) : new CollapsiblePane(title, IconCache.get(icon));
    ac.setStyle(CollapsiblePane.DROPDOWN_STYLE);
    ac.addCollapsiblePaneListener(new CollapsiblePaneAdapter() {

      @Override
      public void paneExpanded(CollapsiblePaneEvent event) {
        Setting.set(id, false);

      }

      @Override
      public void paneCollapsed(CollapsiblePaneEvent event) {
        Setting.set(id, true);

      }
    });

    // load setting
    try {
      ac.setCollapsed(Setting.exist(id) ? Setting.get(id, false) : collapsed);
    } catch (PropertyVetoException e) {
      YEx.info("Can't collapsed " + title, e);
    }
    // acp.setContentAreaFilled(true);
    JPanel p = new JPanel(new BorderLayout());
    p.add(getPanelFromBuilder(withAutoSaveFunction), BorderLayout.CENTER);
    p.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    ac.setContentPane(p);
    return ac;
  }
View Full Code Here

TOP

Related Classes of com.jidesoft.pane.CollapsiblePane

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.