Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXTaskPane


    DCTaskPaneContainer taskPaneContainer = new DCTaskPaneContainer();
    return taskPaneContainer;
  }

  public static JXTaskPane createTaskPane(String title, Icon icon) {
    JXTaskPane taskPane = new JXTaskPane();
    Container cp = taskPane.getContentPane();
    ((JComponent) cp).setBorder(new MatteBorder(0, 1, 1, 1, WidgetUtils.BG_COLOR_DARKEST));
    taskPane.setFocusable(false);
    taskPane.setTitle(title);
    if (icon != null) {
      taskPane.setIcon(icon);
    }
    return taskPane;
  }
View Full Code Here


    PropertyWidget<?> propertyWidget = getPropertyWidgetFactory().create(propertyDescriptor);
    return propertyWidget;
  }

  protected void addTaskPane(Icon icon, String title, JComponent content) {
    JXTaskPane taskPane = WidgetFactory.createTaskPane(title, icon);
    taskPane.add(content);
    _taskPaneContainer.add(taskPane);
  }
View Full Code Here

    final AnalyzerBeanDescriptor<?> descriptor = analyzerJob.getDescriptor();
    final Icon icon = IconUtils.getDescriptorIcon(descriptor, IconUtils.ICON_SIZE_LARGE);

    final String resultLabel = LabelUtils.getLabel(analyzerJob);

    final JXTaskPane taskPane = WidgetFactory.createTaskPane(resultLabel, icon);

    final DCPanel taskPanePanel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    taskPanePanel.setLayout(new BorderLayout());
    taskPane.add(taskPanePanel);

    taskPanePanel.add(new LoadingIcon());
    _progressInformationPanel.addUserLog("Rendering result for " + resultLabel);

    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        String title = taskPane.getTitle();
        JXTaskPane[] taskPanes = _taskPaneContainer.getTaskPanes();
        boolean added = false;
        for (int i = 0; i < taskPanes.length; i++) {
          JXTaskPane existingTaskPane = taskPanes[i];
          if (existingTaskPane.getTitle().compareTo(title) > 0) {
            _taskPaneContainer.add(taskPane, i);
            added = true;
            break;
          }
        }
View Full Code Here

    return panel;
  }

  public void addRenderedResult(JComponent component) {
    ImageIcon icon = imageManager.getImageIcon("images/actions/drill-to-detail.png");
    JXTaskPane taskPane = WidgetFactory.createTaskPane("Detailed results", icon);

    final DCPanel taskPanePanel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    taskPanePanel.setBorder(new EmptyBorder(4, 4, 4, 4));
    taskPanePanel.setLayout(new BorderLayout());
    taskPanePanel.add(component);

    taskPane.add(taskPanePanel);

    _taskPaneContainer.add(taskPane);
  }
View Full Code Here

  }

  private JXTaskPane createTaskPane(final FilterJobBuilder<?, ?> fjb) {
    String title = LabelUtils.getLabel(fjb);
    Icon icon = IconUtils.getDescriptorIcon(fjb.getDescriptor(), IconUtils.ICON_SIZE_SMALL);
    final JXTaskPane taskPane = WidgetFactory.createTaskPane(title, icon);
    taskPane.add(_presenters.get(fjb).createJComponent());
    return taskPane;
  }
View Full Code Here

          .getRenderer(fjb, ComponentJobBuilderRenderingFormat.class);
      final FilterJobBuilderPresenter presenter = (FilterJobBuilderPresenter) renderer.render(fjb);
      _presenters.put(fjb, presenter);
    }

    final JXTaskPane taskPane = createTaskPane(fjb);
    taskPane.addMouseListener(new JobBuilderTaskPaneTextMouseListener(_analysisJobBuilder, fjb, taskPane));
    _taskPanes.put(fjb, taskPane);
    _taskPaneContainer.add(taskPane);
  }
View Full Code Here

  }

  @Override
  public void onRemove(FilterJobBuilder<?, ?> fjb) {
    _presenters.remove(fjb);
    JXTaskPane taskPane = _taskPanes.remove(fjb);
    if (taskPane != null) {
      _taskPaneContainer.remove(taskPane);
      updateUI();
    }
  }
View Full Code Here

    }
  }

  protected Component createContentPane()
  {
    taskPane = new JXTaskPane();
    taskPane.setSpecial(true);
    taskPane.setCollapsed(false);
    taskPane.setTitle(Messages.getString("StyleDefinitionEditorDialog.TaskTitle"));
    taskPane.add(new AddStyleRuleAction(editorContext));
View Full Code Here

  {
    final String selectorText = convertSelectorText(rule);
    final JTextField selector = new JTextField();
    selector.setText(selectorText);

    final JXTaskPane pane = new JXTaskPane();
    pane.setTitle(Messages.getString("StyleDefinitionEditorDialog.RuleTitle", selectorText));
    pane.add(new RemoveStyleRuleAction(editorContext, rule));
    pane.add(selector);

    final SimpleStyleEditorPanel comp = new SimpleStyleEditorPanel(editorContext);
    comp.setReportDesignerContext(editorContext.getDesignerContext());
    comp.setData(rule);
    pane.add(comp);

    selector.getDocument().addDocumentListener(new SelectorUpdateHandler(selector, rule, pane));

    taskPanes.put(rule, pane);
    taskPaneContainer.add(pane);
View Full Code Here

    taskPaneContainer.repaint();
  }

  private void removeRulePane(final ElementStyleRule rule)
  {
    final JXTaskPane jxTaskPane = taskPanes.get(rule);
    if (jxTaskPane != null)
    {
      this.taskPaneContainer.remove(jxTaskPane);
      this.taskPanes.remove(rule);
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.JXTaskPane

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.