Package org.lekan.graphics

Examples of org.lekan.graphics.SGFrame


      transientObjects.clear();
    }
  }
 
  private void redraw(){
    SGFrame frame = program.getFrame();
    frame.clearGraphics();
    try{
      synchronized(backgroundObjects){
        for(SGObject object : backgroundObjects){
          frame.addObject(object);//no origin specified, so add it
        }
      }
    }catch(ConcurrentModificationException e){
      System.err.println("Encountered a ConcurrentModificationException while drawing background objects.");
      //JOptionPane.showMessageDialog(null, "ConcurrentModificationException!");
      redraw();
      return;
    }catch(IndexOutOfBoundsException e){
      System.err.println("Encountered an IndexOutOfBoundsException while drawing background objects.");
      redraw();
      return;
    }
    try{
      synchronized(persistentObjects){
        for(SGObject object : persistentObjects){
          frame.addObject(object);//no origin specified, so add it
        }
      }
    }catch(ConcurrentModificationException e){
      System.err.println("Encountered a ConcurrentModificationException while drawing persistent objects.");
      //JOptionPane.showMessageDialog(null, "ConcurrentModificationException!");
      redraw();
      return;
    }catch(IndexOutOfBoundsException e){
      System.err.println("Encountered an IndexOutOfBoundsException while drawing persistent objects.");
      redraw();
      return;
    }
    try{
      synchronized(transientObjects){
        for(SGObject object : transientObjects){
          frame.addObject(object);//no origin specified, so add it
        }
      }
    }catch(ConcurrentModificationException e){
      System.err.println("Encountered a ConcurrentModificationException while drawing transient objects.");
      //JOptionPane.showMessageDialog(null, "ConcurrentModificationException!");
      redraw();
      return;
    }catch(IndexOutOfBoundsException e){
      System.err.println("Encountered an IndexOutOfBoundsException while drawing transient objects.");
      redraw();
      return;
    }
    try{
      synchronized(draggingObjects){
        for(SGObject object : draggingObjects){
          frame.addObject(object);//no origin specified, so add it
        }
      }
    }catch(ConcurrentModificationException e){
      System.err.println("Encountered a ConcurrentModificationException while drawing dragging objects.");
      //JOptionPane.showMessageDialog(null, "ConcurrentModificationException!");
View Full Code Here

TOP

Related Classes of org.lekan.graphics.SGFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.