io.github.homebeaver.swingset.demo.DemoJXTasks Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swingset3-demos Show documentation
Show all versions of swingset3-demos Show documentation
Demonstrating the abilities of the Swing UI Toolkit swingset2 and swingx aka swingset3
The newest version!
package io.github.homebeaver.swingset.demo;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import org.jdesktop.swingx.JXTaskPane;
import org.jdesktop.swingx.JXTaskPaneContainer;
import org.jdesktop.swingx.action.AbstractActionExt;
import org.jdesktop.swingx.treetable.TreeTableModel;
import io.github.homebeaver.swingset.demo.DemoAction.Category;
/**
* a JXTaskPane singleton for DEMO Tasks
*/
public class DemoJXTasks extends JXTaskPane {
private static final long serialVersionUID = -5696726866113684525L;
private static final Logger LOG = Logger.getLogger(DemoJXTasks.class.getName());
private static DemoJXTasks INSTANCE = null;
/**
* @return the singleton
*/
public static DemoJXTasks getInstance() {
if(INSTANCE==null) INSTANCE = new DemoJXTasks();
return INSTANCE;
}
/**
* get TaskPaneContainer
* @return JXTaskPaneContainer
*/
public static JXTaskPaneContainer getTaskPaneContainer() {
return getInstance().tpc;
}
private TreeTableModel model = DemoTreeTableModel.getInstance();
private JXTaskPaneContainer tpc = new JXTaskPaneContainer();
private Map categoryToTask = new HashMap();
private DemoJXTasks() {
super();
Object r = model.getRoot();
int n = model.getChildCount(r);
LOG.fine("------------------- "+r + " with "+n+" childs.");
for(int i=0; i© 2015 - 2025 Weber Informatics LLC | Privacy Policy