1 9 10 package org.enhydra.jawe.actions; 11 12 import org.enhydra.jawe.*; 13 import org.enhydra.jawe.xml.*; 14 import org.enhydra.jawe.xml.elements.*; 15 import org.enhydra.jawe.xml.panels.*; 16 import java.awt.Dimension ; 17 18 import java.awt.event.ActionEvent ; 19 20 23 public class ZoomOut extends ActionBase { 24 25 public ZoomOut (ProcessEditor pe) { 26 super(pe); 27 } 28 29 public void actionPerformed(ActionEvent e) { 30 editor.setScale(editor.getGraph().getScale()/1.15); 32 try { 33 Dimension prefSize=editor.getGraph().getSize(); 34 prefSize.width=(int)(prefSize.width/1.15); 35 prefSize.height=(int)(prefSize.height/1.15); 36 editor.getGraph().setPreferredSize(prefSize); 37 } catch (Exception ex) {} 38 39 43 } 44 } 45 | Popular Tags |