Пример #1
0
 public Object loadObject(XMLControl control, Object obj) {
   VisualizationHints hints = (VisualizationHints) obj;
   hints.setDecorationType(control.getInt("decoration type")); // $NON-NLS-1$
   hints.setCursorType(control.getInt("cursor type")); // $NON-NLS-1$
   hints.setRemoveHiddenLines(control.getBoolean("remove hidden lines")); // $NON-NLS-1$
   hints.setAllowQuickRedraw(control.getBoolean("allow quick redraw")); // $NON-NLS-1$
   hints.setUseColorDepth(control.getBoolean("use color depth")); // $NON-NLS-1$
   hints.setShowCoordinates(control.getInt("show coordinates at")); // $NON-NLS-1$
   hints.setXFormat(control.getString("x format")); // $NON-NLS-1$
   hints.setYFormat(control.getString("y format")); // $NON-NLS-1$
   hints.setZFormat(control.getString("z format")); // $NON-NLS-1$
   hints.setAxesLabels((String[]) control.getObject("axes labels")); // $NON-NLS-1$
   return obj;
 }
Пример #2
0
 public void saveObject(XMLControl control, Object obj) {
   VisualizationHints hints = (VisualizationHints) obj;
   control.setValue("decoration type", hints.getDecorationType()); // $NON-NLS-1$
   control.setValue("cursor type", hints.getCursorType()); // $NON-NLS-1$
   control.setValue("remove hidden lines", hints.isRemoveHiddenLines()); // $NON-NLS-1$
   control.setValue("allow quick redraw", hints.isAllowQuickRedraw()); // $NON-NLS-1$
   control.setValue("use color depth", hints.isUseColorDepth()); // $NON-NLS-1$
   control.setValue("show coordinates at", hints.getShowCoordinates()); // $NON-NLS-1$
   control.setValue("x format", hints.getXFormat()); // $NON-NLS-1$
   control.setValue("y format", hints.getYFormat()); // $NON-NLS-1$
   control.setValue("z format", hints.getZFormat()); // $NON-NLS-1$
   control.setValue("axes labels", hints.getAxesLabels()); // $NON-NLS-1$
 }