use of uk.ac.babraham.SeqMonk.Displays.GradientScaleBar.GradientScaleBar in project SeqMonk by s-andrews.
the class HierarchicalClusterDialog method progressComplete.
public void progressComplete(String command, Object result) {
clusterPanelGroup = new JPanel();
clusterPanelGroup.setLayout(new BorderLayout());
ColourGradient gradient = (ColourGradient) gradients.getSelectedItem();
if (invertGradient.isSelected()) {
gradient = new InvertedGradient(gradient);
}
if (negativeScale) {
scaleBar = new GradientScaleBar(gradient, -2, 2);
} else {
scaleBar = new GradientScaleBar(gradient, 0, 2);
}
JPanel topBottomSplit = new JPanel();
topBottomSplit.setLayout(new GridLayout(2, 1));
topBottomSplit.add(new JPanel());
topBottomSplit.add(scaleBar);
clusterPanel = new HierarchicalClusterPanel(probes, stores, (ClusterPair) result, normalise, (ColourGradient) gradients.getSelectedItem());
clusterPanelGroup.add(clusterPanel, BorderLayout.CENTER);
clusterPanelGroup.add(topBottomSplit, BorderLayout.EAST);
getContentPane().add(clusterPanelGroup, BorderLayout.CENTER);
setLocationRelativeTo(SeqMonkApplication.getInstance());
stateChanged(new ChangeEvent(clusterSlider));
setVisible(true);
}
use of uk.ac.babraham.SeqMonk.Displays.GradientScaleBar.GradientScaleBar in project SeqMonk by s-andrews.
the class CorrelationMatrix method progressComplete.
public void progressComplete(String command, Object result) {
model = new DistanceTableModel();
tablePanel = new JPanel();
tablePanel.setLayout(new BorderLayout());
tablePanel.add(new CorrelationPanel(), BorderLayout.CENTER);
if (scaleBox.isSelected()) {
scaleBar = new GradientScaleBar(gradient, -1, 1);
} else {
scaleBar = new GradientScaleBar(gradient, model.getMinCorrelation(), model.getMaxCorrelation());
}
tablePanel.add(scaleBar, BorderLayout.EAST);
tablePanel.add(new CorrelationNamePanel(), BorderLayout.WEST);
getContentPane().add(tablePanel, BorderLayout.CENTER);
setVisible(true);
}
Aggregations