Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXTaskPane


  JXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();
 
  this._scr_ = new JScrollPane(taskpanecontainer);

  // create a taskpane, and set it's title and icon
  JXTaskPane tsk1 = new JXTaskPane();
  tsk1.setTitle("My Tasks 1");
  tsk1.setIcon(Images.Quit.getIcon(24, 24));

  // add various actions and components to the taskpane
  //tsk1.add(_xlb1_);
 
  /*tsk1.add(new AbstractAction() {
    {
      putValue(Action.NAME, "task pane item 1 : an action");
      putValue(Action.SHORT_DESCRIPTION, "perform an action");
      putValue(Action.SMALL_ICON, Images.NetworkConnected.getIcon(32, 32));
    }
    public void actionPerformed(ActionEvent e) {
      _xlb1_.setText("an action performed");
    }
  });*/
 
  // ---
 
  // create a taskpane, and set it's title and icon
  JXTaskPane tsk2 = new JXTaskPane();
  tsk2.setTitle("My Tasks 2");
  tsk2.setIcon(Images.Quit.getIcon(24, 24));

  // add various actions and components to the taskpane
  JPanel pnl2 = new JPanel();
  //JScrollPane scr2 = new JScrollPane(pnl2); // same as scrollPane.setViewportView(table);
 
  tsk2.add(pnl2);
  //pnl2.add(_xlb2_);
 
  JButton btn2 = new JButton("btn2");
 
  pnl2.add(btn2);
View Full Code Here


  // create a taskpanecontainer
  JXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();

  // create a taskpane, and set it's title and icon
  JXTaskPane taskpane = new JXTaskPane();
  taskpane.setTitle("My Tasks");
  taskpane.setIcon(Images.Quit.getIcon(24, 24));

  // add various actions and components to the taskpane
  taskpane.add(label);
  taskpane.add(new AbstractAction() {
    {
      putValue(Action.NAME, "task pane item 2 : an action");
      putValue(Action.SHORT_DESCRIPTION, "perform an action");
      putValue(Action.SMALL_ICON, Images.NetworkConnected.getIcon(32, 32));
    }
View Full Code Here

    }
   

    private JComponent createButtonStack(JComponent demoContainer) {
        JComponent buttonStack = new JXTaskPaneContainer();
        JXTaskPane taskPane = new JXTaskPane();
        taskPane.setTitle("demo");
        taskPane.add(createTextAction(demoContainer));
        taskPane.add(createPageAction(demoContainer));
        buttonStack.add(taskPane);
        return buttonStack;
    }
View Full Code Here

    private void createTaskPaneDemo() {
        JXTaskPaneContainer tpc = new JXTaskPaneContainer();
       
        // "System" GROUP
        systemGroup = new JXTaskPane();
        systemGroup.setName("systemGroup");
        tpc.add(systemGroup);
       
        // "Office" GROUP
        officeGroup = new JXTaskPane();
        officeGroup.setName("officeGroup");
        tpc.add(officeGroup);
       
        // "SEE ALSO" GROUP and ACTIONS
        seeAlsoGroup = new JXTaskPane();
        seeAlsoGroup.setName("seeAlsoGroup");
        tpc.add(seeAlsoGroup);
       
        // "Details" GROUP
        detailsGroup = new JXTaskPane();
        detailsGroup.setName("detailsGroup");
       
        //TODO better injection for editor area
        JEditorPane area = new JEditorPane("text/html", "<html>");
        area.setName("detailsArea");
View Full Code Here

        };
        container.setLayout(new VerticalLayout(0));
        container.setBorder(BorderFactory.createEmptyBorder());
        for (Demo demo : demoSet) {
            String category = demo.getCategory();
            JXTaskPane taskPane = getTaskPane(category);
            if (taskPane == null) {
                taskPane = createTaskPane(demo);
                addTaskPane(taskPane, category);
                container.add(taskPane);
            }
View Full Code Here

        }
        categoryMap.put(category, taskPane);
    }

    private JXTaskPane createTaskPane(Demo demo) {
        JXTaskPane taskPane = new JXTaskPane();
        taskPane.setTitle(demo.getCategory());
        taskPane.setName(demo.getCategory());
        return taskPane;
    }
View Full Code Here

        GridBagConstraints c = new GridBagConstraints();
        c.fill = GridBagConstraints.NONE;
        c.ipadx=10;
        c.ipady=5;
       
        JXTaskPane taskPane = new JXTaskPane();
        JPanel taskPanel = new JPanel();
       
        GridBagLayout gridbag;
        gridbag=new GridBagLayout();
        taskPanel.setLayout(gridbag);

        taskPane.setLayout(new BorderLayout());
        taskPane.add(taskPanel, BorderLayout.CENTER);
        taskPane.setTitle(" " + groupName);
        //taskPane.setExpanded(false);         
          //label.setFont(label.getFont().deriveFont(Font.BOLD,13.0f));
         
        c.weightx = 0.0;
        c.fill = GridBagConstraints.BOTH;
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.gridx = 0;
        c.gridy = row;
        c.anchor= c.WEST;
             gridbag.setConstraints(taskPanel, c);
            
             taskPaneContainer.add(taskPane);
              //panel.add(grpLabelPanel);
        c.gridwidth = 1;
        c.fill = GridBagConstraints.NONE;       
       
              taskPane.setExpanded(!collapseOrNot);

        for(int j=0; j<members.size(); j++){
          row++;
         
          FieldDescriptor prop = (FieldDescriptor)members.get(j);
View Full Code Here

//        private JTaskPaneGroup taskGroup;
        private JXTaskPane taskGroup;
       
        private ScriptGroup(String key) {
//            taskGroup = new JTaskPaneGroup();
            taskGroup = new JXTaskPane();
            taskGroup.applyComponentOrientation(getComponentOrientation());
            taskGroup.setFocusable(false);
            taskGroup.setRequestFocusEnabled(false);
            taskGroup.setTitle(AppLocal.getIntString(key));    
            taskGroup.setVisible(false); // Only groups with sons are visible.
View Full Code Here

  private void init() {
    this.setName("navigationPanel");
    this.textPanelLink = new JXHyperlink();
    this.textPanelLink.setName("textPanelLinkName");
    this.textPanelLink.setText("Show text panel");
    this.textTaskPanel = new JXTaskPane();
    this.textTaskPanel.setName("imageView");
    this.textTaskPanel.setTitle("Images");
    this.textTaskPanel.add(textPanelLink);
    this.add(this.textTaskPanel);
  }
View Full Code Here

        task.getWorker().cancel(true);
      }
    });
    panel.add(button, BorderLayout.EAST);

    final JXTaskPane tp = new JXTaskPane();
    tp.setFont(new Font("Arial", Font.PLAIN, 12)); //$NON-NLS-1$
    tp.setTitle(task.getTitle());
    tp.setIcon(new ImageIcon(HelperImage.getScaledImage(task.getIcon().getIcon(), new Dimension(16, 0))));
    tp.setFocusable(false);
    tp.add(panel);

    return tp;
  }
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.