else gradPanel.setEnabled(true);
else { gradPanel.setEnabled(true); modeBar.setEnabled(true); }
    private void buildUI()    {        setLayout(new BorderLayout());                JPanel mainPanel = new JPanel();        mainPanel.setLayout(new BorderLayout());                treePanel.addListener(new HeatMapTreeListener()        {            public void nodeSelected(SemanticTypeTree.TreeNode node)            {                if(!(node instanceof SemanticTypeTree.ElementNode))                {                    gradPanel.setEnabled(false);                }                else gradPanel.setEnabled(true);            }        });                JScrollPane scrollPane = new JScrollPane(treePanel);        scrollPane.setPreferredSize(new Dimension(250,200));        scrollPane.setSize(new Dimension(250,200));        mainPanel.add(scrollPane,BorderLayout.CENTER);                JPanel controlPanel = new JPanel();                gradPanel.setPreferredSize(new Dimension(250,90));        gradPanel.setSize(new Dimension(250,90));        gradPanel.setEnabled(false);                controlPanel.setLayout(new BorderLayout());        controlPanel.add(gradPanel,BorderLayout.CENTER);                JPanel barPanel = new JPanel();        barPanel.setLayout(new BorderLayout());        barPanel.add(graphPanel,BorderLayout.NORTH);        barPanel.add(modeBar,BorderLayout.CENTER);                JPanel scalePanel = new JPanel();        scalePanel.add(scaleBar,BorderLayout.CENTER);                controlPanel.add(barPanel,BorderLayout.NORTH);        controlPanel.add(scalePanel,BorderLayout.SOUTH);                mainPanel.add(controlPanel,BorderLayout.SOUTH);                add(mainPanel,BorderLayout.CENTER);        add(statusPanel,BorderLayout.SOUTH);                statusPanel.showMessage("Dataset attributes loaded.");    }