public class TextColourChooser
{
AlignmentPanel ap;
+
SequenceGroup sg;
public void chooseColour(AlignmentPanel ap, SequenceGroup sg)
final JPanel bigpanel = new JPanel(new BorderLayout());
JPanel panel = new JPanel();
bigpanel.add(panel, BorderLayout.CENTER);
- bigpanel.add(new JLabel(
- "<html><i>Select a dark and light text colour, then set the threshold to"
- + "<br>switch between colours, based on background colour</i></html>"),
- BorderLayout.NORTH);
+ bigpanel
+ .add(
+ new JLabel(
+ "<html><i>Select a dark and light text colour, then set the threshold to"
+ + "<br>switch between colours, based on background colour</i></html>"),
+ BorderLayout.NORTH);
panel.add(col1);
panel.add(slider);
panel.add(col2);
public void mousePressed(MouseEvent e)
{
Color col = JColorChooser.showDialog(bigpanel,
- "Select Colour for Text",
- col1.getBackground());
+ "Select Colour for Text", col1.getBackground());
if (col != null)
{
colour1Changed(col);
public void mousePressed(MouseEvent e)
{
Color col = JColorChooser.showDialog(bigpanel,
- "Select Colour for Text",
- col2.getBackground());
+ "Select Colour for Text", col2.getBackground());
if (col != null)
{
colour2Changed(col);
}
});
- int reply = JOptionPane.showInternalOptionDialog(
- ap,
- bigpanel,
- "Adjust Foreground Text Colour Threshold",
- JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE,
- null,
- null, null);
+ int reply = JOptionPane.showInternalOptionDialog(ap, bigpanel,
+ "Adjust Foreground Text Colour Threshold",
+ JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
+ null, null, null);
if (reply == JOptionPane.CANCEL_OPTION)
{