/** * Set the console colour scheme * * @param which the scheme to use */ public void setScheme(int which) { scheme = which; if (schemes == null) { defineSchemes(); } Scheme s; try { s = schemes.get(which); } catch (IndexOutOfBoundsException ex) { s = schemes.get(0); scheme = 0; } console.setForeground(s.foreground); console.setBackground(s.background); if (schemeGroup != null) { schemeGroup.setSelected(schemeMenu.getItem(scheme).getModel(), true); } }