use of org.mskcc.colorgradient.ColorGradientWidget in project EnrichmentMapApp by BaderLab.
the class GradientLegendPanel method createExpressionLegendPanel.
private static JPanel createExpressionLegendPanel(DataSetColorRange range) {
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
ParallelGroup hGroup = layout.createParallelGroup(Alignment.CENTER, true);
SequentialGroup vGroup = layout.createSequentialGroup();
layout.setHorizontalGroup(hGroup);
layout.setVerticalGroup(vGroup);
ColorGradientWidget legend = ColorGradientWidget.getInstance("", range.getTheme(), range.getRange(), true, ColorGradientWidget.LEGEND_POSITION.NA);
hGroup.addComponent(legend, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE);
vGroup.addComponent(legend, 25, 25, 25);
if (LookAndFeelUtil.isAquaLAF())
panel.setOpaque(false);
panel.revalidate();
panel.setOpaque(false);
return panel;
}
Aggregations