}
minColour.setBackground(cs.getMinColor());
maxColour.setBackground(cs.getMaxColor());
+ minColour.setForeground(cs.getMinColor());
+ maxColour.setForeground(cs.getMaxColor());
colourFromLabel.setState(cs.isColourByLabel());
adjusting = true;
private void jbInit() throws Exception
{
- minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
- minColour.setLabel("Min Colour");
- minColour.addActionListener(this);
+ Label minLabel = new Label("Min:"),maxLabel=new Label("Max:");
+ minLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ maxLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ //minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ //minColour.setLabel("Min Colour");
+
+ minColour.setBounds(0,0,40,27);
+ maxColour.setBounds(0,0,40,27);
+ minColour.addMouseListener(this);
maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
- maxColour.setLabel("Max Colour");
- maxColour.addActionListener(this);
+ maxColour.addMouseListener(this);
thresholdIsMin.addItemListener(this);
thresholdIsMin.setLabel("Threshold is min/max");
thresholdIsMin.setSize(new Dimension(135,23));
//thresholdIsMin.setBounds(new Rectangle(328, 3, 135, 23));
+ jPanel1.add(minLabel);
jPanel1.add(minColour);
+ jPanel1.add(maxLabel);
jPanel1.add(maxColour);
jPanel1.add(colourFromLabel);
jPanel2.add(threshold);
this.add(jPanel4);//, java.awt.BorderLayout.CENTER);
}
- Button minColour = new Button();
+ Panel minColour = new Panel();
- Button maxColour = new Button();
+ Panel maxColour = new Panel();
Panel jPanel1 = new Panel();
UserDefinedColours udc = new UserDefinedColours(this,minColour.getBackground(),owner, "Select Colour for Minimum Value"); // frame.owner,
} else {
minColour.setBackground(newCol);
+ minColour.setForeground(newCol);
minColour.repaint();
changeColour();
}
UserDefinedColours udc = new UserDefinedColours(this, maxColour.getBackground(), owner, "Select Colour for Maximum Value");
} else {
maxColour.setBackground(newCol);
+ maxColour.setForeground(newCol);
maxColour.repaint();
changeColour();
}
public void mouseReleased(MouseEvent evt)
{
- PaintRefresher.Refresh(this, fr.av.getSequenceSetId());
+ if (evt.getSource()==minColour || evt.getSource()==maxColour)
+ {
+ // relay the event
+ actionPerformed(new ActionEvent(evt.getSource(), 1, "Clicked"));
+ } else {
+ PaintRefresher.Refresh(this, fr.av.getSequenceSetId());
+ }
// ap.paintAlignment(true);
}