All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.coode.owlviz.command.ZoomInCommand Maven / Gradle / Ivy

Go to download

A plug-in for the Protege Desktop ontology editor that provides a graphical representation of the class hierarchies in an OWL ontology.

The newest version!
package org.coode.owlviz.command;

import org.coode.owlviz.ui.OWLVizViewI;
import org.coode.owlviz.util.graph.ui.GraphComponent;
import org.protege.editor.core.ui.util.Icons;
import org.protege.editor.core.ui.view.DisposableAction;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Iterator;


/**
 * User: matthewhorridge
* The Univeristy Of Manchester
* Medical Informatics Group
* Date: Feb 19, 2004

*

* [email protected]
* www.cs.man.ac.uk/~horridgm

*/ public class ZoomInCommand extends DisposableAction { /** * */ private static final long serialVersionUID = -1416342286893975880L; private OWLVizViewI view; public ZoomInCommand(OWLVizViewI view) { super("Zoom In", Icons.getIcon("zoom.in.png")); this.putValue(AbstractAction.SHORT_DESCRIPTION, "Zoom In"); this.view = view; } public void dispose() { } /** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { for (Iterator it = view.getAllGraphComponents().iterator(); it.hasNext(); ) { GraphComponent graphComponent = (GraphComponent) it.next(); int zoomLevel = graphComponent.getGraphView().getZoomLevel(); zoomLevel += 10; graphComponent.getGraphView().setZoomLevel(zoomLevel); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy