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