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 17 import java.awt.Dimension ; 18 19 import java.awt.event.ActionEvent ; 20 21 24 public class ZoomIn extends ActionBase { 25 26 public ZoomIn (ProcessEditor pe) { 27 super(pe); 28 } 29 30 public void actionPerformed(ActionEvent e) { 31 editor.setScale(editor.getGraph().getScale()/0.85); try { 35 Dimension prefSize=editor.getGraph().getSize(); 36 prefSize.width=(int)(prefSize.width/0.85); 37 prefSize.height=(int)(prefSize.height/0.85); 38 editor.getGraph().setPreferredSize(prefSize); 39 } catch (Exception ex) {} 40 41 45 } 46 } 47 | Popular Tags |