X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGUserDefinedColours.java;h=8d7444539f07bcf66d3c4b40c358c3cc10a510bb;hb=bf6a17fc26cea1f4295fcedea29a29f2404a5f34;hp=49174a0ea3b92e811a6e9ffbbd26d33d7139e4ff;hpb=efc31b4a8d5cee63555586804a2b79c06bdb5a14;p=jalview.git diff --git a/src/jalview/jbgui/GUserDefinedColours.java b/src/jalview/jbgui/GUserDefinedColours.java index 49174a0..8d74445 100755 --- a/src/jalview/jbgui/GUserDefinedColours.java +++ b/src/jalview/jbgui/GUserDefinedColours.java @@ -41,9 +41,23 @@ public class GUserDefinedColours extends JPanel protected JButton loadbutton = new JButton(); protected JButton savebutton = new JButton(); protected JButton cancelButton = new JButton(); - FlowLayout flowLayout1 = new FlowLayout(); - - /** + JPanel namePanel = new JPanel(); + JLabel jLabel1 = new JLabel(); + protected JTextField schemeName = new JTextField(); + BorderLayout borderLayout1 = new BorderLayout(); + JPanel panel1 = new JPanel(); + JPanel jPanel1 = new JPanel(); + JPanel jPanel3 = new JPanel(); + BorderLayout borderLayout3 = new BorderLayout(); + GridBagLayout gridBagLayout1 = new GridBagLayout(); + BorderLayout borderLayout2 = new BorderLayout(); + FlowLayout flowLayout1 = new FlowLayout(); + BorderLayout borderLayout4 = new BorderLayout(); + JPanel jPanel4 = new JPanel(); + BorderLayout borderLayout5 = new BorderLayout(); + JPanel jPanel6 = new JPanel(); + JLabel label = new JLabel(); + /** * Creates a new GUserDefinedColours object. */ public GUserDefinedColours() @@ -65,10 +79,10 @@ public class GUserDefinedColours extends JPanel */ private void jbInit() throws Exception { - this.setLayout(flowLayout1); + this.setLayout(borderLayout4); buttonPanel.setLayout(gridLayout); - gridLayout.setColumns(6); - gridLayout.setRows(4); + gridLayout.setColumns(4); + gridLayout.setRows(6); okButton.setFont(new java.awt.Font("Verdana", 0, 11)); okButton.setText("OK"); okButton.addActionListener(new java.awt.event.ActionListener() @@ -116,16 +130,56 @@ public class GUserDefinedColours extends JPanel }); this.setBackground(new Color(212, 208, 223)); jPanel2.setOpaque(false); - colorChooser.setOpaque(false); - this.add(colorChooser, null); - this.add(buttonPanel, null); - this.add(jPanel2, null); - jPanel2.add(okButton, null); - jPanel2.add(applyButton, null); - jPanel2.add(loadbutton, null); - jPanel2.add(savebutton, null); - jPanel2.add(cancelButton, null); - } + jPanel2.setLayout(borderLayout3); + colorChooser.setOpaque(false); + jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + jLabel1.setText("Name"); + namePanel.setMinimumSize(new Dimension(300, 31)); + namePanel.setOpaque(false); + namePanel.setPreferredSize(new Dimension(240, 25)); + namePanel.setToolTipText(""); + namePanel.setLayout(borderLayout1); + schemeName.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + schemeName.setPreferredSize(new Dimension(105, 21)); + schemeName.setText(""); + schemeName.setHorizontalAlignment(SwingConstants.CENTER); + panel1.setLayout(flowLayout1); + panel1.setOpaque(false); + jPanel1.setOpaque(false); + jPanel3.setOpaque(false); + jPanel4.setLayout(borderLayout5); + jPanel6.setBackground(Color.pink); + jPanel6.setMinimumSize(new Dimension(10, 70)); + jPanel6.setOpaque(false); + jPanel6.setPreferredSize(new Dimension(10, 45)); + jPanel6.setLayout(null); + label.setFont(new java.awt.Font("Verdana", Font.ITALIC, 10)); + label.setOpaque(false); + label.setPreferredSize(new Dimension(260, 34)); + label.setText( + "Save your colour scheme with a unique name and it will be added " + + "to the Colour menu."); + + jPanel3.add(savebutton); + jPanel3.add(loadbutton); + jPanel1.add(applyButton); + jPanel1.add(okButton); + jPanel1.add(cancelButton); + jPanel2.add(jPanel3, java.awt.BorderLayout.NORTH); + jPanel2.add(jPanel1, java.awt.BorderLayout.SOUTH); + + namePanel.add(schemeName, java.awt.BorderLayout.CENTER); + namePanel.add(jLabel1, java.awt.BorderLayout.WEST); + panel1.add(namePanel, null); + panel1.add(buttonPanel, null); + panel1.add(jPanel2, null); + panel1.add(label); + + jPanel4.add(panel1, java.awt.BorderLayout.CENTER); + jPanel4.add(jPanel6, java.awt.BorderLayout.NORTH); + this.add(jPanel4, java.awt.BorderLayout.CENTER); + this.add(colorChooser, java.awt.BorderLayout.EAST); + } /** * DOCUMENT ME!