tify"> lt; font color= GREEN gt; lt; b gt; + Format. format (value) + lt;/b gt; lt;/font gt; lt;/font gt; lt; br gt; raquo ;;
}
}
private class ConsoleLogTextPane extends JTextPane {
/**
*
*/
private static final long serialVersionUID =- 5691372469851601341L;
private String TEMPLATE= lt; html gt; lt; title gt; lt;/title gt; lt; body gt; lt;/body gt; lt;/html gt; ;
private String buffer;
private int breakIndex;
public ConsoleLogTextPane () {(TEMPLATE); ( text/html );=0;
}
public void addString (String str) {= this . getText ();=buffer. lastIndexOf ( lt;/body gt; );=buffer. substring (0, breakIndex) + str + buffer. substring (breakIndex);
this . setText (buffer);
}
public void clearConsole () {
this . setText (TEMPLATE);
}
}
class AlgorythmsComboBoxModel implements ComboBoxModel lt; String gt; {
private Set lt; ListDataListener gt; listeners;
private List lt; String gt; elements;
private String selected;
public AlgorythmsComboBoxModel (String. strings) {= new HashSet lt ; ListDataListener gt; ();= new ArrayList lt; String gt; ();= Laquo; raquo ;;
for (String s: strings) {. add (s);
}
}
@ Override
public void addListDataListener (ListDataListener l) {. add (l);
}
@ Override
public String getElementAt ( int index) {
return elements. get (index);
}
@ Override
public int getSize () {
return elements. size ();
}
@ Override
public void removeListDataListener (ListDataListener l) {. remove (l);
}
@ Override
public Object getSelectedItem () {
return selected;
}
@ Override
public void setSelectedItem (Object anItem) {= (String ) anItem;
}
}
class ResultTreeCellRenderer implements TreeCellRenderer {
private JLabel label= new JLabel ();
@ Override
public Component getTreeCellRendererComponent (JTree tree, Object value,
boolean selected, boolean expanded, boolean leaf, int row,
boolean hasFocus) {
if ((value!= null ) amp; amp; (value instanceof DefaultMutableTreeNode)) {icon= null ; node=(DefaultMutableTreeNode) value; userObject=node. getUserObject ();
if (userObject instanceof Container) {= new ImageIcon ( ResultViewer. class . getResource ( images/Container. png )) ;. setText ( Контейнер, ID: + ((Container) userObject). getId ());