import jalview.schemes.Blosum62ColourScheme;
import jalview.schemes.BuriedColourScheme;
import jalview.schemes.ClustalxColourScheme;
+import jalview.schemes.ColourSchemeI;
import jalview.schemes.HelixColourScheme;
import jalview.schemes.HydrophobicColourScheme;
+import jalview.schemes.JalviewColourScheme;
import jalview.schemes.NucleotideColourScheme;
import jalview.schemes.PIDColourScheme;
import jalview.schemes.PurinePyrimidineColourScheme;
import jalview.util.UrlLink;
import java.awt.Color;
+import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
{
JMenuItem item = new JMenuItem(ff);
- item.addActionListener(new java.awt.event.ActionListener()
+ item.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
menuItem.setText(MessageManager.formatMessage(
"label.2d_rna_structure_line",
new Object[] { aa.label }));
- menuItem.addActionListener(new java.awt.event.ActionListener()
+ menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
menuItem.setText(MessageManager.formatMessage(
"label.2d_rna_sequence_name",
new Object[] { seq.getName() }));
- menuItem.addActionListener(new java.awt.event.ActionListener()
+ menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
menuItem = new JMenuItem(
MessageManager.getString("action.hide_sequences"));
- menuItem.addActionListener(new java.awt.event.ActionListener()
+ menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
menuItem = new JMenuItem(MessageManager.formatMessage(
"label.represent_group_with",
new Object[] { seq.getName() }));
- menuItem.addActionListener(new java.awt.event.ActionListener()
+ menuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
groupName.setText(MessageManager
.getString("label.edit_name_and_description_current_group"));
- if (sg.cs instanceof ZappoColourScheme)
- {
- zappoColour.setSelected(true);
- }
- else if (sg.cs instanceof TaylorColourScheme)
- {
- taylorColour.setSelected(true);
- }
- else if (sg.cs instanceof PIDColourScheme)
- {
- PIDColour.setSelected(true);
- }
- else if (sg.cs instanceof Blosum62ColourScheme)
- {
- BLOSUM62Colour.setSelected(true);
- }
- else if (sg.cs instanceof UserColourScheme)
- {
- userDefinedColour.setSelected(true);
- }
- else if (sg.cs instanceof HydrophobicColourScheme)
- {
- hydrophobicityColour.setSelected(true);
- }
- else if (sg.cs instanceof HelixColourScheme)
- {
- helixColour.setSelected(true);
- }
- else if (sg.cs instanceof StrandColourScheme)
- {
- strandColour.setSelected(true);
- }
- else if (sg.cs instanceof TurnColourScheme)
- {
- turnColour.setSelected(true);
- }
- else if (sg.cs instanceof BuriedColourScheme)
- {
- buriedColour.setSelected(true);
- }
- else if (sg.cs instanceof ClustalxColourScheme)
- {
- clustalColour.setSelected(true);
- }
- else if (sg.cs instanceof PurinePyrimidineColourScheme)
- {
- purinePyrimidineColour.setSelected(true);
- }
- else if (sg.cs instanceof NucleotideColourScheme)
- {
- nucleotideColour.setSelected(true);
- }
-
- /*
- * else if (sg.cs instanceof CovariationColourScheme) {
- * covariationColour.setSelected(true); }
- */
- else
- {
- noColourmenuItem.setSelected(true);
- }
+ setColourSelected(sg.cs);
if (sg.cs != null && sg.cs.conservationApplied())
{
label = label.substring(1, label.length() - 1); // a, b, c
final JMenuItem item = new JMenuItem(label);
item.setToolTipText(calcId);
- item.addActionListener(new java.awt.event.ActionListener()
+ item.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
JMenuItem item = new JMenuItem(label);
item.setToolTipText(MessageManager.formatMessage(
"label.open_url_param", new Object[] { url }));
- item.addActionListener(new java.awt.event.ActionListener()
+ item.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
groupMenu.setText(MessageManager.getString("label.selection"));
groupName.setText(MessageManager.getString("label.name"));
- groupName.addActionListener(new java.awt.event.ActionListener()
+ groupName.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
sequenceMenu.setText(MessageManager.getString("label.sequence"));
sequenceName.setText(MessageManager
.getString("label.edit_name_description"));
- sequenceName.addActionListener(new java.awt.event.ActionListener()
+ sequenceName.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
chooseAnnotations.setText(MessageManager
.getString("action.choose_annotations"));
- chooseAnnotations.addActionListener(new java.awt.event.ActionListener()
+ chooseAnnotations.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
sequenceDetails.setText(MessageManager
.getString("label.sequence_details"));
- sequenceDetails.addActionListener(new java.awt.event.ActionListener()
+ sequenceDetails.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
sequenceSelDetails.setText(MessageManager
.getString("label.sequence_details"));
sequenceSelDetails
- .addActionListener(new java.awt.event.ActionListener()
+.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
PIDColour.setFocusPainted(false);
unGroupMenuItem
.setText(MessageManager.getString("action.remove_group"));
- unGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
+ unGroupMenuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
createGroupMenuItem.setText(MessageManager
.getString("action.create_group"));
createGroupMenuItem
- .addActionListener(new java.awt.event.ActionListener()
+.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
outline.setText(MessageManager.getString("action.border_colour"));
- outline.addActionListener(new java.awt.event.ActionListener()
+ outline.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
outline_actionPerformed();
}
});
- nucleotideColour
- .setText(MessageManager.getString("label.nucleotide"));
- nucleotideColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- nucleotideMenuItem_actionPerformed();
- }
- });
- colourMenu.setText(MessageManager.getString("label.group_colour"));
showBoxes.setText(MessageManager.getString("action.boxes"));
showBoxes.setState(true);
showBoxes.addActionListener(new ActionListener()
sequenceFeature_actionPerformed();
}
});
- textColour.setText(MessageManager.getString("label.text_colour"));
- textColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- textColour_actionPerformed();
- }
- });
jMenu1.setText(MessageManager.getString("label.group"));
pdbStructureDialog.setText(MessageManager
.getString("label.show_pdbstruct_dialog"));
jMenu1.add(showColourText);
jMenu1.add(outline);
jMenu1.add(displayNonconserved);
+
+ initColourMenu();
+ }
+
+ /**
+ * Constructs the entries for the colour menu
+ */
+ protected void initColourMenu()
+ {
+ colourMenu.setText(MessageManager.getString("label.group_colour"));
+ textColour.setText(MessageManager.getString("label.text_colour"));
+ textColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ textColour_actionPerformed();
+ }
+ });
noColourmenuItem.setText(MessageManager.getString("label.none"));
- noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
+ noColourmenuItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
clustalColour.setText(MessageManager.getString("label.clustalx"));
- clustalColour.addActionListener(new java.awt.event.ActionListener()
+ clustalColour.setName(JalviewColourScheme.Clustal.toString());
+ clustalColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
}
});
zappoColour.setText(MessageManager.getString("label.zappo"));
- zappoColour.addActionListener(new java.awt.event.ActionListener()
+ zappoColour.setName(JalviewColourScheme.Zappo.toString());
+ zappoColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
}
});
taylorColour.setText(MessageManager.getString("label.taylor"));
- taylorColour.addActionListener(new java.awt.event.ActionListener()
+ taylorColour.setName(JalviewColourScheme.Taylor.toString());
+ taylorColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
hydrophobicityColour.setText(MessageManager
.getString("label.hydrophobicity"));
hydrophobicityColour
- .addActionListener(new java.awt.event.ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- hydrophobicityColour_actionPerformed();
- }
- });
+ .setName(JalviewColourScheme.Hydrophobic.toString());
+ hydrophobicityColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hydrophobicityColour_actionPerformed();
+ }
+ });
helixColour.setText(MessageManager.getString("label.helix_propensity"));
- helixColour.addActionListener(new java.awt.event.ActionListener()
+ helixColour.setName(JalviewColourScheme.Helix.toString());
+ helixColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
strandColour.setText(MessageManager
.getString("label.strand_propensity"));
- strandColour.addActionListener(new java.awt.event.ActionListener()
+ strandColour.setName(JalviewColourScheme.Strand.toString());
+ strandColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
}
});
turnColour.setText(MessageManager.getString("label.turn_propensity"));
- turnColour.addActionListener(new java.awt.event.ActionListener()
+ turnColour.setName(JalviewColourScheme.Turn.toString());
+ turnColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
}
});
buriedColour.setText(MessageManager.getString("label.buried_index"));
- buriedColour.addActionListener(new java.awt.event.ActionListener()
+ buriedColour.setName(JalviewColourScheme.Buried.toString());
+ buriedColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
abovePIDColour.setText(MessageManager
.getString("label.above_identity_threshold"));
- abovePIDColour.addActionListener(new java.awt.event.ActionListener()
+ abovePIDColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
userDefinedColour.setText(MessageManager
.getString("action.user_defined"));
- userDefinedColour.addActionListener(new java.awt.event.ActionListener()
+ userDefinedColour.setName(JalviewColourScheme.UserDefined.toString());
+ userDefinedColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
PIDColour
.setText(MessageManager.getString("label.percentage_identity"));
- PIDColour.addActionListener(new java.awt.event.ActionListener()
+ PIDColour.setName(JalviewColourScheme.PID.toString());
+ PIDColour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
});
BLOSUM62Colour
.setText(MessageManager.getString("label.blosum62_score"));
- BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
+ BLOSUM62Colour.setName(JalviewColourScheme.Blosum62.toString());
+ BLOSUM62Colour.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
BLOSUM62Colour_actionPerformed();
}
});
+ nucleotideColour.setText(MessageManager.getString("label.nucleotide"));
+ nucleotideColour.setName(JalviewColourScheme.Nucleotide.toString());
+ nucleotideColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ nucleotideMenuItem_actionPerformed();
+ }
+ });
purinePyrimidineColour.setText(MessageManager
.getString("label.purine_pyrimidine"));
- purinePyrimidineColour
- .addActionListener(new java.awt.event.ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- purinePyrimidineColour_actionPerformed();
- }
- });
+ purinePyrimidineColour.setName(JalviewColourScheme.PurinePyrimidine
+ .toString());
+ purinePyrimidineColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ purinePyrimidineColour_actionPerformed();
+ }
+ });
tcoffeeColour.setText(MessageManager.getString("label.tcoffee_scores"));
+ tcoffeeColour.setName(JalviewColourScheme.TCoffee.toString());
tcoffeeColour.addActionListener(new ActionListener()
{
@Override
});
/*
- * covariationColour.addActionListener(new java.awt.event.ActionListener() {
+ * covariationColour.addActionListener(new ActionListener() {
* public void actionPerformed(ActionEvent e) {
* covariationColour_actionPerformed(); } });
*/
}
/**
- * Adds items to the group colour sub-menu
+ * Builds the group colour sub-menu, including any user-defined colours which
+ * were loaded at startup or during the Jalview session
*/
protected void buildColourMenu()
{
SequenceGroup sg = getGroup();
colourMenu.removeAll();
colourMenu.add(textColour);
+ colourMenu.addSeparator();
colourMenu.add(noColourmenuItem);
colourMenu.add(clustalColour);
// in Java 8, isApplicableTo can be a static method on the interface
tcoffeeColour
.setEnabled(new TCoffeeColourScheme(sg).isApplicableTo(sg));
+ /*
+ * add some of these items to a ButtonGroup so their
+ * selection is mutually exclusive
+ */
+ ButtonGroup colours = new ButtonGroup();
+
+ /*
+ * add any user-defined colours loaded on startup or
+ * during the application session
+ */
SortedMap<String, UserColourScheme> userColourSchemes = UserDefinedColours
.getUserColourSchemes();
if (userColourSchemes != null)
{
for (String userColour : userColourSchemes.keySet())
- {
- JMenuItem item = new JMenuItem(userColour);
+ {
+ JRadioButtonMenuItem item = new JRadioButtonMenuItem(userColour);
+ item.setName(userColour); // button name identifies selected colour
item.addActionListener(new ActionListener()
{
@Override
}
});
colourMenu.add(item);
+ colours.add(item);
}
}
colourMenu.add(userDefinedColour);
colourMenu.add(conservationMenuItem);
colourMenu.add(abovePIDColour);
- /*
- * add some of these items to a ButtonGroup so their
- * selection is mutually exclusive
- */
- ButtonGroup colours = new ButtonGroup();
colours.add(noColourmenuItem);
colours.add(clustalColour);
colours.add(BLOSUM62Colour);
}
}
+ /**
+ * Marks as selected the colour menu item matching the given name, or the
+ * first item ('None') if no match is found
+ *
+ * @param cs
+ */
+ protected void setColourSelected(ColourSchemeI cs)
+ {
+ noColourmenuItem.setSelected(true);
+ if (cs == null)
+ {
+ return;
+ }
+
+ String schemeName = cs.getSchemeName();
+ /*
+ * look for a radio button with a name that matches the colour name
+ * (note the button text may not as it may be internationalised)
+ */
+ for (Component menuItem : colourMenu.getMenuComponents())
+ {
+ if (menuItem instanceof JRadioButtonMenuItem)
+ {
+ if (schemeName.equals(((JRadioButtonMenuItem) menuItem).getName()))
+ {
+ ((JRadioButtonMenuItem) menuItem).setSelected(true);
+ return;
+ }
+ }
+ }
+ }
+
}
import java.awt.BorderLayout;
import java.awt.Color;
+import java.awt.Component;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
public class GAlignFrame extends JInternalFrame
{
- protected static final String USER_DEFINED_COLOUR_SCHEME = "USER_DEFINED";
-
protected JMenuBar alignFrameMenuBar = new JMenuBar();
protected JMenuItem closeMenuItem = new JMenuItem();
}
}
- public void setColourSelected(String defaultColour)
+ /**
+ * Marks as selected the colour menu item matching the given name, or the
+ * first item ('None') if no match is found
+ *
+ * @param colourName
+ */
+ protected void setColourSelected(String colourName)
{
- JalviewColourScheme scheme = JalviewColourScheme.forName(defaultColour);
- if (scheme == null)
+ noColourmenuItem.setSelected(true);
+ if (colourName == null)
{
- noColourmenuItem.setSelected(true);
return;
}
- switch (scheme)
- {
-
- case Clustal:
- clustalColour.setSelected(true);
- break;
- case Blosum62:
- BLOSUM62Colour.setSelected(true);
- break;
- case PID:
- PIDColour.setSelected(true);
- break;
- case Zappo:
- zappoColour.setSelected(true);
- break;
- case Taylor:
- taylorColour.setSelected(true);
- break;
- case Hydrophobic:
- hydrophobicityColour.setSelected(true);
- break;
- case Helix:
- helixColour.setSelected(true);
- break;
- case Strand:
- strandColour.setSelected(true);
- break;
- case Turn:
- turnColour.setSelected(true);
- break;
- case Buried:
- buriedColour.setSelected(true);
- break;
- case Nucleotide:
- nucleotideColour.setSelected(true);
- break;
- case TCoffee:
- tcoffeeColour.setSelected(true);
- break;
- case PurinePyrimidine:
- purinePyrimidineColour.setSelected(true);
- break;
- // case RNAInteraction:
- // RNAInteractionColour.setSelected(true);
- // break;
- case RNAHelices:
- rnahelicesColour.setSelected(true);
- break;
- case UserDefined:
- userDefinedColour.setSelected(true);
- break;
- default:
- noColourmenuItem.setSelected(true);
- break;
+
+ /*
+ * look for a radio button with a name that matches the colour name
+ * (note the button text may not as it may be internationalised)
+ */
+ for (Component menuItem : colourMenu.getMenuComponents())
+ {
+ if (menuItem instanceof JRadioButtonMenuItem)
+ {
+ if (colourName.equals(((JRadioButtonMenuItem) menuItem).getName()))
+ {
+ ((JRadioButtonMenuItem) menuItem).setSelected(true);
+ return;
+ }
}
+ }
}
private void jbInit() throws Exception
{
final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
userColour);
- radioItem.setName(USER_DEFINED_COLOUR_SCHEME);
+ radioItem.setName(userColour);
radioItem.addMouseListener(new MouseAdapter()
{
@Override
colours.add(purinePyrimidineColour);
// colours.add(covariationColour);
colours.add(tcoffeeColour);
- colours.add(RNAInteractionColour);
+ // colours.add(RNAInteractionColour);
setColourSelected(Cache.getDefault(Preferences.DEFAULT_COLOUR,
ResidueColourScheme.NONE));
/**
* Constructs the entries on the Colour menu (but does not add them to the
- * menu)
+ * menu). The 'name' property of each item is set to the canonical name of the
+ * corresponding colour scheme (may not match the display name), to allow
+ * selection of items by colour scheme name.
*/
protected void initColourMenu()
{
});
clustalColour = new JRadioButtonMenuItem(
MessageManager.getString("label.clustalx"));
+ clustalColour.setName(JalviewColourScheme.Clustal.toString());
clustalColour.addActionListener(new ActionListener()
{
@Override
});
zappoColour = new JRadioButtonMenuItem(
MessageManager.getString("label.zappo"));
+ zappoColour.setName(JalviewColourScheme.Zappo.toString());
zappoColour.addActionListener(new ActionListener()
{
@Override
});
taylorColour = new JRadioButtonMenuItem(
MessageManager.getString("label.taylor"));
+ taylorColour.setName(JalviewColourScheme.Taylor.toString());
taylorColour.addActionListener(new ActionListener()
{
@Override
hydrophobicityColour = new JRadioButtonMenuItem(
MessageManager
.getString("label.hydrophobicity"));
+ hydrophobicityColour
+ .setName(JalviewColourScheme.Hydrophobic.toString());
hydrophobicityColour.addActionListener(new ActionListener()
{
@Override
});
helixColour = new JRadioButtonMenuItem(
MessageManager.getString("label.helix_propensity"));
+ helixColour.setName(JalviewColourScheme.Helix.toString());
helixColour.addActionListener(new ActionListener()
{
@Override
strandColour = new JRadioButtonMenuItem(
MessageManager
.getString("label.strand_propensity"));
+ strandColour.setName(JalviewColourScheme.Strand.toString());
strandColour.addActionListener(new ActionListener()
{
@Override
});
turnColour = new JRadioButtonMenuItem(
MessageManager.getString("label.turn_propensity"));
+ turnColour.setName(JalviewColourScheme.Turn.toString());
turnColour.addActionListener(new ActionListener()
{
@Override
});
buriedColour = new JRadioButtonMenuItem(
MessageManager.getString("label.buried_index"));
+ buriedColour.setName(JalviewColourScheme.Buried.toString());
buriedColour.addActionListener(new ActionListener()
{
@Override
userDefinedColour = new JRadioButtonMenuItem(
MessageManager
.getString("action.user_defined"));
+ userDefinedColour.setName(JalviewColourScheme.UserDefined.toString());
userDefinedColour.addActionListener(new ActionListener()
{
@Override
});
PIDColour = new JRadioButtonMenuItem(
MessageManager.getString("label.percentage_identity"));
+ PIDColour.setName(JalviewColourScheme.PID.toString());
PIDColour.addActionListener(new ActionListener()
{
@Override
});
BLOSUM62Colour = new JRadioButtonMenuItem(
MessageManager.getString("label.blosum62_score"));
+ BLOSUM62Colour.setName(JalviewColourScheme.Blosum62.toString());
BLOSUM62Colour.addActionListener(new ActionListener()
{
@Override
});
nucleotideColour = new JRadioButtonMenuItem(
MessageManager.getString("label.nucleotide"));
+ nucleotideColour.setName(JalviewColourScheme.Nucleotide.toString());
nucleotideColour.addActionListener(new ActionListener()
{
@Override
});
purinePyrimidineColour = new JRadioButtonMenuItem(
MessageManager.getString("label.purine_pyrimidine"));
+ purinePyrimidineColour.setName(JalviewColourScheme.PurinePyrimidine.toString());
purinePyrimidineColour.addActionListener(new ActionListener()
{
@Override
tcoffeeColour = new JRadioButtonMenuItem(
MessageManager.getString("label.tcoffee_scores"));
+ tcoffeeColour.setName(JalviewColourScheme.TCoffee.toString());
tcoffeeColour.setEnabled(false);
tcoffeeColour.addActionListener(new ActionListener()
{
}
});
- RNAInteractionColour = new JRadioButtonMenuItem("RNA Interaction type");
- RNAInteractionColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- RNAInteractionColour_actionPerformed();
- }
- });
+ // RNAInteractionColour = new JRadioButtonMenuItem("RNA Interaction type");
+ // RNAInteractionColour.setName("RNA Interaction");
+ // RNAInteractionColour.addActionListener(new ActionListener()
+ // {
+ // @Override
+ // public void actionPerformed(ActionEvent e)
+ // {
+ // RNAInteractionColour_actionPerformed();
+ // }
+ // });
/*
* covariationColour = new JRadioButtonMenuItem("Covariation");
* covariationColour.addActionListener(new ActionListener() { public void
});
noColourmenuItem = new JRadioButtonMenuItem(
MessageManager.getString("label.none"));
+ noColourmenuItem.setName("None");
noColourmenuItem.addActionListener(new ActionListener()
{
@Override