1 package org.enhydra.shark.swingclient.workflowadmin.actions; 2 3 import java.awt.event.*; 4 import java.awt.Dimension ; 5 6 import org.enhydra.shark.swingclient.*; 7 import org.enhydra.shark.swingclient.workflowadmin.*; 8 9 12 public class ZoomOut extends ActionBase { 13 14 public ZoomOut (ProcessViewer pv) { 15 super(pv); 16 } 17 18 public void actionPerformed(ActionEvent e) { 19 ProcessViewer pv=(ProcessViewer)actionPanel; 20 try { 21 pv.setScale(pv.getCurrentGraph().getScale()/1.15); 22 pv.getCurrentGraph(); 23 pv.setScale(pv.getCurrentGraph().getScale()/1.15); 24 Dimension prefSize=pv.getCurrentGraph().getSize(); 25 prefSize.width=(int)(prefSize.width/1.15); 26 prefSize.height=(int)(prefSize.height/1.15); 27 pv.getCurrentGraph().setPreferredSize(prefSize); 28 32 } catch (Exception ex){} 33 } 34 35 } 36 | Popular Tags |