- if (pe < 0 || pe >= pdbentry.length)
- {
- throw new Error(
- "Implementation error - no corresponding pdbentry (for index "
- + pe + ") to add sequences mappings to");
- }
- final String nullChain = "TheNullChain";
- Vector s = new Vector();
- Vector c = new Vector();
- if (chains == null)
- {
- chains = new String[pdbentry.length][];
- }
- if (sequence[pe] != null)
- {
- for (int i = 0; i < sequence[pe].length; i++)
- {
- s.addElement(sequence[pe][i]);
- if (chains[pe] != null)
- {
- if (i < chains[pe].length)
- {
- c.addElement(chains[pe][i]);
- }
- else
- {
- c.addElement(nullChain);
- }
- }
- else
- {
- if (tchain != null && tchain.length > 0)
- {
- c.addElement(nullChain);
- }
- }
- }
- }
- for (int i = 0; i < seq.length; i++)
- {
- if (!s.contains(seq[i]))
- {
- s.addElement(seq[i]);
- if (tchain != null && i < tchain.length)
- {
- c.addElement(tchain[i] == null ? nullChain : tchain[i]);
- }
- }
- }
- SequenceI[] tmp = new SequenceI[s.size()];
- s.copyInto(tmp);
- sequence[pe] = tmp;
- if (c.size() > 0)
- {
- String[] tch = new String[c.size()];
- c.copyInto(tch);
- for (int i = 0; i < tch.length; i++)
- {
- if (tch[i] == nullChain)
- {
- tch[i] = null;
- }
- }
- chains[pe] = tch;
- }
- else
- {
- chains[pe] = null;
- }
+ }
+
+ /**
+ * ComponentListener method
+ */
+ @Override
+ public void componentShown(ComponentEvent e)
+ {
+ showConsole(true);
+ }
+
+ /**
+ * ComponentListener method
+ */
+ @Override
+ public void componentHidden(ComponentEvent e)
+ {
+ showConsole(false);