Exemplo n.º 1
0
 public void saveObject(XMLControl control, Object obj) {
   Style style = (Style) obj;
   control.setValue("line color", style.getLineColor());
   control.setValue("line width", style.getLineWidth());
   control.setValue("fill color", style.getFillColor());
   control.setValue("resolution", style.getResolution());
   control.setValue("drawing fill", style.isDrawingFill());
   control.setValue("drawing lines", style.isDrawingLines());
 }
Exemplo n.º 2
0
 public Object loadObject(XMLControl control, Object obj) {
   Style style = (Style) obj;
   style.setLineColor((Color) control.getObject("line color"));
   style.setLineWidth((float) control.getDouble("line width"));
   style.setFillColor((Color) control.getObject("fill color"));
   style.setResolution(
       (org.opensourcephysics.display3d.core.Resolution) control.getObject("resolution"));
   style.setDrawingFill(control.getBoolean("drawing fill"));
   style.setDrawingLines(control.getBoolean("drawing lines"));
   return obj;
 }