Merging mk branch rev 136:137 (tuning 2d-graphics)
This commit is contained in:
		@@ -4,6 +4,8 @@ package eva2;
 | 
			
		||||
 * Main product and version information strings.
 | 
			
		||||
 * 
 | 
			
		||||
 * --- Changelog
 | 
			
		||||
 * 2.029: Tuned the 2d-graphs which now paints quicker and changes size depending on the
 | 
			
		||||
 * 			surrounding plot window. 
 | 
			
		||||
 * 2.028: Tuned the Population to sort only when necessary on calls to getBestN... Added StatisticsDummy.
 | 
			
		||||
 * 			Slightly tuned SimpleProblemWrapper to call initProblem of simple problems if available.
 | 
			
		||||
 * 2.027: Renamed SetData and SetDataLamarckian from individual datatype interfaces to SetGenotype and SetPhenotype.
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ public class DPointSetMultiIcon extends DComponent
 | 
			
		||||
{
 | 
			
		||||
    //~ Instance fields ////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
    protected ArrayList m_IconsMI = new ArrayList();
 | 
			
		||||
    protected ArrayList<DPointIcon> m_IconsMI = new ArrayList<DPointIcon>();
 | 
			
		||||
    protected DIntDoubleMap xMI;
 | 
			
		||||
    protected DIntDoubleMap yMI;
 | 
			
		||||
    protected DPointIcon iconMI = null;
 | 
			
		||||
@@ -119,7 +119,7 @@ public class DPointSetMultiIcon extends DComponent
 | 
			
		||||
        return new DPointSet(xMI, yMI);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ArrayList getIconsMI() {
 | 
			
		||||
    public ArrayList<DPointIcon> getIconsMI() {
 | 
			
		||||
        return this.m_IconsMI;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -289,17 +289,11 @@ public class DPointSetMultiIcon extends DComponent
 | 
			
		||||
                    for (int i = interval[0]; i < interval[1]; i++)
 | 
			
		||||
                    {
 | 
			
		||||
                        p2 = m.getPoint(xMI.getImage(i), yMI.getImage(i));
 | 
			
		||||
 | 
			
		||||
                        if (p1 != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            try
 | 
			
		||||
                            {
 | 
			
		||||
                                g.drawLine(p1.x, p1.y, p2.x, p2.y);
 | 
			
		||||
                            }
 | 
			
		||||
                             catch (java.lang.NullPointerException e)
 | 
			
		||||
                            {
 | 
			
		||||
                                // pff
 | 
			
		||||
                            }
 | 
			
		||||
                        	if (p2!=null) {
 | 
			
		||||
                        		g.drawLine(p1.x, p1.y, p2.x, p2.y);
 | 
			
		||||
                        	}
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ((i < this.m_IconsMI.size()) && (this.m_IconsMI.get(i) != null))
 | 
			
		||||
@@ -338,6 +332,7 @@ public class DPointSetMultiIcon extends DComponent
 | 
			
		||||
                    {
 | 
			
		||||
                        p = m.getPoint(xMI.getImage(i), yMI.getImage(i));
 | 
			
		||||
 | 
			
		||||
                        if (p==null) continue;
 | 
			
		||||
                        if (this.m_IconsMI.get(i) != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            g.setStroke(new BasicStroke());
 | 
			
		||||
 
 | 
			
		||||
@@ -265,7 +265,7 @@ public class Plot implements PlotInterface, Serializable {
 | 
			
		||||
		m_ButtonPanel.add(SaveJPGButton);
 | 
			
		||||
		//  getContentPane().smultetLayout( new GridLayout(1, 4) );
 | 
			
		||||
		m_Frame.getContentPane().add(m_ButtonPanel,"South");
 | 
			
		||||
		m_Frame.getContentPane().add(m_PlotArea,"North");
 | 
			
		||||
		m_Frame.getContentPane().add(m_PlotArea,"Center"); // north was not so nice
 | 
			
		||||
		m_Frame.addWindowListener(new WindowAdapter() {
 | 
			
		||||
			public void windowClosing(WindowEvent e) {
 | 
			
		||||
				m_PlotArea.clearAll(); // this was a memory leak
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user